How to pass sound

Hello,

I want to use different sounds for different nofitications. For example: firedetector when a smoke detector detects smoke and another sound when the doorbell is pressed. I can not find how to do this. I read that I must use VeraAlerts but I can’t find how.

In the VeraAlerts profile I have:

Msg=“{Message}”, Sound=“{Sound}”

In my luup call I have:
luup.call_action(“urn:richardgreen:serviceId:VeraAlert1”, “SendAlert”, {Message = “Test! Smoke detector Test!”, Recipients = “HomeWave”, Sound=“firedetector”}, 58)

It does not work, I just get the standard iOS tone.

All help is welcome. Thanks in advance!

I’m not sure if/how the Sounds variable in the profile will work. You can use a profile of Msg=“{Message}”, Sound=“blorb” to specify a different default sound.

The following Luup will work:
luup.call_action(“urn:richardgreen:serviceId:VeraAlert1”, “SendAlert”, {Message = “Test! Smoke detector Test! {Sound=firedetector}”, Recipients = “HomeWave”}, 58)

So you can embed the sound name in the message string itself.

Bringing this back from the dead.

intveltr,

I followed this exactly, except changing my info to be applicable, and i continue to get lua errors. i am sure it is a syntax issue but I am certainly not an expert. Just to make sure i am doing this correctly, I have added the sound to the Vera Alert profile argument and then added the luup code to the device i want to send the push message for. should it be in the format we define in the argument or as you have it below? meaning, should the luup call be:
luup.call_action(“urn:richardgreen:serviceId:VeraAlert1”, “SendAlert”, {Message = “Test! Smoke detector Test! {Sound=firedetector}”, 58)
or
luup.call_action(“urn:richardgreen:serviceId:VeraAlert1”, “SendAlert”, {Message = “Test! Smoke detector Test!}”, {Sound=“fire detector”}, 58)

As you can see, i don’t fully understand the syntax of the calls. I have tried both with no success.

The first syntax should be used when you have not set up the Sound parameter in VeraAlerts. In this case, the Sound parameter is part of the message that gets passed to the HomeWave plugin.

The second syntax is to be used when you have set up the Sounds parameter in VeraAlerts. In this case you are passing the Sound parameter to VeraAlerts.

Keep in mind that there are syntax errors in both statements. They should be:
luup.call_action(“urn:richardgreen:serviceId:VeraAlert1”, “SendAlert”, {Message = “Test! Smoke detector Test! {Sound=firedetector}”}, 58)
and
luup.call_action(“urn:richardgreen:serviceId:VeraAlert1”, “SendAlert”, {Message = “Test! Smoke detector Test!”, Sound=“firedetector”}, 58)

Thanks for the reply. I am the same arss that wrote on your FAQ about a few other things. One of those does pertain to sounds. I have been trying a few ways but what I am trying to do is make it so my default sound is off/nothing/blank and then i choose the sounds i want based on the alert. for example, i want to be notified when i am home and my front door is opened but only with a push. When i am set to away or night, i want the push to have sound. other things are the same. I want to be notified of my irrigation starting and completing its entire cycle but i only need sound for the watchdog timer. and so on.

It seems though if i set up the profile in vera alerts for anything not on the homewave list, it just get the default sound. I think you might have something written into the plugin that checks for that. I think the easiest solution would be to have an empty mp3 in the push notification list that can be listed in the profile. I’m sure you have 20 better ways though. Hopefully one that doesn’t require any work on your end.

Also thanks for the syntax correction. once i have the default sound resolved, i’ll be all set.