Page 1 of 1

Can't get a easy dzVents Script working

Posted: Saturday 01 February 2020 12:14
by Extremo
Hi Guys

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
}
The name of my Smoke Detectos are starts always with "FM LocationName". They are set as active devices and set to smokedetector, also I changed the dzVents settings to log all and I get this output:

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
Does someone have a idea, what I did wrong?

Re: Can't get a easy dzVents Script working  [Solved]

Posted: Saturday 01 February 2020 12:56
by boum
First thing is to change:

Code: Select all

on = { "FM *" },
To:

Code: Select all

on = { devices = { "FM *" } },
Documentation is hereĀ  https://www.domoticz.com/wiki/DzVents:_ ... 8837.2B.29

then there may be some other issues with the script. Add some domoticz.log messages to check values of the things you test.

HTH

Re: Can't get a easy dzVents Script working

Posted: Saturday 01 February 2020 13:04
by Extremo
Can I get a "shame" "shame" "shame" for me? It works now, thanks for pointing me on that dumb mistake!