Doorbell notification
Posted: Saturday 22 June 2019 7:54
I automated my doorbell using Fibaro Smart Implant. Hereby the small script i created to send the notification. If you follow the comments it is easy to find out what you need to change to make it work in your installation.
Code: Select all
return {
on = {
devices = {
'Beldrukker' -- change to the name sensor of the doorbell button
},
},
logging = {
level = domoticz.LOG_DEBUG, -- Adjust loglevel to your needs
marker = 'Deurbel' -- Ajust logmarker yo your needs
},
execute = function(domoticz, device)
-- debugging
domoticz.log('Device ' .. device.name .. ' was changed to'..device.state, domoticz.LOG_DEBUG)
if (device.active) then
-- debug
domoticz.log("button was pushed, sending notification",domoticz.LOG_INFO)
-- notify the user
domoticz.notify("Deurbel","Er staat iemand voor de deur....",domoticz.PRIORITY_HIGH) -- adjust message to you needs
else
-- debug
domoticz.log("button was released, do nothig...",domoticz.LOG_DEBUG)
end
end
}