I just played a bit around with dzVents to be warned, when one of my smokedetectors triggers - but I can't get it working:
Code: Select all
-- Check if a SmokeDetector has been triggered.
return {
active = true,
on = { "FM *" }, --
execute = function(domoticz, SmokeDetector)
if SmokeDetector.state == "On" then
domoticz.notify("FIRE ALARM: " .. SmokeDetector.name)
end -- if SmokeDetector On
end -- function
}
Code: Select all
2020-02-01 12:11:47.372 (RFLink) Light/Switch (FM Erdgeschoss)
2020-02-01 12:11:47.417 Status: dzVents: Debug: Dumping domoticz data to /home/pi/domoticz/scripts/dzVents/domoticzData.lua
2020-02-01 12:11:47.452 Status: dzVents: Debug: Processing device-adapter for FM Erdgeschoss: Smoke Detector device adapter
2020-02-01 12:11:47.452 Status: dzVents: Debug: Processing device-adapter for FM Erdgeschoss: Switch device adapter
2020-02-01 12:11:47.452 Status: dzVents: Debug: dzVents version: 2.5.5
2020-02-01 12:11:47.452 Status: dzVents: Debug: Event triggers:
2020-02-01 12:11:47.453 Status: dzVents: Debug: - Device: FM Erdgeschoss
2020-02-01 12:12:00.517 Status: dzVents: Debug: Dumping domoticz data to /home/pi/domoticz/scripts/dzVents/domoticzData.lua
2020-02-01 12:12:00.552 Status: dzVents: Debug: Event triggers:
2020-02-01 12:12:00.552 Status: dzVents: Debug: - Timer