Page 1 of 1
Switch off smoke detector FA20RF
Posted: Sunday 21 October 2018 11:18
by jandirkv
Hallo,
I have a FA20RF smoke detector Setup in Domoticz as 'smoke detector' device. When I activate the switch the FA20RF starts beeping. or with dzvents code
Code: Select all
domoticz.devices('Rookmelder hal').switchOn()
Somehow I can not turn it off anymore. I tried the following lines.
Code: Select all
domoticz.devices('Rookmelder hal').switchOff()
I can turn it off by pressing the reset button in domoticz in the switches panel. So I tried
Code: Select all
domoticz.devices('Rookmelder hal').reset()code]
and
[code]domoticz.devices('Rookmelder hal').state == 'reset'
and
Code: Select all
domoticz.devices('Rookmelder hal').state = reset
Also my smoke detector does not always respond to the 'On' action of my RFlink which is a few feet Away from my smoke detector. If it started beeping is responds only after a while again on the 'On' Command.
Has anyone succefully integrated his smoke detectors??
Re: Switch off smoke detector FA20RF
Posted: Sunday 21 October 2018 14:26
by waaren
jandirkv wrote: ↑Sunday 21 October 2018 11:18
Hallo,
I have a FA20RF smoke detector Setup in Domoticz as 'smoke detector' device. When I activate the switch the FA20RF starts beeping. or with dzvents code
Code: Select all
domoticz.devices('Rookmelder hal').switchOn()
Somehow I can not turn it off anymore.
There is no device-adapter for the switchType smokeDetector defined in dzVents yet. Until then you can use this dzVents script to reset the state of a smoke detector.
Code: Select all
return {
on = { timer = { "every minute"}},
logging = { level = domoticz.LOG_DEBUG,
marker = "reset Security" },
execute = function(dz)
mySmokeDetector = 1107 -- Change this to the idx of your smokeDetector
local function resetSmokeDetector(idx)
local url = dz.settings['Domoticz url'] ..
"/json.htm?type=command¶m=resetsecuritystatus&idx=" ..
idx ..
"&switchcmd=Normal"
dz.openURL(url)
end
resetSmokeDetector(mySmokeDetector)
end
}
Also my smoke detector does not always respond to the 'On' action of my RFlink which is a few feet Away from my smoke detector. If it started beeping is responds only after a while again on the 'On' Command.
Has anyone succefully integrated his smoke detectors??
If the RFlink sends the commands like normal there is probably not much domoticz can do to influence this behavior.
Re: Switch off smoke detector FA20RF
Posted: Sunday 21 October 2018 19:49
by waaren
Send you a PM
Re: Switch off smoke detector FA20RF
Posted: Saturday 27 October 2018 14:48
by sincze
jandirkv wrote: ↑Sunday 21 October 2018 11:18
Also my smoke detector does not always respond to the 'On' action of my RFlink which is a few feet Away from my smoke detector. If it started beeping is responds only after a while again on the 'On' Command.
Has anyone succefully integrated his smoke detectors??
Correct, had the issue while pairing. Have to send the command multiple times to trigger the device with RFLINK.
As i don't have DZvents enabled at my parents home I had to dust off the old LUA skills.
Code: Select all
if ( ((devicechanged['Melder 1'] == 'On') or
(devicechanged['Melder 2'] == 'On') or
(devicechanged['Melder 3'] == 'On') ) and (uservariables["Brandalarm"] == 'False') )
then
print('<font color="red">### Brandalarm.</font>')
os.execute (notify_telegrambot)
if (otherdevices['Melder 1'] ~= 'On') then commandArray['Melder 1']="On FOR 4 SECONDS REPEAT 3 INTERVAL 4 SECONDS" end -- Woonkamer
if (otherdevices['Melder 2'] ~= 'On') then commandArray['Melder 2']="On FOR 4 SECONDS REPEAT 3 INTERVAL 4 SECONDS" end -- Overloop
if (otherdevices['Melder 3'] ~= 'On') then commandArray['Melder 3']="On FOR 4 SECONDS REPEAT 3 INTERVAL 4 SECONDS" end -- Zolder
commandArray['Variable:Brandalarm']=tostring('True')
elseif ((devicechanged['Melder 1'] == 'Off') or
(devicechanged['Melder 2'] == 'Off') or
(devicechanged['Melder 3'] == 'Off') )
then
if (otherdevices['Melder 1'] ~= 'Off') then commandArray['Melder 1']="Off" end -- Woonkamer
if (otherdevices['Melder 2'] ~= 'Off') then commandArray['Melder 2']="Off" end -- Overloop
if (otherdevices['Melder 3'] ~= 'Off') then commandArray['Melder 3']="Off" end -- Zolder
commandArray['Variable:Brandalarm']=tostring('False')
end
Re: Switch off smoke detector FA20RF
Posted: Saturday 06 July 2019 11:22
by pvklink
Is there a function in the meantime in dzvents to set the reset of a smope detector. After my alarm went of i automaticly want to reset it when pushing the all alarm button (radio, light etc.)
otherwise i use the workaround
Re: Switch off smoke detector FA20RF
Posted: Saturday 06 July 2019 23:30
by waaren
pvklink wrote: ↑Saturday 06 July 2019 11:22
Is there a function in the meantime in dzvents to set the reset of a smope detector. After my alarm went of i automaticly want to reset it when pushing the all alarm button (radio, light etc.)
otherwise i use the workaround
The device-adapter is created but after I asked Jan Dirk to test it he never replied and he does not seem to be active any longer on this forum.
If you want to test the device-adapter. Here it is. Just save it as <domoticz dir>/dzVents/runtime/device-adapters/smokeDetector_device.lua and control your smoke detector with methods activate() and reset()
Code: Select all
return {
baseType = 'device',
name = 'Smoke Detector device adapter',
matches = function (device, adapterManager)
local res = device.switchType == 'Smoke Detector'
adapterManager.addDummyMethod(device, 'activate')
adapterManager.addDummyMethod(device, 'reset')
return res
end,
process = function (device, data, domoticz, utils, adapterManager)
if (device.switchType == 'Smoke Detector') then
function device.reset()
local url
url = domoticz.settings['Domoticz url'] ..
"/json.htm?type=command¶m=resetsecuritystatus&idx=" ..
device.id ..
"&switchcmd=Normal"
return domoticz.openURL(url)
end
function device.activate()
local TimedCommand = require('TimedCommand')
return TimedCommand(domoticz, device.name, 'On', 'device', device.state)
end
end
end
}
Re: Switch off smoke detector FA20RF
Posted: Sunday 07 July 2019 9:20
by pvklink
Ok, i will test it and give feedback!
Re: Switch off smoke detector FA20RF
Posted: Sunday 07 July 2019 9:45
by pvklink
OK, did it..
added the file on
<domoticz dir>/dzVents/runtime/device-adapters/smokeDetector_device.lua
Made a test file with
....
dz.devices('smoke_trap').reset() -- reset smoke detectors
dz.devices('smoke_hal').reset() -- reset smoke detectors
globalMessage(add, ' smoke devices gereset',logcode) -- write to logs
globalMessage(chg) -- dump
error (probl. did something wrong.
2019-07-07 09:41:12.104 Error: dzVents: Error: (2.4.24) An error occurred when calling event handler OFF_DZ_test_msg
2019-07-07 09:41:12.104 Error: dzVents: Error: (2.4.24) ...cz/scripts/dzVents/generated_scripts/OFF_DZ_test_msg.lua:41: attempt to call field 'reset' (a nil value)
2019-07-07 09:41:14.114 (zwavepluspvk) General/kWh (buro_kwh)
2
Re: Switch off smoke detector FA20RF [Solved]
Posted: Sunday 07 July 2019 11:33
by waaren
pvklink wrote: ↑Sunday 07 July 2019 9:45
OK, did it..
added the file on
<domoticz dir>/dzVents/runtime/device-adapters/smokeDetector_device.lua
Made a test file with
....
dz.devices('smoke_trap').reset() -- reset smoke detectors
dz.devices('smoke_hal').reset() -- reset smoke detectors
globalMessage(add, ' smoke devices gereset',logcode) -- write to logs
globalMessage(chg) -- dump
error (probl. did something wrong.
2019-07-07 09:41:12.104 Error: dzVents: Error: (2.4.24) An error occurred when calling event handler OFF_DZ_test_msg
2019-07-07 09:41:12.104 Error: dzVents: Error: (2.4.24) ...cz/scripts/dzVents/generated_scripts/OFF_DZ_test_msg.lua:41: attempt to call field 'reset' (a nil value)
2019-07-07 09:41:14.114 (zwavepluspvk) General/kWh (buro_kwh)
2
Send a PM