Page 1 of 1

KD101 and DzVents error

Posted: Monday 10 September 2018 13:19
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.

Re: KD101 and DzVents error  [Solved]

Posted: Monday 10 September 2018 15:39
by havnegata
Solved it by adding a virtual switch which turns on my Smoke Alert sensor siren