Need code for Aeon Labs ZW080-A17 Siren

Well thats cool,

If you get it working properly can you post your items definition so we can see what habmin created?

I didn’t think of that. Makes sense though.

I don’t have it working, I just play around with the setting in the zwave binding / device.
Not sure how I can create items from there on. Sorry, I’m new to this all… :blush:

1 Like

What zwave and OH version are you using?

Openhab 1.8.3 and habmin 0.1.4 snapshot (?), and a zwave usbstick GEN5.

So i switched to try this,

Number sound5 "Upper Siren" (gSirens,persist) {zwave="12:command=configuration,parameter=37,value1=5"}

and still get the no converter found message no matter what i use. “NODE 12: No converter found for item = sound0(NumberItem), endpoint = 0, ignoring event.”

none of this seems to work either - https://github.com/openhab/openhab/issues/2082

currently testing:

Number sound0 "Siren Sound [%d]" (gSirens,persist) {zwave="12:command=configuration,parameter=37"}

and

Selection item=sound0 mappings=[1="1",2="2",3="3",4="4",5="5",]

no love… just results in “No converter found for item = sound0(NumberItem), endpoint = 0, ignoring event.”

Dam you chris! you knew the answer all along… lol

I got it working!! Takes a little brain work and a hex to dec converter lol

http://www.binaryhexconverter.com/hex-to-decimal-converter

Ok guys, here’s what i did. Clean it up for your own personal use… FYI GEN2 and GEN5 sirens have 5 sounds…

Items: (self explanatory)

Number Siren1SoundSet "Upper Siren Sound [%d]" (persist)
Number Siren2SoundSet "Lower Siren Sound [%d]" (persist)
Number Siren1Sound "Upper Siren Sound [%d]" (persist) {zwave="12:command=configuration,parameter=37"}
Number Siren2Sound "Lower Siren Sound [%d]" (persist) {zwave="5:command=configuration,parameter=37"}

Sitemap: (Decimal values for all 5 sounds at highest volume)

Selection item=Siren1SoundSet mappings=[259="Sound1",515="Sound2",771="Sound3",1027="Sound4",1283="Sound5",]
Selection item=Siren2SoundSet mappings=[259="Sound1",515="Sound2",771="Sound3",1027="Sound4",1283="Sound5",]

Rules: (use a rule to add the off command because when you set a new sound it activates the siren. This stops it)

// Set siren 1 sound
rule "SetUpperSirenSound"
when
    Item Siren1SoundSet received command
then
    Siren1Sound.sendCommand(receivedCommand)
    Upper_Hall_Siren_Switch.sendCommand(OFF)
    logInfo("SIREN", "Updated Upper Siren Sound")
end




// Set siren 2 sound
rule "SetLowerSirenSound"
when
    Item Siren2SoundSet received command
then
    Siren2Sound.sendCommand(receivedCommand)
    Lower_Kitchen_Siren_Switch.sendCommand(OFF)
    logInfo("SIREN", "Updated Lower Siren Sound")
end

For alarm systems, instead of using the siren “ON” command, just build and link to the above commands to play your favorite sound based on the problem. IE sound 1 for alarm, sound 2 for your smoke detectors etc… Doing it this way youll only need items and rules. No sitemap unless you want to…

Here’s what i just changed mine to:

Items:

/* Aeon Labs Siren - set sound and activate*/
Number Lower_Kitchen_Siren_Number "Kitchen Siren" <siren> (persist,gAllSirensSet) { zwave="5:command=configuration,parameter=37" }
Number Upper_Hall_Siren_Number "Upper Hall Siren" <siren> (persist,gAllSirensSet) { zwave="12:command=configuration,parameter=37" }

/* Aeon Labs Siren - switch to turn off sirens*/
Switch Lower_Kitchen_Siren_Switch "Kitchen Siren" <siren> (persist,gAllSirensSwitch) { zwave="5:command=switch_binary" }
Switch Upper_Hall_Siren_Switch "Upper Hall Siren" <siren> (persist,gAllSirensSwitch) { zwave="12:command=switch_binary" }

Rules:

// Alarm System Active Action
rule "rAlarmActivated"
when
    Item gMotionSensors changed from CLOSED to OPEN or
    Item gDoorSensors changed from CLOSED to OPEN
then
 {
    if (AlarmSysStatus.state == 2 && gMotionSensors.state == OPEN)
        {
        logInfo("Security", "SECURITY: ARMED-AWAY Motion Intrusion Detected!")
        gAllLights.sendCommand(ON)
        Thread::sleep(3000)
        gAllSirensSet.sendCommand(259)
        Thread::sleep(1200000)
        gAllSirensSwitch.sendCommand(OFF)
        }
    if (AlarmSysStatus.state == 2 && gDoorSensors.state == OPEN)
        {
        logInfo("Security", "SECURITY: ARMED-AWAY Door Intrusion Detected!")
        gAllLights.sendCommand(ON)
        Thread::sleep(3000)
        gAllSirensSet.sendCommand(259)
        Thread::sleep(1200000)
        gAllSirensSwitch.sendCommand(OFF)
        }
    if (AlarmSysStatus.state == 3 && gDoorSensors.state == OPEN)
        {
        logInfo("Security", "SECURITY: ARMED-STAY Door Intrusion Detected!")
        gAllLights.sendCommand(ON)
        Thread::sleep(3000)
        gAllSirensSet.sendCommand(259)
        Thread::sleep(1200000)
        gAllSirensSwitch.sendCommand(OFF)
        }
}}}}
end

Sitemap:
None:

Based on your rules, I’ve created a small testing setup for ALL sounds/volumes. :wink:

items:

Switch Siren01 	"House Sirene [%d]" (persist) <fire> {zwave="10:command=SWITCH_BINARY}
Number Siren01_Set 	"House Sirene [%d]" (persist) <fire>
Number Siren01_Sound	"House Sirene [%d]" (persist) <fire> {zwave="10:command=configuration,parameter=37"}

sitemap:
> Selection item=Siren01_Set mappings=[259="1Max",515="2Max",771="3Max",1027="4Max",1283="5Max",258="1Mid",514="2Mid",770="3Mid",1026="4Mid",1282="5Mid",257="1Low",513="2Low",769="3Low",1025="4Low",1281="5Low"]

rule

rule "Siren01ChangeSound"
when
    Item Siren01_Set received command
then
     Thread::sleep(5000)
    Siren01_Sound.sendCommand(receivedCommand)
    Siren01.sendCommand(OFF)
    logInfo("SIREN", "Updated Siren Sound")
end
1 Like

Nice work! :wink:

What are you trying to do with the “Thread::sleep(5000)” ?

as it’s kinda outta place…

I think you are trying to do this, so you can “feel” or extend the sound…

rule "Siren01ChangeSound"
when
    Item Siren01_Set received command
then
    Siren01_Sound.sendCommand(receivedCommand)
    Thread::sleep(5000)
    Siren01.sendCommand(OFF)
    logInfo("SIREN", "Updated Siren Sound")
end

out of interest, does Thread::sleep just sleep the rule that called it, or does it sleep all of openHAB? In other words, if another rule is triggered 2.5 seconds into this rule, will it run or not?

thanks,

Dan

Hi Dan,

Just that rule for the number of milliseconds you set, ie (5000) = 5 seconds.

thank you!

Anytime Sir!

:slight_smile: Glad it’s working - feel free to hassle me again one day for OH2 as this will also need a small amount of work to be usable in rules in OH2 (not too much though thankfully).

I finally had the liberty to test the sounds, and it’s working!
And indeed, the 5sec rule was a bit obsolete, this gave some weird situations when you changed the parameter to test the sounds. You didn’t cleary hear the sound since it stops in between. So I removed it.
I’ve also changed the descriptions so it would better fit in the dropdown

So with this config, you can test the sounds by your phone:

  1. A dropdown to select the sounds
  2. A button to start / stop the sound

items:

Switch Siren01 	"House Sirene [%d]" (persist) <fire> {zwave="10:command=SWITCH_BINARY}
Number Siren01_Set 	"House Sirene [%d]" (persist) <fire>
Number Siren01_Sound	"House Sirene [%d]" (persist) <fire> {zwave="10:command=configuration,parameter=37"}

sitemap:

Selection item=Siren01_Set mappings=[259=“1Max”,515=“2Max”,771=“3Max”,1027=“4Max”,1283=“5Max”,258=“1Mid”,514=“2Mid”,770=“3Mid”,1026=“4Mid”,1282=“5Mid”,257=“1Low”,513=“2Low”,769=“3Low”,1025=“4Low”,1281=“5Low”]

rule

rule "Siren01ChangeSound"
when
    Item Siren01_Set received command
then
    Siren01_Sound.sendCommand(receivedCommand)
    Siren01.sendCommand(OFF)
    logInfo("SIREN", "Updated Siren Sound")
end