KD101 and DzVents error  [Solved]

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

Moderator: leecollings

Post Reply
User avatar
havnegata
Posts: 114
Joined: Wednesday 10 September 2014 11:05
Target OS: Raspberry Pi / ODroid
Domoticz version: V4.10162
Location: Norway
Contact:

KD101 and DzVents error

Post by havnegata »

I'm trying to use my KD101 Smoke Alert sensors in the example alarm script. In Domoticz web gui I'm able to sound the siren by pressing this sensor as a normal switch, but when using it in this script:

Code: Select all

return {

	active = true,

	on = {
		devices = {
			'StueNord_bevegelse' -- Motion sensor
		}
	},

	execute = function(domoticz, device)

		if (detector.state == 'Motion' and domoticz.security ~= domoticz.SECURITY_DISARMED) then
			-- o dear

			-- domoticz.setScene('intruder alert', 'On')
			domoticz.devices('Roykvarsler').switchOn() -- My KD101 Smoke Alert sensor

			-- send notification
			domoticz.notify('Security breach', '',
				domoticz.PRIORITY_EMERGENCY,
				domoticz.SOUND_SIREN)
		end

	end
}
I get this error:
2018-09-10 12:55:02.367 Status: dzVents: Error (2.4.6): Method switchOn is not available for device "Roykvarsler" (deviceType=Security, deviceSubType=KD101 smoke detector). If you believe this is not correct, please report.
User avatar
havnegata
Posts: 114
Joined: Wednesday 10 September 2014 11:05
Target OS: Raspberry Pi / ODroid
Domoticz version: V4.10162
Location: Norway
Contact:

Re: KD101 and DzVents error  [Solved]

Post by havnegata »

Solved it by adding a virtual switch which turns on my Smoke Alert sensor siren
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest