<div dir="ltr"><div dir="ltr">On Wed, Jun 22, 2022 at 10:26 PM William Park via kwlug-disc <<a href="mailto:kwlug-disc@kwlug.org" target="_blank">kwlug-disc@kwlug.org</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">How do you express these in JSON format? Maybe<br>
"cooling": {<br>
"temperature_set_to" : 25,<br>
"exec" : "air_conditioner.exe"<br>
},<br>
"heating": {<br>
"temperature_set_to" : 15,<br>
"exec" : "furnace.exe"<br>
}<br></blockquote><div><br></div><div>William,</div><div><br></div><div>I am wondering what these sensors are? They may already have a format for the <br></div><div>message payload, and there can be ways to reformat or translate that output. <br></div><div><br></div><div>For example, I have an Acu-rite weather station, which has its own display. The <br></div><div>outdoor sensor gets the temperature, humidity, wind speed, rain amount, ...etc.</div><div>and sends it to the display which has limited statistics (e.g. max and min, rain <br></div><div>in the past 2 days, ...etc.)</div><div><br></div><div>But the sensor uses the widely used 433 MHz band, and there are RTL-SDR dongles</div><div>that can read this info together with an open source program called rtl_433, which</div><div>decodes many IoT sensors, even car tire pressure sensors.</div><div><br></div><div>The rtl_433 program can output in many formats, including CSV, JSON, ...etc. It also</div><div>can send the payload to MQTT. <br></div><div><br></div><div>So I was able to capture the output using a wrapper Python program, then feed it into <br></div><div>Home Assistant (and from there to InfluxDB and graph it in Grafana), as well as Weewx <br></div><div>(an open source personal weather station software written in Python). <br></div><div><br></div><div>Here is how the Grafana panel looks like:</div><div><br></div><div><a href="https://imgur.com/HNJExxq.png">https://imgur.com/HNJExxq.png</a></div><div><br></div><div>Sorry for the long digression on a tangential topic. <br></div><div>But the morale of the story is this: solutions may already exist for what you have, and </div><div>not only just one piece, but several. <br></div><div><br></div><div>Don't write new code/configuration unless you made sure there is nothing out there. <br></div></div></div>