Help for Rules for freezer automation & MQTT Import
Moderators: grovkillen, Stuntteam, TD-er
Help for Rules for freezer automation & MQTT Import
Hi
yesterday the thermostat of our freezer got broken. Because the replacement spare part has to be ordered and isn´t cheap my intention is to make the emergency solution workable for the future. I installed a waterproof DS18B20 at an ESP8266 and a Shelly Plug to switch the freezer on and of. The temperature regulation is done in IObroker but I´m not so happy with it because this night it stopped working well. Guess the Wifi connection isn´t stable enough and I like to switch to an independent temperature control done by ESPEASY. I have a Sonoff basic on my desk which is able to switch the freezer on/off and the ds18b20 can be connected.
Problem for me is the rule and the import function of the setpoint. My idea is that the setpoint should be imported e.g. MQTT from IObroker but if there is a problem (connection loss or startup etc.) the setpoint should used from a standard value which is stored in espeasy.
The temperature control itself should work as 2-point control. switch on if temperature is 1°C above setpoint. switch off if temperature is equal setpoint.
Do you think this is a good solution whith not to much effort to implement?
Starting now to flash the Sonoff but I have big headage doing the MQTT Import. this has not work yet for me and in this case this should be very stable.
Do have have some ideasor hints how to do best?
Thank you very much!
yesterday the thermostat of our freezer got broken. Because the replacement spare part has to be ordered and isn´t cheap my intention is to make the emergency solution workable for the future. I installed a waterproof DS18B20 at an ESP8266 and a Shelly Plug to switch the freezer on and of. The temperature regulation is done in IObroker but I´m not so happy with it because this night it stopped working well. Guess the Wifi connection isn´t stable enough and I like to switch to an independent temperature control done by ESPEASY. I have a Sonoff basic on my desk which is able to switch the freezer on/off and the ds18b20 can be connected.
Problem for me is the rule and the import function of the setpoint. My idea is that the setpoint should be imported e.g. MQTT from IObroker but if there is a problem (connection loss or startup etc.) the setpoint should used from a standard value which is stored in espeasy.
The temperature control itself should work as 2-point control. switch on if temperature is 1°C above setpoint. switch off if temperature is equal setpoint.
Do you think this is a good solution whith not to much effort to implement?
Starting now to flash the Sonoff but I have big headage doing the MQTT Import. this has not work yet for me and in this case this should be very stable.
Do have have some ideasor hints how to do best?
Thank you very much!
Re: Help for Rules for freezer automation & MQTT Import
By far the most secure way, is to use the "Level Control" device. It will handle all the control for you. Then you can use MQTT to monitor the temperature & that the sensor / Espeasy is actually alive.
Re: Help for Rules for freezer automation & MQTT Import
Thx mrwee
Haven´t used the controler before and had a look to it.
*Edit: connection for relay is now clear according wiki.
external setpoint setting I have to test, thx!
Haven´t used the controler before and had a look to it.
*Edit: connection for relay is now clear according wiki.
external setpoint setting I have to test, thx!
Re: Help for Rules for freezer automation & MQTT Import
Mmmh, I´m still struggeling with the sonoff basic and my wifi connection is not stable (rebooting).
Seems that this is a known "feature": https://github.com/letscontrolit/ESPEasy/issues/2931
Trying now to flash blank image and than normal 1M 8266 again, will see
Seems that this is a known "feature": https://github.com/letscontrolit/ESPEasy/issues/2931
Trying now to flash blank image and than normal 1M 8266 again, will see
Re: Help for Rules for freezer automation & MQTT Import
Just a warning as you plan on using a Sonoff.
When the Sonoff is powered via mains power, then ALL parts of the ESP are somehow connected to mains power as its power supply has no isolation from mains.
This means the temperature sensor is also connected to mains power.
Not sure how well the isolation is between the (metal?) probe of the temperature sensor and the pins, but I wouldn't be surprised if that's somehow connected or at least not properly isolated to withstand 250V.
So I would strongly advice you to power the ESP via an isolated power supply and maybe make a 2-stage relay to switch the freezer or maybe use something like a solid state relay to switch the mains as those only switch at 0-crossing of the mains voltage. (easier on the compressor motor)
TL;DR
Connecting the Dallas sensor to the Sonoff is quite dangerous.
When the Sonoff is powered via mains power, then ALL parts of the ESP are somehow connected to mains power as its power supply has no isolation from mains.
This means the temperature sensor is also connected to mains power.
Not sure how well the isolation is between the (metal?) probe of the temperature sensor and the pins, but I wouldn't be surprised if that's somehow connected or at least not properly isolated to withstand 250V.
So I would strongly advice you to power the ESP via an isolated power supply and maybe make a 2-stage relay to switch the freezer or maybe use something like a solid state relay to switch the mains as those only switch at 0-crossing of the mains voltage. (easier on the compressor motor)
TL;DR
Connecting the Dallas sensor to the Sonoff is quite dangerous.
Re: Help for Rules for freezer automation & MQTT Import
Thanks. A good point and I´m not feeling well doing this for continous period, fully agree.
Have to look for a "board" with 1 relay and 1 additional gpio for the DS18B20 inkl. isolated power supply.
Best would be a "board" incl. housing. Don´t know if there is sth. available.
Thats the reason why i like the sonoff because of included power supply. As alternative I only know Shelly but they are ot supported by ESPEasy.
In this case I like to have this included controler in the device to have maximum availebility without need for wifi connection or iobroker etc.
So have to search for sth. but this will need delivery time etc.
Have to look for a "board" with 1 relay and 1 additional gpio for the DS18B20 inkl. isolated power supply.
Best would be a "board" incl. housing. Don´t know if there is sth. available.
Thats the reason why i like the sonoff because of included power supply. As alternative I only know Shelly but they are ot supported by ESPEasy.
In this case I like to have this included controler in the device to have maximum availebility without need for wifi connection or iobroker etc.
So have to search for sth. but this will need delivery time etc.
Re: Help for Rules for freezer automation & MQTT Import
Shelly 1 and 2/2.5 are supported by ESPEasy, they even have their own configuration as they have 2MB of flash, allowing for OTA updates, yay!, but they have exactly the same electrical issues as the Sonoff's, and in this case the manufacturer is even giving warnings for that

/Ton (PayPal.me)
Re: Help for Rules for freezer automation & MQTT Import
Thx. Without knowing in detail, in between my feeling also pushed me in this direction. So dedicated 230VAC to 5VDC power supply for D1 mini + relay or a relay board based on ESP8266, is only recommandable solution.Ath wrote: ↑25 Oct 2020, 14:08Shelly 1 and 2/2.5 are supported by ESPEasy, they even have their own configuration as they have 2MB of flash, allowing for OTA updates, yay!, but they have exactly the same electrical issues as the Sonoff's, and in this case the manufacturer is even giving warnings for that![]()
Re: Help for Rules for freezer automation & MQTT Import
If you plan on using a standard USB charger as power supply (which should work), make sure not to use an USB cable which is too long as that may result in a voltage drop depending on the current.
Also lots of USB chargers sold do not output a very clean 5V voltage. So better also add a capactor of +/- 220 - 470 uF on the ESP side (at 5V).
Better use capacitors rated for more then 10V as some USB chargers output spikes when the load changes.
Also lots of USB chargers sold do not output a very clean 5V voltage. So better also add a capactor of +/- 220 - 470 uF on the ESP side (at 5V).
Better use capacitors rated for more then 10V as some USB chargers output spikes when the load changes.
Re: Help for Rules for freezer automation & MQTT Import
Thx, evaluating at the moment what i will do.
I like very much having just 1 plug for the freezer. So this means that I have to integrate the 5V power supply in the top of the housing which is not to high but I expect having a 5V 1-2A power supply in a waterproof housing should fit.
This will also mean that the cable length from power supply to the ESP8266 will not be very long e.g. 20cm.
Thinking about using a D1 Mini + Relay Shield or a ESP8266 Relay Board. The relay boards if found so far are mainly for ESP8266-01 which i do not like so much. Biggest issue for relay board is having an additional connection option for the DS18B20. Mainly these boards are only for switching the relays and no spare GPIOs are accessable by free pins of the board.
I like very much having just 1 plug for the freezer. So this means that I have to integrate the 5V power supply in the top of the housing which is not to high but I expect having a 5V 1-2A power supply in a waterproof housing should fit.
This will also mean that the cable length from power supply to the ESP8266 will not be very long e.g. 20cm.
Thinking about using a D1 Mini + Relay Shield or a ESP8266 Relay Board. The relay boards if found so far are mainly for ESP8266-01 which i do not like so much. Biggest issue for relay board is having an additional connection option for the DS18B20. Mainly these boards are only for switching the relays and no spare GPIOs are accessable by free pins of the board.
Re: Help for Rules for freezer automation & MQTT Import
Thinking again about this solution.... According wiki: https://www.letscontrolit.com/wiki/inde ... velControl
This solution is made for e.g. heater but I like to use for freezer so how to influence control set GPIO out to 1 for cooling not for heating?
*Edit: Could answer by myself. Easiest solution is to manipulate the negative temperature valvue inside of the freezer (formula in espeasy) to a positive value.
Last edited by Oetsch on 26 Oct 2020, 07:59, edited 1 time in total.
Re: Help for Rules for freezer automation & MQTT Import
You can also split the switching and temperature measurement over 2 ESP units.
The temperature reading can then be shared among nodes via the ESPEasy p2p layer.
So you'll have a perfect isolation between both.
The temperature reading can then be shared among nodes via the ESPEasy p2p layer.
So you'll have a perfect isolation between both.
Re: Help for Rules for freezer automation & MQTT Import
Thx. With regard to isolation I fully agree.
But for me the difference to the current "emergency solution" is not so big. DS18B20 connected to an ESP8266-01 equipped with ESPEASY and a Shelly PLUG to switch the freezer on/off. Ok for control iobroker in addition has to do the work.
Most discussable for me is the degree of depency to the wifi and in general the degree of independence. Having I ESP-Unit controling the freezer would make it totally independent. It will work even if no wifi is there. In general only the ESP itself has to work. This i like very much and feels for me as good solution to be protected against influences from outside at a high level.
A the moment the emergency solution is working well. Guess the issue in the first night was caused by the time switch (daylight safing time) for one of the involved components. I have ordered some relays for a D1 mini and some external 5V power supplies. This will also take time for delivery. Hope the emergency solution will work stable until end of my journey and then i will go on to implement new hardware and control by espeasy.
Thank you very much for your help and hints!
But for me the difference to the current "emergency solution" is not so big. DS18B20 connected to an ESP8266-01 equipped with ESPEASY and a Shelly PLUG to switch the freezer on/off. Ok for control iobroker in addition has to do the work.
Most discussable for me is the degree of depency to the wifi and in general the degree of independence. Having I ESP-Unit controling the freezer would make it totally independent. It will work even if no wifi is there. In general only the ESP itself has to work. This i like very much and feels for me as good solution to be protected against influences from outside at a high level.
A the moment the emergency solution is working well. Guess the issue in the first night was caused by the time switch (daylight safing time) for one of the involved components. I have ordered some relays for a D1 mini and some external 5V power supplies. This will also take time for delivery. Hope the emergency solution will work stable until end of my journey and then i will go on to implement new hardware and control by espeasy.
Thank you very much for your help and hints!
Who is online
Users browsing this forum: No registered users and 21 guests