Refrigerator Temperature Sensors


( ) #1

Hey guys!

I want to quickly share my solution for fridge temperature measurement. This is quite helpful to observe temperature changes and e.g. adapt the fridge settings. According to the German Verbraucherzentrale the fridge should operate at 7°C and the freezer at -18°C. For more details also see https://en.wikipedia.org/wiki/Refrigerator#Temperature_zones_and_ratings

My solution ends in this Basic UI view:

grafik

It is based on a Sonoff Basic and two DS18B20 sensors. I will not go into configuration details now, because all of this has already been discussed in other places. See:

I chose this solution at the time because (1) I had a Sonoff lying around and (2) it was a quite cheap and quickly set up solution. The big disadvantage is of course the need for an external power supply. How I solved this issue can be seen in the pictures below. In the fridge part I was able to go through the “dripping hole” in the back, in the freezer part I had to go through the door insulation. With proper preparation this method seems to work without issues or leakage.

Sonoff Basic Solution Pictures

Wireless and Battery-powered Solutions

The solution above is fun but what you really want is a battery-powered radio transmitting device with a temperature sensor.

Mi Flora

One especially clever solution I’d go for nowadays is to abuse the Xiaomi Mi Flora Plant Sensor. Yes it’s supposed to gather data from a plant but the temperature (and light) sensor also work without being stuck in soil :wink: See here for more: Xiaomi Mi Flora Plant Sensor MQTT Client/Daemon

openHAB Rule for Temperature Summary

A simple rule is responsible for the Basic UI Sitemap view as seen above:

rule "Fridge Summary"
when
    Item Kitchen_Fridge_TempCooling changed or
    Item Kitchen_Fridge_TempFreezer changed
then
    Kitchen_Fridge_TempSummary.postUpdate(
        String::format("%s °C / %s °C",
            Kitchen_Fridge_TempCooling.state, Kitchen_Fridge_TempFreezer.state
        )
    )
end

(Jonas Neumann) #2

I’ve seen people using the Jeelink binding - if one wants to check multiple locations (s)he should check that out as well.


( ) #3

You mean like so? https://www.frombeyond.de/2017/openhab-jeelink-einrichten-lacrosse
Sounds intersting but be aware that an additional transceiver is required. Please feel free to add the option above (the post is a wiki article, everyone can add content).


(Mos Branca) #4

Hello,
I’m using a sonoff basic to monitorize the temperetures of my fridge and freezer. All works well. Then I’ve made the following declarations:

Rules file:


rule "Fridge Summary"
when
    Item SonoffBasic1_Temp1 changed or
    Item SonoffBasic1_Temp2 changed
then
    Fridge_TempSummary.postUpdate(
        String::format("%s °C / %s °C", SonoffBasic1_Temp1.state, SonoffBasic1_Temp2.state)
    )
end

Items file:

String Fridge_TempSummary "Temperature Frigo" <temperature>

Number SonoffBasic1_Temp1  "Frigo [%.1f °C]" <temperature> (gSnf_basic1_sensors,gTempFrigo,gChart_Frigo)
	{mqtt="<[broker:tele/sonoff_basic1/SENSOR:state:JSONPATH($.AM2301-03.Temperature)]"} 

Number SonoffBasic1_Temp2  "Freezer [%.1f °C]" <snow> (gSnf_basic1_sensors,gChart_Frigo)
	{mqtt="<[broker:tele/sonoff_basic1/SENSOR:state:JSONPATH($.AM2301-14.Temperature)]"} 

Sitemap file:

Text item=Fridge_TempSummary 

In the log file I find:

    2018-08-18 17:03:53.863 [vent.ItemStateChangedEvent] - Fridge_TempSummary changed from 10.5 °C / -12.0 °C to 10.6 °C / -12.1 °C

But also if I’ve refreshed the web page, there is no values (look at the image):
Cattura

May you help me please? Where I’m getting wrong?


(Mos Branca) #5

Ok, I’ve solved the issue on my self!
The error was in the declaration in the sitemap file: I didn’t put the label with the relative format…

Solution:
In the sitemap file

Text item=Fridge_TempSummary label="Frigo [%s]"

bye! :slight_smile:


(Daan Lindeman) #6

Thank you I use code did not know that it could. but how do I finish the numbers?

koelkast