Skip to content
This repository has been archived by the owner on May 7, 2020. It is now read-only.

SONOS command "notificationsound" does not add sound file to the playqueue #2329

Closed
Marty56 opened this issue Oct 16, 2016 · 11 comments
Closed

Comments

@Marty56
Copy link

Marty56 commented Oct 16, 2016

The new SONOS command "notificationsound" is not added a respective sound file in the SONOS playqueue. If used it only plays the sound file which is already exisiting in the queue.

The desire behavior would be to act like the "playuri" command in this respect. Meaning to clear the queue and add the respective sound file.

@kaikreuzer
Copy link
Contributor

It works well for me, I especially also use it in #2306.

It adds the notification sound to the play list, changes the volume, plays it, changes the volume back and removes it again from the playlist.

Note that there was a bug that notification sounds didn't work if nothing else was played before (i.e. after a runtime restart) - this has been fixed in the very latest builds only through #2307.

If you still think that there is a bug, please describe it in detail, how it can be reproduced.

@Marty56
Copy link
Author

Marty56 commented Oct 16, 2016

Thanks for the feedback. I just tried it and although my build is only about 9 days old, I seem to be affected by the bug you have described.
So if this is fixed then the issue can be closed.

@Marty56 Marty56 closed this as completed Oct 16, 2016
@Marty56
Copy link
Author

Marty56 commented Oct 18, 2016

I have just installed the last build 546. The behavior did not changed.
Was the bugfix already included in this build 546?

@Marty56 Marty56 reopened this Oct 18, 2016
@maggu2810
Copy link
Contributor

Would be great if you could setup the Eclipse SmartHome IDE and test the current master yourself to check if it is already fixed in ESH.

openHAB normally include the latest "stable" snapshot build.
Here you can check the build date of that snapshots:
https://hudson.eclipse.org/smarthome/job/SmartHomeDistribution-Stable/

If the respective fix has been merged after that date, it is not included in the latest openHAB distribution.

@lolodomo
Copy link
Contributor

@Marty56 : can you close your issue ?
If not, tell us how to reproduce it. When calling the feature, what was being played by your Sonos ? What value are you assigning to the item to trigger the notification ?

@Marty56
Copy link
Author

Marty56 commented Nov 22, 2016

@lolodomo
I am using build #595 and the issue is not resolve.
My rule works if I am using
sendCommand(SZ_playuri, uri + "doorbell.mp3")
but
when replacing this statement by
sendCommand(SZ_notificationssound, uri + "doorbell.mp3")
no sound will be heard.

@lolodomo
Copy link
Contributor

What is the value of your variable uri ?
Is the result dependent on what is your current source ? Same thing if your current source is a tune-in radio station ?

@Marty56
Copy link
Author

Marty56 commented Nov 24, 2016

I will answer the question on the weekend. Currently I have no access.

As far as I can recall:
uri contains a string pointing to the directory in which the sound is stored.
Since it is working when using "playuri" command, I do not think that this is a root cause.

When I am playing a tune-in radio station. Sound is stopping, the volume is set to the notification volume (which was defined and not zero!), then and after a while (I think this I have to test again) it is switching back to the radio stream.

@lolodomo
Copy link
Contributor

You're right but it could help to reproduce to know what was your URI.
Checking the code for differences in the two cases, playuri is clearing the queue beofre inserting a new item inside while notificationsound is just adding a new item at the end of the queue. The other difference is that adduritoqueue and setcurrenturi are called in a different order.

@Marty56
Copy link
Author

Marty56 commented Nov 25, 2016

Hi lolodomo
The string uri contains "//nac/Users/martin/OH2/conf/sounds/".
I realized that if my TV is running at my playbar, playuri produces sound.
but notificationsound does not.
If I have switch off the TV or also playing a tune in radio station it is also working now with notificationsound.

It is kind of strange. The test I did last week I used the play1: and had problems. These problems somehow went away.

@lolodomo
Copy link
Contributor

In this case, please close this issue, your problem is the support by the binding of the digital line-in of the playbar and you already opened the issue #2410 for that. You could rename your description in the other issue to ask for a general support of playbar optical line-in.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants