Last active
December 23, 2020 02:09
-
-
Save danielsiwiec/f536b9d25b894d54b2b01db26ddc2c4d to your computer and use it in GitHub Desktop.
esp8266-thermostat
This file contains 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
props = load_props() | |
connect_to_wifi(props['wifi_sid'], props['wifi_pass']) | |
mqtt = MQTT(props['client_id'], props['iot_endpoint'], props['iot_topic']) | |
thermistor = Thermistor() | |
while True: | |
temp = thermistor.get_temp() | |
mqtt.send({'temp': temp}) | |
deep_sleep_seconds(props['sleep_seconds']) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment