I need 3 temperature (possibly humidity) sensors that I could read the value programatically (Python for example) on the local network. I spent quite some time googling, but no joy. Requirements: able to poll them every 1-5 mins, on battery, Z-Wave maybe?, reliable, precise, cheap.
I already have many Tapo sensors - happy with them, but one needs the Tapo app.
Thinking of Aeotec aerQ sensors (zwave and hub required), but you may know cheaper/better.
The end goal is setting up a system to automatically control 4 electric heaters (Ecostrad) in 3 separate zones. Ecostrad have their own sensors and control but not happy, the sensors are at the bottom of the unit. I managed to control the radiators locally or via cloud with the tinytuya library - great library.
Hi welcome. This forum is for a software system, Home Assistant (or maybe ESPHome). It can do what you want to achieve and many things more, but it looks like that is not what you are intending to do, or more exactly, how you intend to do it. Using Home Assistant is not using Python to read data from a device from a computer. If you are not intending to use Home Assistant (or mybe ESPHome) you are asking in the wrong place.
Can you explain more what it is you intend to do exactly?
Hi Edwin. Fair question, you are most probably right.
I read somewhere that Home Assistant can have Python extensions - was thinking I could write the control loop in which I would turn on-off the heaters depending on the sensor reading.
Or maybe good control loops are already possible in HA, including (I hope), the capability to learn over time the room thermic inertia.
Think I should buy a Pi 4, install HA and start tinkering. I am able from Python to read status/control the heaters via the Python tinytuya lib, guess there are ways to hook that on HA.
Hehe, thanks for bearing with me, I’m new to this all.
Once you have Home Assistant, you can do away with all the python easily. So if you do decide Home Assistant is something you are willing to implement, then look for sensors and that can integrate and we’ll help you on your journey to an automated home. It looks like the radiators can be integrated using localtuya integration.
But be warned, it is addictive. It won’t stop here and you’ll sped lots of time automating.
There is a basic temperature/humidity sensor from Athom that runs esphome (open firmware) which supports a REST API for querying the data, as well as several push options (event stream, mqtt, and native api) if you decide to write a custom app. It’s also straightforward to make this sensor yourself but the cost will be comparable. Of course it works great with Home Assistant as well.
Personally I use cheap Xiaomi ble sensors that you can manually flash with open firmware to broadcast bthome-formatted data on a custom time period. They’re battery-powered so you can put them anywhere, even in the fridge.
Unless there is some other reason you haven’t specified, you shouldn’t need to use python or any manual polling to do what you want in Home Assistant. Instead, the normal approach is that the automation logic you set up would be automatically triggered whenever there is a state change of your device.
So for a thermostat sensor, the normal operation is that your automation logic would watch for a state change to a value above or below your target. You don’t need to program any loop logic to do this - that happens automatically behind the scenes if/as needed. You just see your device’s state change when the temperature changes. So you can easily set up logic along the lines of “if temperature-1 becomes lower than x, then turn on heater-2”.
Of course, there are always exceptions. You can set up loop/polling logic if you need it. I’m just pointing out that for many/most situations you don’t need to - it’s taken care of in the background for you.
As you noted, the best way to start learning how HA does things is to get a Pi (or old laptop, or mini-PC, or…) and start playing with it, and asking more questions here. Lots of folks are happy to help with the initial “ah ha!” understandings.