DLINK DCH-Z510 Siren

A Device type specifically for the DLink DCH-Z510 which i did not realise was a re-badged Philio PSE02 Siren.

2 Likes

Just updated to fix issues when using with Smart Alarm. I have also added the option to set the default sound for the siren

1 Like

Hi, interested in this one, but seems i cannot make it work.
However the siren Works great With the Aeon Handler:

"
/**

  • Copyright 2015 SmartThings

  • Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except

  • in compliance with the License. You may obtain a copy of the License at:

  •  http://www.apache.org/licenses/LICENSE-2.0
    
  • Unless required by applicable law or agreed to in writing, software distributed under the License is distributed

  • on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License

  • for the specific language governing permissions and limitations under the License.

  • Aeon Siren

  • Author: SmartThings

  • Date: 2014-07-15
    */
    metadata {
    definition (name: “Aeon Siren”, namespace: “smartthings”, author: “SmartThings”) {
    capability "Actuator"
    capability "Alarm"
    capability “Switch”

    command “test”

    fingerprint deviceId: “0x1005”, inClusters: “0x5E,0x98”
    }

simulator {
// reply messages
reply “9881002001FF,9881002002”: "command: 9881, payload: 002003FF"
reply “988100200100,9881002002”: "command: 9881, payload: 00200300"
reply “9881002001FF,delay 3000,988100200100,9881002002”: “command: 9881, payload: 00200300”
}

tiles(scale: 2) {
multiAttributeTile(name:“alarm”, type: “generic”, width: 6, height: 4){
tileAttribute (“device.alarm”, key: “PRIMARY_CONTROL”) {
attributeState “off”, label:‘off’, action:‘alarm.siren’, icon:“st.alarm.alarm.alarm”, backgroundColor:"#ffffff"
attributeState “both”, label:‘alarm!’, action:‘alarm.off’, icon:“st.alarm.alarm.alarm”, backgroundColor:"#e86d13"
}
}
standardTile(“test”, “device.alarm”, inactiveLabel: false, decoration: “flat”, width: 2, height: 2) {
state “default”, label:’’, action:“test”, icon:“st.secondary.test”
}
standardTile(“off”, “device.alarm”, inactiveLabel: false, decoration: “flat”, width: 2, height: 2) {
state “default”, label:’’, action:“alarm.off”, icon:“st.secondary.off”
}

preferences {
	input "sound", "number", title: "Siren sound (1-5)", defaultValue: 1, required: true//, displayDuringSetup: true  // don't display during setup until defaultValue is shown
	input "volume", "number", title: "Volume (1-3)", defaultValue: 3, required: true//, displayDuringSetup: true
}

main "alarm"
details(["alarm", "test", "off"])

}
}

def updated() {
if(!state.sound) state.sound = 1
if(!state.volume) state.volume = 3

log.debug "settings: ${settings.inspect()}, state: ${state.inspect()}"

Short sound = (settings.sound as Short) ?: 1
Short volume = (settings.volume as Short) ?: 3

if (sound != state.sound || volume != state.volume) {
	state.sound = sound
	state.volume = volume
	return response([
		secure(zwave.configurationV1.configurationSet(parameterNumber: 37, size: 2, configurationValue: [sound, volume])),
		"delay 1000",
		secure(zwave.basicV1.basicSet(value: 0x00)),
	])
}

}

def parse(String description) {
log.debug "parse($description)"
def result = null
def cmd = zwave.parse(description, [0x98: 1, 0x20: 1, 0x70: 1])
if (cmd) {
result = zwaveEvent(cmd)
}
log.debug "Parse returned ${result?.inspect()}"
return result
}

def zwaveEvent(physicalgraph.zwave.commands.securityv1.SecurityMessageEncapsulation cmd) {
def encapsulatedCommand = cmd.encapsulatedCommand([0x20: 1, 0x85: 2, 0x70: 1])
// log.debug "encapsulated: $encapsulatedCommand"
if (encapsulatedCommand) {
zwaveEvent(encapsulatedCommand)
}
}

def zwaveEvent(physicalgraph.zwave.commands.basicv1.BasicReport cmd) {
log.debug “rx $cmd”
[
createEvent([name: “switch”, value: cmd.value ? “on” : “off”, displayed: false]),
createEvent([name: “alarm”, value: cmd.value ? “both” : “off”])
]
}

def zwaveEvent(physicalgraph.zwave.Command cmd) {
createEvent(displayed: false, descriptionText: “$device.displayName: $cmd”)
}

def on() {
log.debug “sending on”
[
secure(zwave.basicV1.basicSet(value: 0xFF)),
secure(zwave.basicV1.basicGet())
]
}

def off() {
log.debug “sending off”
[
secure(zwave.basicV1.basicSet(value: 0x00)),
secure(zwave.basicV1.basicGet())
]
}

def strobe() {
on()
}

def siren() {
on()
}

def both() {
on()
}

def test() {
[
secure(zwave.basicV1.basicSet(value: 0xFF)),
“delay 3000”,
secure(zwave.basicV1.basicSet(value: 0x00)),
secure(zwave.basicV1.basicGet())
]
}

private secure(physicalgraph.zwave.Command cmd) {
zwave.securityV1.securityMessageEncapsulation().encapsulate(cmd).format()
}

"

@nimrooz you’ve given me very little to go on. The aeon handler uses the basic set command to turn on the siren which will always be the emergency sound with the Dlink siren
This handler however uses the correct method supported only on the Dlink and Phileo sirens to activate the siren.
Please can you go into the settings of the device and choose your desired default sound and save your preference then please attempt to activate the siren whilst you have live logging open an also press the door chime button as well and post the log here

The aeon handler that Works doesnt give me the options of changing anything in my smartthings tiles under the Device.
However, i see that the options are there in the code, but defaulted to siren:1

Just searched the forum, im seeing that the some users atleast get the options With handler im using.
Have no Clue why it isnt showing at mine.

however turned back to Your handler, and logged while trying the different sirens:

1ad71107-0822-435c-8765-a9c74aadf941 ‎09‎.‎56‎.‎11: debug Sending Insecure Command BasicGet()

1ad71107-0822-435c-8765-a9c74aadf941 ‎09‎.‎56‎.‎11: debug Sending Insecure Command NotificationReport(event: 22, eventParameter: [], eventParametersLength: 0, notificationStatus: 0, notificationType: 6, reserved61: 0, sequence: false, v1AlarmLevel: 0, v1AlarmType: 0, zensorNetSourceNodeId: 0)

1ad71107-0822-435c-8765-a9c74aadf941 ‎09‎.‎56‎.‎11: debug Sounding Siren With Door Chime

1ad71107-0822-435c-8765-a9c74aadf941 ‎09‎.‎56‎.‎10: debug Sending Insecure Command BasicGet()

1ad71107-0822-435c-8765-a9c74aadf941 ‎09‎.‎56‎.‎10: debug Sending Insecure Command NotificationReport(event: 1, eventParameter: [], eventParametersLength: 0, notificationStatus: 0, notificationType: 10, reserved61: 0, sequence: false, v1AlarmLevel: 0, v1AlarmType: 0, zensorNetSourceNodeId: 0)

1ad71107-0822-435c-8765-a9c74aadf941 ‎09‎.‎56‎.‎10: debug Sounding Siren With Police Car

1ad71107-0822-435c-8765-a9c74aadf941 ‎09‎.‎56‎.‎09: debug Sending Insecure Command BasicGet()

1ad71107-0822-435c-8765-a9c74aadf941 ‎09‎.‎56‎.‎09: debug Sending Insecure Command NotificationReport(event: 3, eventParameter: [], eventParametersLength: 0, notificationStatus: 0, notificationType: 10, reserved61: 0, sequence: false, v1AlarmLevel: 0, v1AlarmType: 0, zensorNetSourceNodeId: 0)

1ad71107-0822-435c-8765-a9c74aadf941 ‎09‎.‎56‎.‎09: debug Sounding Siren With Ambulance

1ad71107-0822-435c-8765-a9c74aadf941 ‎09‎.‎56‎.‎08: debug Sending Insecure Command BasicGet()

1ad71107-0822-435c-8765-a9c74aadf941 ‎09‎.‎56‎.‎08: debug Sending Insecure Command NotificationReport(event: 2, eventParameter: [], eventParametersLength: 0, notificationStatus: 0, notificationType: 10, reserved61: 0, sequence: false, v1AlarmLevel: 0, v1AlarmType: 0, zensorNetSourceNodeId: 0)

1ad71107-0822-435c-8765-a9c74aadf941 ‎09‎.‎56‎.‎08: debug Sounding Siren With Fire Alarm

1ad71107-0822-435c-8765-a9c74aadf941 ‎09‎.‎56‎.‎07: debug Sending Insecure Command BasicGet()

1ad71107-0822-435c-8765-a9c74aadf941 ‎09‎.‎56‎.‎07: debug Sending Insecure Command NotificationReport(event: 1, eventParameter: [], eventParametersLength: 0, notificationStatus: 0, notificationType: 7, reserved61: 0, sequence: false, v1AlarmLevel: 0, v1AlarmType: 0, zensorNetSourceNodeId: 0)

1ad71107-0822-435c-8765-a9c74aadf941 ‎09‎.‎56‎.‎07: debug Sounding Siren With Emergency

EDIT:
When im using the aeon handler every command seems secure, but When using ur handler it only seems to send insecure, dont know how/if it correlates, but maybe Worth mentioning.

When using the aeon handler it originally stored itself,as and trying different sirens:
(however, siren didnt change sounds at all)

1ad71107-0822-435c-8765-a9c74aadf941 ‎10‎.‎32‎.‎06: debug sending off

1ad71107-0822-435c-8765-a9c74aadf941 ‎10‎.‎32‎.‎05: debug sending on

1ad71107-0822-435c-8765-a9c74aadf941 ‎10‎.‎31‎.‎55: debug settings: [‘sound’:5, ‘volume’:3], state: [‘sound’:4, ‘volume’:3]

1ad71107-0822-435c-8765-a9c74aadf941 ‎10‎.‎31‎.‎35: debug sending off

1ad71107-0822-435c-8765-a9c74aadf941 ‎10‎.‎31‎.‎34: debug sending on

1ad71107-0822-435c-8765-a9c74aadf941 ‎10‎.‎31‎.‎31: debug sending off

1ad71107-0822-435c-8765-a9c74aadf941 ‎10‎.‎31‎.‎30: debug sending on

1ad71107-0822-435c-8765-a9c74aadf941 ‎10‎.‎31‎.‎27: debug settings: [‘sound’:4, ‘volume’:3], state: [‘sound’:3, ‘volume’:3]

1ad71107-0822-435c-8765-a9c74aadf941 ‎10‎.‎31‎.‎18: debug sending off

1ad71107-0822-435c-8765-a9c74aadf941 ‎10‎.‎31‎.‎17: debug sending on

1ad71107-0822-435c-8765-a9c74aadf941 ‎10‎.‎31‎.‎14: debug sending off

1ad71107-0822-435c-8765-a9c74aadf941 ‎10‎.‎31‎.‎13: debug sending on

1ad71107-0822-435c-8765-a9c74aadf941 ‎10‎.‎31‎.‎07: debug settings: [‘sound’:3, ‘volume’:3], state: [‘sound’:2, ‘volume’:3]

1ad71107-0822-435c-8765-a9c74aadf941 ‎10‎.‎30‎.‎59: debug sending off

1ad71107-0822-435c-8765-a9c74aadf941 ‎10‎.‎30‎.‎56: debug sending on

1ad71107-0822-435c-8765-a9c74aadf941 ‎10‎.‎30‎.‎49: debug sending off

1ad71107-0822-435c-8765-a9c74aadf941 ‎10‎.‎30‎.‎46: debug sending on

1ad71107-0822-435c-8765-a9c74aadf941 ‎10‎.‎30‎.‎36: debug settings: [‘sound’:2, ‘volume’:3], state: [‘sound’:1, ‘volume’:3]

Searched and found this, also from you:
(same, just rebranded? -no Luck either)

https://github.com/fuzzysb/SmartThings/blob/master/DeviceTypes/fuzzysb/Zipato%20PH-PSE02-EU/zipato-PH-PSE02-EU.groovy

@nimrooz sorry for the delay getting back to you. it seems your device is not correctly paired with ST and is passing an error 116 back to ST. My device type checks to see that your device is correctly paired before it attempts to send security encapsulated commands which the aeon handler does not.

if however you just want to try sending the commands regardless change the secure function on lines 255- 262 to the following instead and it should work as the aeon one seems to work also.

private secure(physicalgraph.zwave.Command cmd) {
         log.debug "Sending Secure Command $cmd"
		zwave.securityV1.securityMessageEncapsulation().encapsulate(cmd).format()
	}

i myself though would try and troubleshoot why the the encapusulated response on line 101 is not being triggered and setting the state.sec to 1. but try the above first and check you can get the the different sirens working by replacing the secure function first

Hi, that’s fine, while you were “gone” I re-paired it, due to my previous questions about secured commands.
The results are that you’r handler now works, I can try the different sounds by clicking the tiles.

But according to the manual, one sound is missing.

http://products.z-wavealliance.org/MarketCertification/File?folder=&filename=MarketCertificationFiles/1262/DCH-Z510_Manual.pdf

Still yet to check if I can add different sounds to different “settings”…

Guys, I’ve tried this handler and it didnt work. So I remove my dlink siren but now I can’t readd it. Any helps or tips?

----- update

ok I removed the dlink device handler and then I could rejoin it. time re read this thread, any tips appreciated

----- final update
got it working. had to add the device manually, and make sure my device ID matched what it would be when it joined. now all works.

First of all, thanks @Fuzzyligic for your device handler. Works perfectly. I had some problems as others reported due to the fact that I could not add the alarm with the device handler installed. I had to remove it, add the thing and then re-install the handler and change the type in the graph web.

I had some problems trying to call the specific commands (DoorChime, Ambulance, etc.) from my own SmartApp (I am creating one so when the door opens when not away a doorchime is played in the siren). Anyways, just for future reference I was getting “No signature of method” errors when calling the DoorChime() command of the event handler. This conversation pointed the solution to add “return []” to all command functions in the event handler. After that change everything works and I can call siren commands from my SmartApp.

Regards,

Yesterday I removed the USB charging cable from the siren and now for the love of me I cannot make it work again :sob:

I have un-pair and re-pair the siren multiple times with the same result, the custom device handler by @Fuzzyligic does not seem to work. It was working fine before unplugging the thing.

The process I am following is:

  1. Remove the thing from the smartthings mobile app
  2. Press three times the back button of the siren to unpair it
  3. Remove the custom device driver from graph.smartthings.api (If I don’t it does not pair)
  4. Pair the siren. It gets detected as Aeon Siren and the alarm works
  5. Re-install the custom device driver in graph.smartthings.api and assign it to the new detected aeon siren
  6. That’s it, as a result, alarm does not work when pressing buttons in the thing tiles

Repeating this process does not do help. Checking the logs I have seen that the device driver is sending Unsecure commands but even forcing it to send secure ones (as suggested in previous posts) still does not work. In any case, there seems to be a problem in the pairing…

Any ideas of what I can try? Any help would be much appreciated. Thanks!

Jrhbcn - check the device ID. every time you re-add it the device ID increment by one. From memory, got into the IDE and edit the existing device and increment the device ID. then go and repair the siren.

Thanks for the help @baloo247

Yes, you are right and the device ID increment by one every time I do the pairing.

However, I don’t understand what you mean by increment the ID in the ide and re-pairing… :confused: right now I am deleting completely the device in the ide before repairing and I don’t know how to repair a thing already in the device list???

When I had pairing issues I was able to edit the existing device.

  1. Go into IDE
  2. go to your Z510 device and edit the device
  3. Change the device network ID and then save
  4. pair your device

When you now re-pair it should assume device ID, and effecitvely the hub should say - aha this device that’s pairing is that guy with the device network ID of “X”

Finally, success!!

I tried several combinations of the suggestions from @baloo247 and in one of them the pairing worked, no more unsecure commands and all the different sounds work again. I am not sure which combination worked so unfortunately I cannot report it here for others though…

Thanks again,

anyone having problems with this siren disconnecting randomly? it resumes normal operations with a simple off/on from the electric socket, however that’s clearly not ideal. many thanks

Mine is working correctly after a couple of months. When do the disconnections happen? After some time without using it?

Not necessarily. At the moment I’d say randomly, even if I will keep a log
to check out whether this assumption can be wrong. How did you set it up?
Are you using the community device handler or the Aeon siren one? I can see
there’s no polling capability on the handler either, so I cannot try that
option with Pollster (which for instance was the winning move with the
Xiaomi smart button). Many thanks, Anton

i would ensure that you paired the device within a foot of the Hub. there are many issues when pairing at a distance

Interesting. I’ll re-pair the device if necessary. Apologies if I missed it
from previous comments. Do you think having a polling capability would make
sense / be possible? Perhaps using the strobe only, as a “neutral” alive
function. Looking at the code I don’t actually even know if the strobe can
be controlled separately. Many thanks