Last active
October 8, 2020 01:59
-
-
Save garystafford/d9ee30a7ae276abf7dd9de71a7948843 to your computer and use it in GitHub Desktop.
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
message = { | |
"device_id": get_mac_address(), | |
"time": datetime.now(timezone("UTC")), | |
"data": { | |
"temperature": payload_dht["temperature"], | |
"humidity": payload_dht["humidity"], | |
"lpg": payload_gas["lpg"], | |
"co": payload_gas["co"], | |
"smoke": payload_gas["smoke"], | |
"light": payload_light["light"], | |
"motion": payload_motion["motion"] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment