Sonos music service: 'No Music' message when playing a program media collection - sonos

I have a music service added to Sonos in production,
I received a complaint about a user who plays from a calendar of us, and often the music stops and he gets the message 'No Music' in the player. If he presses 'play' again, Sonos continues to play again till the next 'No Music' message.
The problem happens at an element with these properties:
<ns1:mediaCollection xsi:type="ns1:mediaCollection" readOnly="true" userContent="false" renameable="false" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ns1:id>calendar:34685</ns1:id>
<ns1:itemType>program</ns1:itemType>
<ns1:displayType>List</ns1:displayType>
<ns1:title>Stylish Restaurant</ns1:title>
<ns1:canPlay>true</ns1:canPlay>
<ns1:canEnumerate>false</ns1:canEnumerate>
<ns1:containsFavorite>false</ns1:containsFavorite>
<ns1:albumArtURI requiresAuthentication="false">images/menu/green_legacy.png</ns1:albumArtURI>
<ns1:canAddToFavorite>false</ns1:canAddToFavorite>
</ns1:mediaCollection>
The method GetMetadata with calendar:34685 works fine and returns 2 songs, to be responsive on changes in the calendar.
Is it possible that sometimes this request does not return a valid answer? If so, does anyone know which error type or error return code causes this 'no music' message? Or does it return a valid answer without any songs?
Is there a way to see all sent requests and received responses from a sonos controller or sonos device?
Thanks!

Related

Expo/React Native : A Continuous Alarm or Sound Notification (like receiving a call ) triggered by remote server

I am using Expo to build an app that will pop up a notification with custom sound and vibration when triggered remotely. The alarm/vibration would play until its dismissed by the user or it times out (say after 1-2 mins) .
Example use case would be when a partner needs my immediate help with baby, they can press a button the app and that would send signal to backend server which would then trigger the notification with alarm on the app at the other end. When the notification is dismissed, an acknowledgement message is sent with Yes or No type message. If the notification times out, then another message is sent like "no response".
Key point to note is that when the app is fully closed, the notification should still be able to pop up.
From my limited understanding , expo notification or push notifications in general cannot achieve this as they don't allow us to create notifications that directly open the app. Even a solution which works like phone or video calling apps (which open when someone calls you ) could work.
Any help would be much appreciated.
Many Thanks!
I looked up expo push notifications but they are limited in terms of customising the notifications.

ArrowDB - how to get event listener of a chat sent to group?

I'm developing a real time chat app using Titanium Appcelerator. I have everything working with ArrowDB and one user can send another user a message through a group.
https://docs.appcelerator.com/arrowdb/latest/#!/api/Chats
However there doesn't seem to be a method or listener to identify when a new message has been sent to the group.
What I'd like to see is when the other user is typing, and as soon as the message is sent it bubbles up on the recipients chat window. Exactly like how iMessage works.
The only way I can pull new messages from the group to the local users device is to have a refresh button or to use a setInterval with a function call to refresh the messages.
obviously this is not a great way to handle the situation as with a few hundred users every month this would make for hundreds of thousands of api calls and probably not good for device performance.
Does anyone have any ideas how to get real time chat working? Is there a method or event listener I am missing that isn't document?
Push notifications only work while the app is in the background, so this is not an option unfortunately.

Twilio Disconnection event not firing on IOS

I'm creating mobile app based on Twilio and Cordova (https://github.com/jefflinwood/twilio_client_phonegap), it works well, but I seem to have a problem with connection events.
The problem is ConnectionDelegate callback connectionDidDisconnect doesnt seem to be fired in some situations. For example:
User 1 is calling from browser
User 2 anwsers on iPhone/Android/Browser
They talk
User 1 hangs up in browser
User 2 will get disconnection event on every other device than iPhone. On iPhone callback connectionDidDisconnect is not called at all.
Another situation:
User 1 is calling from browser
User 2 anwsers on iPhone/Android/Browser
They talk
User 2 hangs up
User 2 will get disconnection event on every other device than iPhone. On iPhone callback connectionDidDisconnect is not called at all.
Could you tell me where I'm making mistake?
UPDATE:
When user anwsered incoming call on iPhone and caller hangs up I get [ERROR TCMetricsPublisher] Failed to push call stats, status code: 403 error.
When user anwsered incoming call on iPhone and he hangs up, nothing happends.
From others experience using the same plugin, it seems you can solve the issue by using the status callback that Twilio handles when the call ends. Modify the call from parameters and set the status to "completed" for this call.
Doing this should allow the call to disconnect properly on iOS.
Please let me know if this helps at all.

Sonos: Player not calling getMediaURI

Working on a Sonos API implementation for a streaming service.
I've got the getMetadata flow setup as:
Open Music Source: Return a list of station groups as a mediaCollection.itemType = container
Click Group: Return a list of stations for the selected group as mediaCollection.itemType = program
Click Play: Returns a single mediaMetadata with itemType = stream
I see a number of calls to getExtendedMetadata from the Windows controller on my dev machine and the player I'm trying to send the stream to.
The Now Playing shows Track and Album information, but the player does not make the getMediaURI request.
When I look at the controller log, I see the follow two errors:
<ApplicationData>#Module:asyncio #Message:Async get failed 1. Error 0x80000002</ApplicationData>
<ApplicationData>#Module:asyncio #Message:RAsyncGETIOOperation failed. Error (1000, 0x00000000)</ApplicationData>
Michael,
A program on Sonos is defined as a programmed radio station. This is a case where you can return a selection of tracks on each request and they are played sequentially. (Think Pandora, 8Tracks, Songza or similar DMCA style radio).
If you are returning a list of radio streams (even if it is only a list of one) the type for that mediaCollection should be collection, container or other.
If you do this and return the stream as a playable item and then click play on the stream you should see the appropriate calls and playback should begin.

How to update a Parse push notification instead of creating a new one

With my app, the Parse module sends out a notification each time a picture is sent to the Android recipient. The recipient then know to login to the app and receive the picture. My problem is that if the same recipient is getting many pictures sent to him, he will get many notifications for the app. Is there a way to update any existing Parse notification on and Android device to show the waiting count, instead of sending multiple notifications? I have searched through Parse documentation and here at Stackoverflow but can't find any info on how to do this.
yes, I am facing the same problem, The resolution is that , if you dont send title and alert in parse notifications, it will not create the automatic notifications in the device, so you will have to handle them in your broadcast receiver and create your own notifications, you can have a NOTIFICATION_ID for each notification you create and update the count by getNumber and setNumber i think.
here is a link
https://www.parse.com/questions/update-notification-in-android
Update: Sorry for getting back to you late on this but this might help someone else. Even If your app is not running, You will still get the notification. I have tested it on my own BroadcastReceiver which generates Modified notifications with bitmap, and positive, negetive button for response.