rzwaveway: controlling a siren & strobe alarm
Finally "back to work" and trying to finalize a first fully working version of my home alarm system... I am now looking at how to use my alarm device, a "FortrezZ strobe and alarm" ZWave device. I added a small extension to the rzwaveway library for that matter.
It is a simple interface for controlling the state of the alarm and enabling or disabling the strobe light and siren.
Small note: While playing with the siren... better prepare a simple Bash script for enabling/disabling :-) for instance:
where XXX is the ID of your device
It is a simple interface for controlling the state of the alarm and enabling or disabling the strobe light and siren.
zway = RZWaveWay::ZWay.instance
zway.setup(hostname)
zway.start
device = RZWaveWay::Extensions::SSASirenStrobeAlarm.new(device_id)
device.enable_strobe
sleep 5
device.enable_siren
sleep 5
device.disable
Unfortunately it seems that the "SetWithDuration" function of the SwitchMultiLevel command class does not work (at least from the Z-Wave Me web UI). I guess it would have helped to implement a "pre-alarm warning" (e.g. some short bips to notify when the alarm is armed). The best solution I could find so far to implement this is to do the following:
BIP_DURATION=1
BIP_INTERVAL=2
def bip
@device.enable_siren
sleep BIP_DURATION
@device.disable
sleep BIP_INTERVAL
end
def test
bip
bip
bip
bip
bip
bip
end
Small note: While playing with the siren... better prepare a simple Bash script for enabling/disabling :-) for instance:
# disable
curl -v -XGET "http://:8083/ZWaveAPI/Run/devices%5BXXX%5D.instances%5B0%5D.commandClasses%5B38%5D.Set(0)"
where XXX is the ID of your device
Comments
Post a Comment