diff --git a/addons/check_config/index.html b/addons/check_config/index.html index 420b714b31..b96fd8f0f8 100644 --- a/addons/check_config/index.html +++ b/addons/check_config/index.html @@ -92,6 +92,7 @@
  • Available add-ons
  • Installing third-party add-ons
  • External storage
  • +
  • Execute local things
  • Architecture
  • diff --git a/addons/dhcp_server/index.html b/addons/dhcp_server/index.html index d91f56dca6..af97e30969 100644 --- a/addons/dhcp_server/index.html +++ b/addons/dhcp_server/index.html @@ -130,6 +130,7 @@
  • Available add-ons
  • Installing third-party add-ons
  • External storage
  • +
  • Execute local things
  • Architecture
  • diff --git a/addons/duckdns/index.html b/addons/duckdns/index.html index 523d915b6a..48192dbfc9 100644 --- a/addons/duckdns/index.html +++ b/addons/duckdns/index.html @@ -95,6 +95,7 @@
  • Available add-ons
  • Installing third-party add-ons
  • External storage
  • +
  • Execute local things
  • Architecture
  • diff --git a/addons/index.html b/addons/index.html index ed56020f0c..74ac4c08ab 100644 --- a/addons/index.html +++ b/addons/index.html @@ -93,6 +93,7 @@
  • Available add-ons
  • Installing third-party add-ons
  • External storage
  • +
  • Execute local things
  • Architecture
  • diff --git a/addons/lets_encrypt/index.html b/addons/lets_encrypt/index.html index 240de0c404..a33386d6e6 100644 --- a/addons/lets_encrypt/index.html +++ b/addons/lets_encrypt/index.html @@ -104,6 +104,7 @@ This add-on need port 80/443 to verify the certificate request, please stop all
  • Available add-ons
  • Installing third-party add-ons
  • External storage
  • +
  • Execute local things
  • Architecture
  • diff --git a/addons/mosquitto/index.html b/addons/mosquitto/index.html index 701cd21be7..821a93f2de 100644 --- a/addons/mosquitto/index.html +++ b/addons/mosquitto/index.html @@ -100,6 +100,7 @@
  • Available add-ons
  • Installing third-party add-ons
  • External storage
  • +
  • Execute local things
  • Architecture
  • diff --git a/addons/nginx_proxy/index.html b/addons/nginx_proxy/index.html index 40c9604c8a..fcd7255569 100644 --- a/addons/nginx_proxy/index.html +++ b/addons/nginx_proxy/index.html @@ -92,6 +92,7 @@
  • Available add-ons
  • Installing third-party add-ons
  • External storage
  • +
  • Execute local things
  • Architecture
  • diff --git a/addons/samba/index.html b/addons/samba/index.html index 53020ec8f6..0edd859644 100644 --- a/addons/samba/index.html +++ b/addons/samba/index.html @@ -104,6 +104,7 @@
  • Available add-ons
  • Installing third-party add-ons
  • External storage
  • +
  • Execute local things
  • Architecture
  • diff --git a/addons/ssh/index.html b/addons/ssh/index.html index 27b57e9ef6..17b97fe19c 100644 --- a/addons/ssh/index.html +++ b/addons/ssh/index.html @@ -97,6 +97,7 @@ This add-on is not compatible when you installed Hass.io via the generic Linux i
  • Available add-ons
  • Installing third-party add-ons
  • External storage
  • +
  • Execute local things
  • Architecture
  • diff --git a/atom.xml b/atom.xml index e93403624f..bb1f9b661d 100644 --- a/atom.xml +++ b/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Home Assistant]]> - 2017-05-24T14:28:19+00:00 + 2017-05-24T14:54:21+00:00 https://home-assistant.io/ diff --git a/blog/categories/announcements/atom.xml b/blog/categories/announcements/atom.xml index c512ebd13b..40f5096fca 100644 --- a/blog/categories/announcements/atom.xml +++ b/blog/categories/announcements/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Announcements | Home Assistant]]> - 2017-05-24T14:28:19+00:00 + 2017-05-24T14:54:21+00:00 https://home-assistant.io/ diff --git a/blog/categories/community/atom.xml b/blog/categories/community/atom.xml index d51483d7de..b62719283e 100644 --- a/blog/categories/community/atom.xml +++ b/blog/categories/community/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Community | Home Assistant]]> - 2017-05-24T14:28:19+00:00 + 2017-05-24T14:54:21+00:00 https://home-assistant.io/ diff --git a/blog/categories/device-tracking/atom.xml b/blog/categories/device-tracking/atom.xml index 15bd5c6fab..e1d2c1b2e9 100644 --- a/blog/categories/device-tracking/atom.xml +++ b/blog/categories/device-tracking/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Device-Tracking | Home Assistant]]> - 2017-05-24T14:28:19+00:00 + 2017-05-24T14:54:21+00:00 https://home-assistant.io/ diff --git a/blog/categories/esp8266/atom.xml b/blog/categories/esp8266/atom.xml index dc9859d5b8..a762d95799 100644 --- a/blog/categories/esp8266/atom.xml +++ b/blog/categories/esp8266/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: ESP8266 | Home Assistant]]> - 2017-05-24T14:28:19+00:00 + 2017-05-24T14:54:21+00:00 https://home-assistant.io/ diff --git a/blog/categories/how-to/atom.xml b/blog/categories/how-to/atom.xml index 67446a8d70..4c53c3594f 100644 --- a/blog/categories/how-to/atom.xml +++ b/blog/categories/how-to/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: How-To | Home Assistant]]> - 2017-05-24T14:28:19+00:00 + 2017-05-24T14:54:21+00:00 https://home-assistant.io/ diff --git a/blog/categories/ibeacons/atom.xml b/blog/categories/ibeacons/atom.xml index eab06d0857..5397f6e45c 100644 --- a/blog/categories/ibeacons/atom.xml +++ b/blog/categories/ibeacons/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: iBeacons | Home Assistant]]> - 2017-05-24T14:28:19+00:00 + 2017-05-24T14:54:21+00:00 https://home-assistant.io/ diff --git a/blog/categories/internet-of-things/atom.xml b/blog/categories/internet-of-things/atom.xml index 09e1189f82..6e61ec1cfc 100644 --- a/blog/categories/internet-of-things/atom.xml +++ b/blog/categories/internet-of-things/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Internet-of-Things | Home Assistant]]> - 2017-05-24T14:28:19+00:00 + 2017-05-24T14:54:21+00:00 https://home-assistant.io/ diff --git a/blog/categories/iot-data/atom.xml b/blog/categories/iot-data/atom.xml index 17c1e7cffb..e4adea9977 100644 --- a/blog/categories/iot-data/atom.xml +++ b/blog/categories/iot-data/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: IoT-Data | Home Assistant]]> - 2017-05-24T14:28:19+00:00 + 2017-05-24T14:54:21+00:00 https://home-assistant.io/ diff --git a/blog/categories/merchandise/atom.xml b/blog/categories/merchandise/atom.xml index 6371de6058..12c860c52d 100644 --- a/blog/categories/merchandise/atom.xml +++ b/blog/categories/merchandise/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Merchandise | Home Assistant]]> - 2017-05-24T14:28:19+00:00 + 2017-05-24T14:54:21+00:00 https://home-assistant.io/ diff --git a/blog/categories/micropython/atom.xml b/blog/categories/micropython/atom.xml index 1b6245ba5d..97c243451b 100644 --- a/blog/categories/micropython/atom.xml +++ b/blog/categories/micropython/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Micropython | Home Assistant]]> - 2017-05-24T14:28:19+00:00 + 2017-05-24T14:54:21+00:00 https://home-assistant.io/ diff --git a/blog/categories/mqtt/atom.xml b/blog/categories/mqtt/atom.xml index 5538b02c61..396a27c4e4 100644 --- a/blog/categories/mqtt/atom.xml +++ b/blog/categories/mqtt/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: MQTT | Home Assistant]]> - 2017-05-24T14:28:19+00:00 + 2017-05-24T14:54:21+00:00 https://home-assistant.io/ diff --git a/blog/categories/organisation/atom.xml b/blog/categories/organisation/atom.xml index 3db0d98a78..a04b080d70 100644 --- a/blog/categories/organisation/atom.xml +++ b/blog/categories/organisation/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Organisation | Home Assistant]]> - 2017-05-24T14:28:19+00:00 + 2017-05-24T14:54:21+00:00 https://home-assistant.io/ diff --git a/blog/categories/owntracks/atom.xml b/blog/categories/owntracks/atom.xml index 6f8f27f636..2fe72705ff 100644 --- a/blog/categories/owntracks/atom.xml +++ b/blog/categories/owntracks/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: OwnTracks | Home Assistant]]> - 2017-05-24T14:28:19+00:00 + 2017-05-24T14:54:21+00:00 https://home-assistant.io/ diff --git a/blog/categories/presence-detection/atom.xml b/blog/categories/presence-detection/atom.xml index 0d86421e32..64c4c92745 100644 --- a/blog/categories/presence-detection/atom.xml +++ b/blog/categories/presence-detection/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Presence-Detection | Home Assistant]]> - 2017-05-24T14:28:19+00:00 + 2017-05-24T14:54:21+00:00 https://home-assistant.io/ diff --git a/blog/categories/public-service-announcement/atom.xml b/blog/categories/public-service-announcement/atom.xml index ef40b8fc01..67c674cb60 100644 --- a/blog/categories/public-service-announcement/atom.xml +++ b/blog/categories/public-service-announcement/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Public-Service-Announcement | Home Assistant]]> - 2017-05-24T14:28:19+00:00 + 2017-05-24T14:54:21+00:00 https://home-assistant.io/ diff --git a/blog/categories/release-notes/atom.xml b/blog/categories/release-notes/atom.xml index 272bd14b3e..0e76b7dfd0 100644 --- a/blog/categories/release-notes/atom.xml +++ b/blog/categories/release-notes/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Release-Notes | Home Assistant]]> - 2017-05-24T14:28:19+00:00 + 2017-05-24T14:54:21+00:00 https://home-assistant.io/ diff --git a/blog/categories/survey/atom.xml b/blog/categories/survey/atom.xml index 0ec0c3a7cf..23702a9b95 100644 --- a/blog/categories/survey/atom.xml +++ b/blog/categories/survey/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Survey | Home Assistant]]> - 2017-05-24T14:28:19+00:00 + 2017-05-24T14:54:21+00:00 https://home-assistant.io/ diff --git a/blog/categories/talks/atom.xml b/blog/categories/talks/atom.xml index af82b08875..9bc952289f 100644 --- a/blog/categories/talks/atom.xml +++ b/blog/categories/talks/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Talks | Home Assistant]]> - 2017-05-24T14:28:19+00:00 + 2017-05-24T14:54:21+00:00 https://home-assistant.io/ diff --git a/blog/categories/technology/atom.xml b/blog/categories/technology/atom.xml index 965e28d384..2c3a218fa2 100644 --- a/blog/categories/technology/atom.xml +++ b/blog/categories/technology/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Technology | Home Assistant]]> - 2017-05-24T14:28:19+00:00 + 2017-05-24T14:54:21+00:00 https://home-assistant.io/ diff --git a/blog/categories/user-stories/atom.xml b/blog/categories/user-stories/atom.xml index 22d4924353..0a3f2beef1 100644 --- a/blog/categories/user-stories/atom.xml +++ b/blog/categories/user-stories/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: User-Stories | Home Assistant]]> - 2017-05-24T14:28:19+00:00 + 2017-05-24T14:54:21+00:00 https://home-assistant.io/ diff --git a/blog/categories/video/atom.xml b/blog/categories/video/atom.xml index 9cf76ac93f..7dbe1e8ce1 100644 --- a/blog/categories/video/atom.xml +++ b/blog/categories/video/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Video | Home Assistant]]> - 2017-05-24T14:28:19+00:00 + 2017-05-24T14:54:21+00:00 https://home-assistant.io/ diff --git a/blog/categories/website/atom.xml b/blog/categories/website/atom.xml index e9de21c19b..b80e415f89 100644 --- a/blog/categories/website/atom.xml +++ b/blog/categories/website/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Website | Home Assistant]]> - 2017-05-24T14:28:19+00:00 + 2017-05-24T14:54:21+00:00 https://home-assistant.io/ diff --git a/hassio/addon_config/index.html b/hassio/addon_config/index.html index 986a5ee751..72a47098ee 100644 --- a/hassio/addon_config/index.html +++ b/hassio/addon_config/index.html @@ -264,6 +264,7 @@ CMD [ "/run.sh" ]
  • Available add-ons
  • Installing third-party add-ons
  • External storage
  • +
  • Execute local things
  • Architecture
  • diff --git a/hassio/addon_development/index.html b/hassio/addon_development/index.html index 64d5f2d8ab..29490e8fbd 100644 --- a/hassio/addon_development/index.html +++ b/hassio/addon_development/index.html @@ -84,6 +84,7 @@
  • Available add-ons
  • Installing third-party add-ons
  • External storage
  • +
  • Execute local things
  • Architecture
  • diff --git a/hassio/addon_publishing/index.html b/hassio/addon_publishing/index.html index 29a522100f..553ad1f717 100644 --- a/hassio/addon_publishing/index.html +++ b/hassio/addon_publishing/index.html @@ -123,6 +123,7 @@ Starting Hass.io 0.26, it is possible to distribute add-ons that will be built o
  • Available add-ons
  • Installing third-party add-ons
  • External storage
  • +
  • Execute local things
  • Architecture
  • diff --git a/hassio/addon_repository/index.html b/hassio/addon_repository/index.html index cae84631f2..55e46fcea4 100644 --- a/hassio/addon_repository/index.html +++ b/hassio/addon_repository/index.html @@ -121,6 +121,7 @@
  • Available add-ons
  • Installing third-party add-ons
  • External storage
  • +
  • Execute local things
  • Architecture
  • diff --git a/hassio/addon_testing/index.html b/hassio/addon_testing/index.html index 388776c118..f41f20d108 100644 --- a/hassio/addon_testing/index.html +++ b/hassio/addon_testing/index.html @@ -97,6 +97,7 @@ Use docker to build the test addon: Available add-ons
  • Installing third-party add-ons
  • External storage
  • +
  • Execute local things
  • Architecture
  • diff --git a/hassio/addon_tutorial/index.html b/hassio/addon_tutorial/index.html index eb5dcc407e..c3215d30a4 100644 --- a/hassio/addon_tutorial/index.html +++ b/hassio/addon_tutorial/index.html @@ -239,6 +239,7 @@ The Python 3 server will allow you to browse the /data folder.
  • Available add-ons
  • Installing third-party add-ons
  • External storage
  • +
  • Execute local things
  • Architecture
  • diff --git a/hassio/architecture/index.html b/hassio/architecture/index.html index 10ddd25871..ec9b55ac54 100644 --- a/hassio/architecture/index.html +++ b/hassio/architecture/index.html @@ -99,6 +99,7 @@
  • Available add-ons
  • Installing third-party add-ons
  • External storage
  • +
  • Execute local things
  • Architecture
  • diff --git a/hassio/debugging/index.html b/hassio/debugging/index.html index a7928fe48b..5541f281f0 100644 --- a/hassio/debugging/index.html +++ b/hassio/debugging/index.html @@ -97,6 +97,7 @@ docker logs homeassistant
  • Available add-ons
  • Installing third-party add-ons
  • External storage
  • +
  • Execute local things
  • Architecture
  • diff --git a/hassio/external_storage/index.html b/hassio/external_storage/index.html index 21b35da7db..c6a3ab4a5e 100644 --- a/hassio/external_storage/index.html +++ b/hassio/external_storage/index.html @@ -88,6 +88,7 @@ It is also possible to create a add-on that only mount stuff to do if OUTPUT="$(/read_my_sensor.sh)" then - mosquitto_pub -h "$MQTT_SERVER" -p "$MQTT_PORT" -t "$TOPIC" -m "$OUTPUT" || true + mosquitto_pub -h "$MQTT_SERVER" -p "$MQTT_PORT" -u "$USER" -P "$PASSWORD" -t "$TOPIC" -m "$OUTPUT" || true else echo "$(data) [ERROR] can't read sensor: $OUTPUT" fi sleep "$WAIT_TIME" done +

    Commands

    +

    Short story of that caption: We wait on incoming data from mqtt broker to do some things. We can also use on HomeAssistant input_boolean that trigger a automation to publish a custom command to mqtt topic they can process multible things in one add-on.

    +

    Our Dockerfile need to install:

    +
    RUN apk --no-cache add tzdata jq mosquitto-clients
    +
    +
    +

    Now we can process it with run.sh:

    +
    #!/bin/bash
    +set -e
    +
    +CONFIG_PATH=/data/options.json
    +
    +# possible options for processing
    +MQTT_SERVER=$(jq --raw-output '.server' $CONFIG_PATH)
    +MQTT_PORT=$(jq --raw-output '.port' $CONFIG_PATH)
    +TOPIC=$(jq --raw-output '.topic' $CONFIG_PATH)
    +USER=$(jq --raw-output '.user' $CONFIG_PATH)
    +PASSWORD=$(jq --raw-output '.password' $CONFIG_PATH)
    +
    +# read data
    +while read -r message
    +do
    +  if [ "$message" == "on" ]; then
    +    /do_command_on.sh || true
    +  else
    +    /do_command_off.sh || true
    +  fi
    +
    +done < <(mosquitto_sub -h "$MQTT_SERVER" -p "$MQTT_PORT" -u "$USER" -P "$PASSWORD" -t "$TOPIC" -q 1)
    +
    +
    +