smart BBQ thermometer

Easy to use, 100% Lua-based event scripting framework.

Moderator: leecollings

Post Reply
megamarco83
Posts: 108
Joined: Friday 21 September 2018 15:07
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

smart BBQ thermometer

Post by megamarco83 »

hi, i would like to create a smart bbq thermometer and use Domoticz to receive notification when the sensor reach the target.
i have 4 temperature sensor to monitor and i created 4 setpoint to set the target temperature. (inside scripts now there are only 3)
i would like to receive (when reach the target) 3 notifications in the first minute....then after 2 minute i would like to receive again just one notification.

first of all i try to use the temperature sensor notification but, in this case i can set only one notification when the condition of temperature set are been met.

so i try with dzvent:

Code: Select all

-- script for smart BBQ thermometer with 4 probes
local scriptVar = 'BBQ TERMOMETER'

return
{
    on = 
    { 
        timer = 
        {
           -- 'at 07:30',
            --'at 09:00',
        },
         devices    =   {    'Carne1_BBQ',  'Carne2_BBQ', 'Carne3_BBQ'  -- temperature
                                             },
    },

    logging =   
    {
        level = domoticz.LOG_DEBUG, -- set to LOG_ERROR when tested and OK and domoticz.LOG_DEBUG when debug
    },
       
    execute = function(dz, item)
        
        local measuredTemp1 = dz.utils.round(dz.devices('Carne1_BBQ').temperature,1) 
        local measuredTemp2 = dz.utils.round(dz.devices('Carne2_BBQ').temperature,1)
        local measuredTemp3 = dz.utils.round(dz.devices('Carne3_BBQ').temperature,1)
        local flapPrevention = 0.2
        local offTemperature1 = measuredTemp1 - flapPrevention
        local offTemperature2 = measuredTemp2 - flapPrevention
        local offTemperature3 = measuredTemp3 - flapPrevention
        local setPoint1    = dz.devices("Target1_BBQ").setPoint
        local setPoint2    = dz.devices("Target2_BBQ").setPoint
        local setPoint3    = dz.devices("Target3_BBQ").setPoint
        
        _G.moduleLabel = _G.moduleLabel or scriptVar
        _G.logMarker =  _G.moduleLabel               -- set logmarker to scriptname (dzVents >= 2.4.29) 
         
        
        if offTemperature1 >= setPoint1 then 
           dz.notify('BBQ TERMOMETER. ',item.name .. ' SENSORE1 => done at ', item.value .. '°C', dz.PRIORITY_NORMAL,dz.SOUND_DEFAULT, '' , dz.NSS_HTTP)
        end
        
        if offTemperature2 >= setPoint2 then 
           dz.notify('BBQ TERMOMETER. ',item.name .. ' SENSORE2 => done at ', item.value .. '°C', dz.PRIORITY_NORMAL,dz.SOUND_DEFAULT, '' , dz.NSS_HTTP)
        end
        
        if offTemperature3 >= setPoint3 then 
           dz.notify('BBQ TERMOMETER. ',item.name .. ' SENSORE3 => done at ', item.value .. '°C', dz.PRIORITY_NORMAL,dz.SOUND_DEFAULT, '' , dz.NSS_HTTP)
        end
        
    end
}
this script has two issue:
1) not succed on set the notification that i would like to have: 3 notifications in the first minute, then after 2 minute,just one notification (the last one)
2) using the script above, it is triggered every time that the sensors change their status, so when they are above the setpoint target they continue to send me a notification without stopping....

thanks
Gerwin
Posts: 84
Joined: Friday 12 August 2016 13:08
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: smart BBQ thermometer

Post by Gerwin »

hello,
i have something like this in blockly with a dummy switch thats works as a timer ,and the switch temperatuur meldingen gives me a notification
maybe helps you this the right way
temp.jpg
temp.jpg (80.27 KiB) Viewed 486 times
Gerwin
megamarco83
Posts: 108
Joined: Friday 21 September 2018 15:07
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: smart BBQ thermometer

Post by megamarco83 »

Gerwin wrote: Friday 30 July 2021 9:26 hello,
i have something like this in blockly with a dummy switch thats works as a timer ,and the switch temperatuur meldingen gives me a notification
maybe helps you this the right waytemp.jpg
Gerwin
sorry but what is "temperatuur meldingen that you set for 1minute and temperature melder that you set for 10 minute?
what kind of device are?
what are supposed to do?
the haim of my script is to have notification (i thought to telegram notification) that will arrive 3 times in un minute, and after 2minutes the last one
Gerwin
Posts: 84
Joined: Friday 12 August 2016 13:08
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: smart BBQ thermometer

Post by Gerwin »

hello ,
i have a shelly1 with temperature probe ,
the switch temperatuur meldingen aan/uit is a dummy swich that i can put on and off ,if i dont need notifications i put this one off.
the switch temperatuur melder is a dummy i use as a timer so i get every 10 minutes a notification .
the switch temperatuur meldingen is also a dummy that gives me a notification that the temperature is above the set temperature .(22)

Gerwin
Post Reply

Who is online

Users browsing this forum: Doler and 1 guest