I was trying to copy-add your code into my IDE to activate my D-link siren modes and I had the following message:
No signature of method: script1457108611660404413803.metadata() is applicable for argument types: (script1457108611660404413803$_run_closure1) values: [script1457108611660404413803$_run_closure1@50c3e938] Possible solutions: getMetadata(), getState(), setState(java.lang.Object), metaClass(groovy.lang.Closure)
@ED-ST you get that error if you are trying to paste the code into a create new Smartapp from code window, you need to paste this into a Create New Device Handler from code window.
Have pasted, saved and published.
Iāve then go to ST app > āMy Homeā > āThingsā and selcted the siren. Then clicked āedit deviceā at the top right.
Still not working.
ok - Here inUK, we have The Dlink Z510 option within the edit section.
Thanks for the additional steps. I managed to get the various sounds but volume control has disappeared.
Iāve screwed up somewhere - let me go exclude and include and play on from there.
IĀ“m from Sweden and I have recently installed a UK Smart Hub 2.0 in my house.
IĀ“ve also installed the D-Link DCH-Z510 and it hub recognized it as an Aeon Siren.
Just like Ed, I want to be able to use all the sounds. IĀ“ve managed to save and publish StuartĀ“s code
for the D-Link DCH-Z510 device type and changed the Aoen Siren to the D-Link DCH-Z510 in the IDE.
The GUI for the DCH-Z510 shows up in the ST App but the siren doesnāt respond.
@yakul, I can manually get the siren to sound via āthingsā on its own. However, I had to exclude and include the device several times. I also did a factory rest with 4 press to the reset switch on the back. Iām sure I screwed up a few times in the process.
Under the name, I just kept in as Aeon siren. The last time, I changed it, the manual siren didnāt work. It may be coincidental.
This morning, I noted the siren did not sound when tripped via the smart alarm app.
In short, manual activation is ok. Auto activation is not working. Iām investigating ā¦
Edit: the manual activation requires 2 presses to the buttons. Once I rebooted the hub, itās only a single press for manual activation. Strange.
IĀ“ve now managed to get the D-Link DCH-Z510 to the āsame stateā as you.
By excluding / including the device I got it to work manually as a D-Link DCH-Z510
and I can get it to play all the different sounds from the GUI. However I can not get to trigger a specific
sound from a SmartApp.
I want it to work as a door chime when I am home and an alarm when IĀ“m not home.
What SmartApp is to used for the door chime-function ?
@yakul, I have done some further testing this morning.
Using Smart Alarm, then it will only recognise the type as āAeon Sirenā and sets off the alarm. The drawback is that there is only one sound type and one volume. However, once I change it to strobe only, siren only or both, Smart Alarm doesnāt activate the siren when tripped.
When I set it as the āZ510ā type, somehow Smart Alarm does not recognise it.
Just letās say, things doesnāt make sense to me at the moment.
Going to investigate further before seeking help from @geko.
@Yakul, ah great. Looks like we both posted at the same time.
Completed my test and discovered within Smart Alarm, I had to also specify the SWITCH in addition to specifying the SIREN. Everything is working.
Yes, like you, the individual sounds within the device GUI worked but not via Smart Alarm. I think the problem is the interface coding within Smart Alarm.
Ok, time to get some help from the Smart Alarm author. Iāll start a separate thread.
@Ed-ST, @Yakul guys, my bad. just realised my mistake with the Device Handler. please grab the latest DH code from github and it should now work with Smart Alarm
@tonto it does act as a repeater, however i donāt think it supports beaming. correction i have confirmed this does in fact support beaming.
With the new Device Handler Code I got the DCH-Z510 to work
as a Siren triggered by the Smart Alarm. But I can not choose a
specific sound for it. The door chime can by triggered manually from
the DCH-Z510 device GUI in the ST APP but does not show as an option
within the SmartApps.
@Yakul I have just updated the code again, there is now a device preference where you can set the default sound.when the siren is triggered, just edit the preferences to set, this new code still defaults to the emergency sound unless the preference is set.
if however you want to use multiple different sounds on the fly, the only way this can be done is in rule machineās Expert Features
IĀ“ve tested the new code and I can now change the default sound by editing the preferences.
But still itĀ“s not versatile in the way I would like it be. Emergency sound in ARM (Away) mode and
door chime when in DISARM mode.
Really appreciate your effort to get this working properly !!
@Yakul as my edited comments the different buttons for the sounds in the handler are custom commands but cannot be used by any off the shelf smartapps with the exception of Rule Machine which can via its Expert Features.
i could modify the device handler to do this, but it would be very esoteric to be in the device handler, i suggest instead what you do is create a Virtual Switch and then create a rule in Rule Machine with that switch as a trigger to perform the relevant expert features for the sound you want.
Iāve finally set the system up using Rule Machine instead of Smart Alarm, via Rule Machineās custom command. Initially, I found Rule Machine unwieldy but got the hang of it through some trial and error, together with painful ears.