ChriD / Raumserver

Raumserver - A HTTP Request Server to control the RF-Multiroom System
32 stars 11 forks source link

information on getrenderstate #34

Open holli73 opened 7 years ago

holli73 commented 7 years ago

hello,

if i use the listall=true i get following output:

[
  {
    "udn": "uuid:b1128e87-71b2-443b-8100-37a48574ef82",
    "friendlyName": "Schlafzimmer",
    "isZoneRenderer": true,
    "avTransportUri": "dlna-playsingle://uuid:2fe2f1b7-8578-47c7-9a59-f60706cc265d?sid=urn:upnp-org:serviceId:ContentDirectory&iid=0/Renderers/uuid:a2bc2f63-5ceb-48fc-af92-d4a7fa33e547/StationButtons/44",
    "bitrate": 128,
    "volume": 2,
    "numberOfTracks": 1,
    "currentTrack": 1,
    "currentTrackDuration": 0,
    "muteState": "NONE",
    "playMode": "NORMAL",
    "transportState": "STOPPED",
    "mediaItem": {
      "id": "0/Renderers/uuid:a2bc2f63-5ceb-48fc-af92-d4a7fa33e547/StationButtons/44",
      "parentId": "0/Renderers/uuid:a2bc2f63-5ceb-48fc-af92-d4a7fa33e547/StationButtons",
      "type": "RADIO_RADIOTIME"
    },
    "roomStates": [
      {
        "roomUdn": "uuid:50f23c84-0a1b-48de-ab44-10e9dd068f4e",
        "isMute": false,
        "isOnline": false,
        "volume": 2,
        "transportState": "STOPPED"
      }
    ]
  },
  {
    "udn": "uuid:DC2BC1B7-753D-449A-AA6D-067015178864",
    "friendlyName": "Inactive",
    "isZoneRenderer": true,
    "avTransportUri": "dlna-playsingle://uuid:2fe2f1b7-8578-47c7-9a59-f60706cc265d?sid=urn:upnp-org:serviceId:ContentDirectory&iid=0/Renderers/uuid:a193f9a9-84c5-4193-9e50-bfd4396dcf86/StationButtons/404",
    "bitrate": 128,
    "volume": 28,
    "numberOfTracks": 1,
    "currentTrack": 1,
    "currentTrackDuration": 0,
    "muteState": "NONE",
    "playMode": "NORMAL",
    "transportState": "STOPPED",
    "mediaItem": {
      "id": "0/Renderers/uuid:a193f9a9-84c5-4193-9e50-bfd4396dcf86/StationButtons/404",
      "parentId": "0/Renderers/uuid:a193f9a9-84c5-4193-9e50-bfd4396dcf86/StationButtons",
      "type": "RADIO_RADIOTIME"
    },
    "roomStates": [
      {
        "roomUdn": "uuid:00287e64-0fcb-4e56-92da-30aaa0518b63",
        "isMute": false,
        "isOnline": true,
        "volume": 28,
        "transportState": "STOPPED"
      }
    ]
  },
  {
    "udn": "uuid:78658C96-C570-4E78-A761-195F2B9140E4",
    "friendlyName": "wc-og",
    "isZoneRenderer": true,
    "avTransportUri": "http://192.168.250.80:9120/oe3.mp3",
    "bitrate": 192,
    "volume": 44,
    "numberOfTracks": 1,
    "currentTrack": 1,
    "currentTrackDuration": 0,
    "muteState": "NONE",
    "playMode": "NORMAL",
    "transportState": "STOPPED",
    "mediaItem": {},
    "roomStates": [
      {
        "roomUdn": "uuid:b463e62d-b87a-4b4a-ab4d-bdee80821f78",
        "isMute": false,
        "isOnline": true,
        "volume": 44,
        "transportState": "STOPPED"
      }
    ]
  },
  {
    "udn": "uuid:66E9EDD1-167F-49BD-BDD6-CC0D400B1094",
    "friendlyName": "Bad",
    "isZoneRenderer": true,
    "avTransportUri": "dlna-playcontainer://uuid:2fe2f1b7-8578-47c7-9a59-f60706cc265d?sid=urn:upnp-org:serviceId:ContentDirectory&cid=0/Playlists/MyPlaylists/Radio&md=0&fii=0",
    "bitrate": 0,
    "volume": 41,
    "numberOfTracks": 1,
    "currentTrack": 1,
    "currentTrackDuration": 0,
    "muteState": "NONE",
    "playMode": "NORMAL",
    "transportState": "STOPPED",
    "mediaItem": {
      "id": "0/Playlists/MyPlaylists/Radio/24",
      "parentId": "0/Playlists/MyPlaylists/Radio",
      "type": "RADIO_RADIOTIME"
    },
    "roomStates": [
      {
        "roomUdn": "uuid:eb6adecb-20b6-4db7-8012-9670493ddd3d",
        "isMute": false,
        "isOnline": true,
        "volume": 41,
        "transportState": "STOPPED"
      }
    ]
  },
  {
    "udn": "uuid:61743ef6-ce64-4ca8-b09b-beb051d6bf4d",
    "friendlyName": "Pool",
    "isZoneRenderer": true,
    "avTransportUri": "",
    "bitrate": 0,
    "volume": 59,
    "numberOfTracks": 0,
    "currentTrack": 0,
    "currentTrackDuration": 0,
    "muteState": "NONE",
    "playMode": "NORMAL",
    "transportState": "STOPPED",
    "mediaItem": {},
    "roomStates": [
      {
        "roomUdn": "uuid:95ffde14-a056-452e-a4fb-4d9c068fdf4b",
        "isMute": false,
        "isOnline": true,
        "volume": 59,
        "transportState": "STOPPED"
      }
    ]
  },
  {
    "udn": "uuid:5CC73C09-F905-4877-9191-9128D8531252",
    "friendlyName": "Kueche",
    "isZoneRenderer": true,
    "avTransportUri": "http://192.168.250.80:9120/oe3.mp3",
    "bitrate": 192,
    "volume": 25,
    "numberOfTracks": 1,
    "currentTrack": 1,
    "currentTrackDuration": 0,
    "muteState": "NONE",
    "playMode": "REPEAT_ALL",
    "transportState": "STOPPED",
    "mediaItem": {},
    "roomStates": [
      {
        "roomUdn": "uuid:8d10c182-e6e5-4c54-817e-9313877877f7",
        "isMute": false,
        "isOnline": true,
        "volume": 25,
        "transportState": "STOPPED"
      }
    ]
  }
]

on the first entry - how should i interprete 'avTransportUri' or on the mediaitem the 'id' -> 'StationButtons/44'?

i'm missing some rooms as well - and one is returned as "friendlyName": "Inactive",
this schould be 'sauna'? and what is 'StationButtons/404' there? what is the difference on udn and roomUdn?

any insight would be great

thanks holli

ps: sample output for my state collector:

holli@obelix:~/BUILD/ds/raumfeld$ curl -s 'http://obelix:18080/raumserver/data/getRendererState?listAll=true' |json -aM .udn .friendlyName .transportState .volume .avTransportUri .isZoneRenderer
uuid:b1128e87-71b2-443b-8100-37a48574ef82 Schlafzimmer STOPPED 2 dlna-playsingle://uuid:2fe2f1b7-8578-47c7-9a59-f60706cc265d?sid=urn:upnp-org:serviceId:ContentDirectory&iid=0/Renderers/uuid:a2bc2f63-5ceb-48fc-af92-d4a7fa33e547/StationButtons/44 true
uuid:DC2BC1B7-753D-449A-AA6D-067015178864 Inactive STOPPED 28 dlna-playsingle://uuid:2fe2f1b7-8578-47c7-9a59-f60706cc265d?sid=urn:upnp-org:serviceId:ContentDirectory&iid=0/Renderers/uuid:a193f9a9-84c5-4193-9e50-bfd4396dcf86/StationButtons/404 true
uuid:78658C96-C570-4E78-A761-195F2B9140E4 wc-og STOPPED 44 http://192.168.250.80:9120/oe3.mp3 true
uuid:66E9EDD1-167F-49BD-BDD6-CC0D400B1094 Bad STOPPED 41 dlna-playcontainer://uuid:2fe2f1b7-8578-47c7-9a59-f60706cc265d?sid=urn:upnp-org:serviceId:ContentDirectory&cid=0/Playlists/MyPlaylists/Radio&md=0&fii=0 true
uuid:61743ef6-ce64-4ca8-b09b-beb051d6bf4d Pool STOPPED 59  true
uuid:5CC73C09-F905-4877-9191-9128D8531252 Kueche STOPPED 25 http://192.168.250.80:9120/oe3.mp3 true

and this from the old

#################################################################################                                                                              #
# RaumServer v0.1.10.96 (using RaumKernel v0.1.10.97)                          #
#                                                                              #
# Raumfeld System: found                                                       #
# Webserver status: startet                                                    #
#                                                                              #
# [r] list rooms, [n] list network adapters, [ESC] to quit!                    #
#                                                                              #
################################################################################
ROOM:  Kueche (uuid:8d10c182-e6e5-4c54-817e-9313877877f7)                       
ROOM:  Schlafzimmer (uuid:50f23c84-0a1b-48de-ab44-10e9dd068f4e)                 
ROOM:  LaubeAussen (uuid:c7684d10-6548-4a4c-a9e7-6a31e178d8ac)                  
ROOM:  Sauna (uuid:00287e64-0fcb-4e56-92da-30aaa0518b63)                        
ROOM:  wc-og (uuid:b463e62d-b87a-4b4a-ab4d-bdee80821f78)                        
ROOM:  Bad (uuid:eb6adecb-20b6-4db7-8012-9670493ddd3d)                          
ROOM:  Pool (uuid:95ffde14-a056-452e-a4fb-4d9c068fdf4b)  
ChriD commented 7 years ago

how should i interprete 'avTransportUri' or on the mediaitem the 'id' -> 'StationButtons/44'?

Well, these are the URI's which are given by the Raumfeld System. The Media item was created to give more info about that URI's (eg, Artist, album aso...). But currently not all types of media items are supported. In the case of "RADIO_RADIOTIME" the kernel holds more infos on the media object itself but the raumserver doenst have it implemented right now. (In fact there are currently only implementations of "MediaItem_Container, MediaItem_Artist, MediaItem_Album, MediaItem_Track". You can see this in the "mediaItemJsonCreator.h" source file. I have to add further MediaItem Types here. e.g RADIO_RADIOTIME

i'm missing some rooms as well - and one is returned as "friendlyName": "Inactive",

Hmm. It seems that the new state of the RF devices (which can be set inactive) seems to break my code. I have to look it up. Missing renderers are bad. In fact the same discovery is used as in the old Raumkernel but what device is the "LaubeAussen"?

EDIT: In fact Raumfeld renames the Zone renderers to "Inactive" if they are in eco mode. I have to check if i shoud get the names from the linked rooms instead

EDIT 2: I have updated the kernel and the server to return the internal built name too in additon to the friendly name of the renderer. This now looks like this:

    "udn": "uuid:40d093a5-a2f7-4d5d-82da-65380f2b975c",
    "friendlyName": "Inactive",
    "name": "Bad",
    "isZoneRenderer": true,
ChriD commented 7 years ago

I have updated the server so he wil now return the values for the RadioTime media Item. So if you pull the repo and build the server you will now get the info showed below (take a look at the media item section)

But of course there are other media items i have to add. If you need json output for other types please tell me. I will do the one after the other when needed because my priority lies in having imlemented the crash dump system

[
   {
      "udn":"uuid:40d093a5-a2f7-4d5d-82da-65380f2b975c",
      "friendlyName":"Bad",
      "isZoneRenderer":true,
      "avTransportUri":"http://opml.radiotime.com/Tune.ashx?id=s177755&formats=wma,mp3,ogg&partnerId=7aJ9pvV5&serial=00:0d:b9:19:b5:a4",
      "bitrate":128,
      "volume":37,
      "numberOfTracks":1,
      "currentTrack":1,
      "currentTrackDuration":0,
      "muteState":"NONE",
      "playMode":"NORMAL",
      "transportState":"STOPPED",
      "mediaItem":{
         "id":"0/RadioTime/LocalRadio/l-r101408/s-s177755",
         "parentId":"0/RadioTime/LocalRadio/l-r101408",
         "type":"RADIO_RADIOTIME",
         "title":"Chicago - If You Leave Me Now          ",
         "description":"",
         "albumArtUri":"http://cdn-radiotime-logos.tunein.com/s177755q.png",
         "region":"Lounge-Musik",
         "signalStrength":89,
         "durability":102,
         "bitrate":0,        
      },
      "roomStates":[
         {
            "roomUdn":"uuid:a08c8e2a-fe85-40e6-8576-c4c44dc5e7a3",
            "isMute":false,
            "isOnline":true,
            "volume":37,
            "transportState":"STOPPED"
         }
      ]
   },