Dieser Container liest die aktuelle Temperatur des $SENSOR von Homeassistant aus und schickt sie auf die golem.de Mitmachprojekt-Schnittstelle zur Messung der Bürotemperatur.
Created
August 16, 2016 11:23
-
-
Save darookee/d7249563c5658697057290c4b65eb127 to your computer and use it in GitHub Desktop.
golem.de Mitmachprojekt: Dockerfile für die Verbindung von Homeassistant und golem.de
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM tutum/curl | |
| RUN curl -L \ | |
| https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64 \ | |
| > /bin/jq && chmod +x /bin/jq | |
| COPY run.sh /run.sh | |
| CMD ["/run.sh"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| temp=$(curl -s http://hoas:8123/api/states/${SENSOR}|jq '.state' -r) | |
| curl -s "http://www.golem.de/projekte/ot/temp.php?dbg=0&token=${TOKEN}&city=${CITY}&zip=${ZIP}&country=${COUNTRY}&lat=${LAT}&long=${LONG}&type=ard&temp=${temp}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| docker build -t self/hoas-to-golem.bridge . && | |
| docker create --name hoas2golem --link name_of_homeassistant_container:hoas --net network_containing_homeassistant \ Tue, 2016-08-16 (33) 13:15 | |
| -e TOKEN=myGolemToken \ | |
| -e CITY=myCity \ | |
| -e ZIP=myZipcode \ | |
| -e COUNTRY=myCountry \ | |
| -e LAT=myLat \ | |
| -e LONG=myLon \ | |
| -e SENSOR=sensor.name_of_the_temperature_sensor_in_homeassistant \ | |
| self/hoas-to-golem-bridge && | |
| docker run hoas2golem |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment