How to control heating in a smart home
This year, I use a regular radiator connected to a smart outlet as an additional heater, I made a thermostat based on a smart outlet that works from a smart home system and, accordingly, turns the heater on or off depending on the temperature in the room, for the temperature in the room I use Zigbee sensors from Xiaomi, a temperature and humidity sensor, an outlet I also use a Zigbee socket from Tuya.
The other day, the outlet hung up and stopped turning on and off, and it remained on and off, while the heater was running almost all day, of course, the temperature in the room rose sharply, which was not at all comfortable, and even the fact that the temperature sensor was already higher than the set temperature, the outlet did not turn off and the smart home system At home, I also couldn't figure out what to turn off, because the outlet simply didn't send the status to the smart home system that it was on.
I made it so that before changing the state of the outlet, I send a signal, its current state is checked at the beginning, if the state is on and the temperature in the room is higher than the set temperature, then in this case the smart home system sends a signal to the outlet, if the temperature is higher and the outlet is already turned off, then the signal is not sent again, because otherwise, it would be possible to simply constantly send a signal with some kind of frequency, the automation system itself checks the statuses of all sensors every 10 seconds, and therefore information would be sent every 10 seconds about, turning off the power outlet is probably not critical, but it just clogs up all the traffic and of course you shouldn't do that.
Therefore, I use monitoring of the current state of the device and this sometimes causes problems, in this case my heater is powered from this outlet, it is set to the minimum heating temperature, that is, the minimum power, it has three power modes, the first is 700 watts, the second is 1300 watts and if turned on together, then two kilowatts, of course, I can't completely trust the sockets, because there may be different cases, it may just be that the relay gets stuck inside the socket, if the socket is no longer new or the power that is being used is connected, it is close to the maximum, even though 16 amps is indicated on the outlet, it's still quite a lot and it's better to use a much weaker device, and the heater is not working at its maximum.
The same problem may be on the part of the temperature sensor, my Zigbee sensor from Xiaomi stopped working correctly at some point, it started sending the smart home system 55.5 degrees, it just lasted continuously for several hours, it sent the same humidity, 55 percent, what is the reason is unclear, the battery was basically, it's in pretty good condition, and of course my system just turned off the heater and didn't turn it on, of course I realized that something was wrong when it got cold enough in the room, and I saw that, accordingly, for several hours the sensor was sending values all the time, and it was powered by CR2032 batteries, of course, the power of this battery was not enough for such a number of transmissions, and the thermometer itself was constantly falling asleep in order to somehow restore energy.
I also came across several times when the heater was simply turned off from the socket, and despite this, the smart home system tried to turn on the smart socket, tried to heat the room, but of course it didn't work either, you need to do some monitoring so that the smart home system also monitors energy consumption, and if there is no consumption, then inform me that something is wrong with the heater, or it has failed, or it has been physically pulled out of the socket, or the mode has been turned off on it and it is now in off mode.
I often found errors in scenarios when, for example, I had to adjust from time to time so that my heater would work and keep the temperature higher during the day and lower at night, and there are errors when, for example, I incorrectly specified the time that is nighttime and, accordingly, the heater simply did it at the wrong time. wrong actions, I heated the room when I didn't need to, and I also make sure that the heater doesn't work when no one is home.
For example, I also use two additional heaters on my balcony, they are more used in the off-season when you need to warm up the balcony to a comfortable temperature, now in winter my heaters keep the minimum temperature on the balcony so that it is not below 0, now I have one heater that keeps the temperature at 4 degrees on the balcony and if the temperature drops below, it heats the room back up to 4 or 5 degrees quickly enough, the algorithm itself is quite simple, I use it if the temperature is higher than set, then the outlet turns off, if the temperature is lower than set, then the outlet turns on, I did not set up the hysteresis, because the temperature sensors have a long delay in sending, they send when the temperature changes by more than half a degree, or humidity if it changes by more than five percent, and also send the value once an hour, once every 55 minutes Therefore, if the temperature was 25.9 degrees when heated, then the next trigger will occur either after 55 minutes or when the temperature becomes 26.4 degrees, so the hysteresis itself is not needed, but because of this, it turns out that a fairly large temperature drop occurs in the room, half a degree, this is certainly not critical, but the heater itself works for a long time, and of course it gets very hot if you are close to it, of course there is an additional temperature sensor on the radiators themselves, but it actually does not it is set to a certain temperature, and of course it shows the temperature of the heater more than the temperature in the room, and if, for example, the heater is at a higher power, then because of this it heats up very quickly, it both overheats and turns off, so I use the minimum temperature, which is basically enough to warm up the room additionally if there is not enough heating from other sources, for example, I monitored how long it takes to heat and cool, in principle, the entire cycle takes about an hour and a half, that is, during For half an hour, the heater heats the room even at 700 watts, and then the room cools back down to half a degree within an hour, and I also use a similar algorithm for the electric underfloor heating system, I had the simplest thermostats installed, which can simply be set manually, mechanically, to a certain temperature, and this is not in degrees, but simply in divisions, and in order to make it a little smart, I used a relay that is mounted on a wire that goes from the meter and from the machine in the electrical panel, including by turning off the switchboard, I turn on the underfloor heating at the right time and it just heats up and maintains the temperature that is also mechanically set on it.
Automation in a smart home should be useful and create additional comfort, but sometimes everything goes wrong… The reasons for this, and how to configure everything, see on my channel.