]> git.giorgioravera.it Git - homeassistant.git/commitdiff
Moved device tracker from nmap to ping and updated home assistant update
authorGiorgio Ravera <giorgio.ravera@gmail.com>
Tue, 14 Jan 2020 21:03:53 +0000 (22:03 +0100)
committerGiorgio Ravera <giorgio.ravera@gmail.com>
Tue, 14 Jan 2020 21:03:53 +0000 (22:03 +0100)
.gitignore
automation/update_notifications.yaml
device_tracker/nmap.yaml [deleted file]
device_tracker/nmap.yaml.disabled [new file with mode: 0644]
device_tracker/ping.yaml [new file with mode: 0644]
device_tracker/ping.yaml.disabled [deleted file]
shell_command/homeassistant.yaml
shell_scripts/homeassistant_upgrade.sh [changed mode: 0644->0755]

index a2fe8043ad31c9e80f45673be73ca7e868ec15ef..5a79d4e677c1a8118e34c1385a84f697e04e825f 100644 (file)
@@ -3,7 +3,6 @@ deps/
 .google_maps_location_sharing.cookies.*
 .HA_VERSION
 bravia.conf
-home-assistant.log
 home-assistant_v2.db
 html5_push_registrations.conf
 .mercedesme-token-cache
@@ -12,6 +11,9 @@ secrets.yaml
 tts/
 .uuid
 
+# Log Files
+*.log
+
 # Disabled Files
 *.disabled
 
@@ -20,7 +22,3 @@ custom_components/
 themes/
 www/community
 git_repos/
-
-# Scripts
-fix_owner.sh
-upgrade.sh
index 875d25c4cfa97b4f5683e34657f3e7af3c39e25c..7476d17368b517b2f17fa49c27c6fb23b48947c5 100644 (file)
@@ -52,5 +52,5 @@
     service: script.notify_text\r
     data_template:\r
       title: "HACS - Aggiornamento"\r
-      message: "Sono disponibili aggiornamenti per i dispositivi Shelly"\r
+      message: "Sono disponibili aggiornamenti per i moduli HACS"\r
       enable_persistant: true\r
diff --git a/device_tracker/nmap.yaml b/device_tracker/nmap.yaml
deleted file mode 100644 (file)
index cfc9599..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-######################################################################
-# Device Tracker: Nmap
-######################################################################
-
-- platform: nmap_tracker
-  hosts:
-    - s9.giorgioravera.it
-    - a5.giorgioravera.it
-    - a3.giorgioravera.it
-  scan_options: " --privileged -sP "
-  # The number of minutes Nmap will not scan this device
-  home_interval: 30
-
-  # Seconds between each scan for new devices
-  interval_seconds: 60
-  # Seconds to wait till marking someone as not home after not being seen
-  consider_home: 300
-  new_device_defaults:
-    track_new_devices: true
-    hide_if_away: false
diff --git a/device_tracker/nmap.yaml.disabled b/device_tracker/nmap.yaml.disabled
new file mode 100644 (file)
index 0000000..cfc9599
--- /dev/null
@@ -0,0 +1,20 @@
+######################################################################
+# Device Tracker: Nmap
+######################################################################
+
+- platform: nmap_tracker
+  hosts:
+    - s9.giorgioravera.it
+    - a5.giorgioravera.it
+    - a3.giorgioravera.it
+  scan_options: " --privileged -sP "
+  # The number of minutes Nmap will not scan this device
+  home_interval: 30
+
+  # Seconds between each scan for new devices
+  interval_seconds: 60
+  # Seconds to wait till marking someone as not home after not being seen
+  consider_home: 300
+  new_device_defaults:
+    track_new_devices: true
+    hide_if_away: false
diff --git a/device_tracker/ping.yaml b/device_tracker/ping.yaml
new file mode 100644 (file)
index 0000000..c034b40
--- /dev/null
@@ -0,0 +1,18 @@
+######################################################################
+# Device Tracker: Ping
+######################################################################
+
+- platform: ping
+  hosts:
+    s9: s9.giorgioravera.it
+    a5: a5.giorgioravera.it
+    a3: a3.giorgioravera.it
+  count: 5
+
+  # Seconds between each scan for new devices
+  interval_seconds: 60
+  # Seconds to wait till marking someone as not home after not being seen
+  consider_home: 300
+  new_device_defaults:
+    track_new_devices: true
+    hide_if_away: false
diff --git a/device_tracker/ping.yaml.disabled b/device_tracker/ping.yaml.disabled
deleted file mode 100644 (file)
index c034b40..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-######################################################################
-# Device Tracker: Ping
-######################################################################
-
-- platform: ping
-  hosts:
-    s9: s9.giorgioravera.it
-    a5: a5.giorgioravera.it
-    a3: a3.giorgioravera.it
-  count: 5
-
-  # Seconds between each scan for new devices
-  interval_seconds: 60
-  # Seconds to wait till marking someone as not home after not being seen
-  consider_home: 300
-  new_device_defaults:
-    track_new_devices: true
-    hide_if_away: false
index c3511e31240f3800c95592290c27728344497f5d..f665123abefa3973861d349933e2997a208c0a3a 100644 (file)
@@ -1 +1 @@
-homeassistant_upgrade: 'bash /config/homeassistant_upgrade.sh'
+homeassistant_upgrade: 'bash /config/shell_scripts/homeassistant_upgrade.sh'
old mode 100644 (file)
new mode 100755 (executable)
index 9e431f2..70ed341
@@ -1,9 +1,12 @@
 #!/bin/bash
 
+HASS_HOME="/config"
+LOG_FILE="$HASS_HOME/home-assistant_upgrade.log"
+
 echo "Changed directory to homeassistant home"
-cd
-echo "Activating python environment"
-source bin/activate
-echo "Upgrading homeassistant"
-pip3 install --upgrade homeassistant 2>&1 | tee /var/log/homeassistant/upgrade.log
+cd $HASS_HOME
+#echo "Activating python environment"
+#source bin/activate
+echo "Starting upgrading homeassistant"
+pip3 install --upgrade homeassistant 2>&1 | tee $LOG_FILE
 echo "Done"