Fairly new to Domoticz. Just come from Telldus Net. Liking Domoticz!
Anyway, I'm trying to achieve the following:
If the freezer door is open for over 1 minute (60sec), do an action, say doorbell.
If door is closed before 1 minute, do nothing.
I can do a simple blocky, but this triggers after one minute regardless, even if the door is closed before the minute is up
Some pointers would be much appreciated.
Freezer door alarm
Moderator: leecollings
-
- Posts: 8
- Joined: Thursday 10 December 2015 9:05
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Freezer door alarm
Domoticz | RPi2 | RFXCom 433 | Nexa switches, dimmers, doorbell |
- Egregius
- Posts: 2592
- Joined: Thursday 09 April 2015 12:19
- Target OS: Linux
- Domoticz version: v2024.7
- Location: Beitem, BE
- Contact:
Re: Freezer door alarm
You need a script that both checks the status of the switch and the last timestamp.
In my php cron script it would be as easy as:
In my php cron script it would be as easy as:
Code: Select all
if($Sfreezer == 'Open' && $STfreezer < $time - 60) Switch($SIdoorbell, 'On');
-
- Posts: 518
- Joined: Friday 12 July 2013 18:13
- Target OS: -
- Domoticz version:
- Location: Netherlands
- Contact:
Re: Freezer door alarm
Or use this sensor https://www.m.nu/temperatursensor-kylfr ... -1391.html
You can raise an alarm if the temperature becomes above x degrees.
New freezers with a deicing function and blow at regular intervals for a short period hot air in the freezer. Wrap some plastic foam around the sensor to avoid false warnings.
You can raise an alarm if the temperature becomes above x degrees.
New freezers with a deicing function and blow at regular intervals for a short period hot air in the freezer. Wrap some plastic foam around the sensor to avoid false warnings.
RFX-433, RFX-433EMC, RFX-868
-
- Posts: 8
- Joined: Thursday 10 December 2015 9:05
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Freezer door alarm
Egregius, Not there yet with scripting, but see the idea with timestamps.
b_weijenberg, have tried this. Works ok and might go back to this solution. however, would like to try with a magnet switch.
I suppose this wont work? (Not at home to test atm)
b_weijenberg, have tried this. Works ok and might go back to this solution. however, would like to try with a magnet switch.
I suppose this wont work? (Not at home to test atm)
Domoticz | RPi2 | RFXCom 433 | Nexa switches, dimmers, doorbell |
-
- Posts: 890
- Joined: Tuesday 30 September 2014 8:49
- Target OS: Linux
- Domoticz version: beta
- Location: The Netherlands
- Contact:
Re: Freezer door alarm
That won't work, the 'AFTER 60 seconds' cannot be reset. If it is triggered, it will always be triggered.no66 wrote:Egregius, Not there yet with scripting, but see the idea with timestamps.
b_weijenberg, have tried this. Works ok and might go back to this solution. however, would like to try with a magnet switch.
I suppose this wont work? (Not at home to test atm)
However, this Lua script: http://domoticz.com/wiki/Event_script_e ... 10_minutes is exactly what you are looking for

The 'Open' may need changing in to 'On' or so, depends on the sensor you are using. Just look in the switch log of Domoticz what kind of signal the sensor produces when it is opened/closed.
I am not active on this forum anymore.
-
- Posts: 230
- Joined: Friday 03 April 2015 20:44
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Germany (near dutch border)
- Contact:
Re: Freezer door alarm
Hi Ive made a check of the freezer which sends me a notification to my phone when its above -10 degrees, works like a charm. Ive put a simple Cresta sensor in the freezer.
Freezertimer is a dummy switch which shuts off after 10 minutes
Happy to share
Cheers. Hans
Freezertimer is a dummy switch which shuts off after 10 minutes
Happy to share
Cheers. Hans
Code: Select all
--script_device_sensorFreez.lua
local sensorFreezer = 'Freezer Temp' --name of the sensor that gets created when you add the Cresta device (and that contains multiple values like temperature, humidity, barometer etc)
commandArray = {}
if devicechanged[sensorFreezer] then
sFreezerTemp, sFreezerHumidity, sFreezerPressure = otherdevices_svalues[sensorFreezer]:match("([^;]+);([^;]+);([^;]+)")
sFreezerTemp = tonumber(sFreezerTemp)
--commandArray['UpdateDevice'] = idx .. '|0|' .. tostring(sFreezerTemp)
print('Freezer Temperature is ' .. sFreezerTemp)
FreezerAlarmText = "Freezer temperature is above -10 degrees, please check the device."
FreezerAlarmURLtext = string.gsub( FreezerAlarmText, " ", "%%20")
if(tonumber(sFreezerTemp) > -10.0 ) and (otherdevices['FreezerTimer'] == 'Off') then
commandArray['OpenURL']='https://autoremotejoaomgcd.appspot.com/sendnotification?key=XXXXXXXXX--OhaJQBEbHld-eG1DjwC-Srt9miElajPslmlvYTno7MlRfy12WkDPgeM0KpPycN2XNjBMv0PT3MIWcBWrAlmOsQUK3Og5H_ptGCl7v26zlDdIkSsNnc33HQeYb_D1GOrpoaNFj9xP-bR0XHD7Cn-5XcJtUIh8sw&title=Message%20of%20the%20house&text='..FreezerAlarmURLtext..'&url=XXXXXXXXXXX.myfritz.net:8080'
commandArray['FreezerTimer']='On'
print('-- ' .. FreezerAlarmText )
end
end
return commandArray
-
- Posts: 8
- Joined: Thursday 10 December 2015 9:05
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Freezer door alarm
Thanks guys. Will have a good look at this.
Domoticz | RPi2 | RFXCom 433 | Nexa switches, dimmers, doorbell |
Who is online
Users browsing this forum: No registered users and 1 guest