Dedicated Temp Sensors / Thermostat Temp Sensors update intervals rubbish

Not sure if this is the appropriate place to ask this. If it’s not, please move this topic.

I have many temperature sensors though out my house, garage, outside etc. I also have two real thermostats and two virtual ones. With a couple of exceptions, all my dedicated temperatures sensors are ESPHome based using ESP8266 devices and DHT22 sensors. All set for 60 sec. update intervals. The two real thermostats are Centralite branded Zigbee devices. Three others are SmartThings combo motion/temp sensors (all outside but one).

I use the ESPHome temperature readings in two rooms to control the virtual Generic Thermostat entities. One for an electric heater in the master bedroom and the other to control the livingroom gas logs. Both these work nearly perfectly and reliably. The ESPHome sensors are set to update every 60s. However, this is not usually the case. Sometimes they will go for three minutes or as many as eight minutes before HA gets an update. By then, the room temperatures have already exceed by far the actual Target temperature and the heat immediately turns off once updated.

The Centralite thermostats are about the same, but actually worse. First, I am pretty sure this is not a communications problem as I have good signals to each device and one is literally 5’ from the coordinator. They both exhibit the same results.

These both control natural gas furnaces. One in the Garage and the other in the house. Let’s start with the house. It’s set to 68F. It usually kicks on at 67.2F. But, it runs and runs and runs and my ESPHome sensors are reporting an average of 71F+, but the Centralite is still reporting 67.4 for like 20 minutes. Finally it updates, furnace shuts down.

Gas logs. ESPHome temp sensor. It’s generally the most reliable. Sometimes, same thing, it will go 8-10 minutes before updating. Once it does, the temp of the room has already exceeded the target temp by a few degrees. The gas logs shut down. I actually experienced a dreadful issue where the ESPHome temp sensor for that room went offline after it had trigged the logs to an on state. So, the room overheated by many degrees F until I walked into that room and noticed how hot it was. I have since added a fail safe to turn off the gas logs if the temp sensor goes offline, to both generic thermostats.

This is only a few examples, but it seems to affect all temperature sensors, whether or not it’s ESPHome, actual Zigbee thermostats, SmartThings sensors generic thermostats, or whatever. Just these very long random periods not updating in a timely manner.

So…Why does this happen? How do we correct this very serious problem? My heating bill last month was a combined total of $500. I am completely certain this is because of these delays in updating the temp sensors data, furnace, gas logs, electric heater overruns. Maybe there is a way to prioritize this? Maybe I am missing something?

Perhaps what Home Assistant needs is a “nice” command. I can watch the ESPHome temperature sensor logs and see they are sending the data on time, but HA is ignoring it. My system resources used on my HA server are negligible (RPi4/4gb, SSD boot/storage). Maybe we need a command which prioritizes devices/entities, whatever.

Example of ESPHome device reporting temperature:

[23:13:17][D][sensor:093]: 'WiFi Signal': Sending state -64.00000 dBm with 0 decimals of accuracy
[23:14:13][D][dht:048]: Got Temperature=21.7°C Humidity=32.7%
[23:14:13][D][sensor:093]: 'Livingroom Temperature': Sending state 71.06000 °F with 1 decimals of accuracy
[23:14:13][D][sensor:093]: 'Livingroom Humidity': Sending state 32.70000 % with 1 decimals of accuracy
[23:14:17][D][sensor:093]: 'WiFi Signal': Sending state -64.00000 dBm with 0 decimals of accuracy
[23:14:29][D][sntp:077]: Synchronized time: 2024-01-18 23:14:29
[23:15:13][D][dht:048]: Got Temperature=21.6°C Humidity=32.7%
[23:15:13][D][sensor:093]: 'Livingroom Temperature': Sending state 70.88000 °F with 1 decimals of accuracy
[23:15:13][D][sensor:093]: 'Livingroom Humidity': Sending state 32.70000 % with 1 decimals of accuracy
[23:15:17][D][sensor:093]: 'WiFi Signal': Sending state -64.00000 dBm with 0 decimals of accuracy

You can clearly see it’s reporting the data roughly every minute. However, my Home Assistant has not updated in 6 minutes. Why?

Any thoughts on this?

If you enable debug logging for the integration and follow a specific sensor, can you see a corresponding log entry in HA for the sensor update?

As you may have noticed, there is nothing in the ESP code that tells it where Home Assistant is. Although people assume that ESP Home connects to Home Assistant, it’s actually the other way around, Home Assistant reaches out and connects to ESP Home - they are in effect tiny servers.

So just because the ESP Home logs say sending state, it doesn’t necessarily mean that Home Assistant is actually connected.

This is interesting to know and does make sense. This is why some kind of adjustable priority should be implemented to force HA to connect to ESP devices. I will try the suggestion above and turn on some ESP debugging. Thanks for the idea and explanation.

This doesn’t explain however why the zigbee thermostats are also very slow at returning the current temperature. I don’t think it would affect the operation of the furnaces as these units SHOULD work totally self contained.

You have only told us that you have Zigbee thermostats, but not actually how Home Assistant gets the data?
Are they paired directly to Home Assistant? Running ZHA or Zigbe2MQTT?
You have mentioned SmartThings so are they paired to a SmartThings hub which Home Assistant speaks to using the SmartThings integration?

Battery powered Zigbee devices typically report once every 30-60 minutes, when the temperature isn’t really changing, and more frequently when the temperature is changing QUICKLY. It is for that reason that I have an ESP Home based device, a Zigbee (Aqara) temperature sensor and a Bluetooth temperature sensor in the rooms that I more concerned about, and group them together with the group helper, set to median. This also removes any worry about one or more of them suddenly running out battery.

As for the ESP Home devices, go in to the ESP integration on Home Assistant and have a look at the updates entry, look for messages in the history about the entity becoming unavailable.

Finally consider that Zigbee and WiFi are on the same frequencies and interference from one, either, both is well known. There are guides about selecting the best Zigbee channel so it is less likely to suffer from WiFi interference online.

They are paired directly to the HA Rpi4 using a Silicon Labs HubZ Smart Home Controller with ZHA integration. The thermostats are powered via the blue wire with battery backup but do not operate as repeaters.

The SmartThings sensors are Zigbee as well and battery operated. I am not using the SmartThings integration.

I have been considering adding a few more temperature sensors to the important places, such as the living room.

I am doing this already. My living room sensor has gone offline once in 6 days and it was really bad timing for it. It lost connection AFTER it had triggered the Gas Logs to an On state. It is suppose to shut off at 69F but the room was already much warmer than that by the time I noticed it. I added a fail safe so if the sensor goes offline, the Gas Logs get force-ably shut off.

I have already been down this road before and discovered my zigbee and wifi were overlapping a bit. I have since moved my wifi to the top frequency of ch-11 and the zigbee at the bottom of it’s frequency which is also ch11 (this would be ch-1 in wifi terms). So this should not be an issue and I would see it in the logs most certainly, as I did before.

Thanks for all the information too. Much appreciated.

1 Like