Calling Sonos users

General HouseBot discussion. Any issues that don't fit into any of the other topics belong here.
Osler
HouseBot Guru
Posts: 742
Joined: Fri Feb 03, 2006 11:18 pm

Post by Osler »

I have some changes I need to make to the script re: playing nice with the controller. They're swimming in my head....now if I can just get to a point where I am doing more than getting home from work, sleeping, then going back to work all will be fine. I can get it to a point where Housebot and the controller respond exactly the same....just need time to code it.

I am US based (Dallas, Texas). I haven't demo'd Napster yet....see above.

Track info is available from the component via <object>.GetTrackInfo. This returns an array within which is the information you are looking for.

Album art (when implemented) would be a continually updating .jpg file in the theme folder. A dynamic image would be used in the theme to display the image. The image would have to be downloaded from the ZonePlayer so a direct path is out....but a temp file could be used for path purposes. (This is all handwaving at this point as I haven't yet sat down to figure out how SOAP with the ZP actually works yet).

Osler
CouchPotatoe
Senior Member
Posts: 103
Joined: Sun Jul 31, 2005 2:43 pm
Location: Yorkshire UK

Post by CouchPotatoe »

Osler wrote: Track info is available from the component
great stuff

Album art (when implemented) would be a continually updating .jpg file in the theme folder.

Osler
That's nicely workable - although you would need one for each zone.

I know how you feel timewise - so many things are technically possible now automation wise - which is great - but the restriction has moved to time constraints.

Cheers Kevin
Osler
HouseBot Guru
Posts: 742
Joined: Fri Feb 03, 2006 11:18 pm

Post by Osler »

Working on 800 x 480 theme for the Nokia 770/800/810. This will include pop-ups for queue/music library. Look will be similar to current sonos controller as my wife has issue with intuitiveness of current schema.

Still working on integrating radio better. Will need to catalog all radio station URI's and associated names at script start up to play better with the handheld controller. Hopefully this weekend.

Napster is on hold until sonos resolves the subscribe issue. I can't even subscribe right now.

Osler
Osler
HouseBot Guru
Posts: 742
Joined: Fri Feb 03, 2006 11:18 pm

Album Art Support Added

Post by Osler »

Find attached the latest version of the script.

1. Album art support has been added. This requires 2 additional properties: ZPNowPlayingPath and ZPNextPlayingPath. In addition, the Sonos Images folder needs to be placed within the theme folder. The script assumes the following path for HouseBot: C:/Program Files/HouseBot. Use this property with a dynamic image to display album art in a theme.

2. HouseBot now plays better with the handheld and desktop controllers with regard to internet radio selection. I still need to make the reverse true for selection of internet radio from the handheld or desktop controller. This will be done very soon.

3. New theme included which is 800x480. The theme is made for use on the Nokia series of internet tablets. It recapitulates what you would see on the handheld controller to increase the WAF. By default the theme includes the script device. Discard this if you already have a script device set up. Of note, mimic the panel names in the new theme, as the script uses the zone name to specify panel closures. So if your zone name is Family Room then this should be present in the title of each panel. See theme for clarification of panel naming.

4. Browsing the music library has been enhanced somewhat via the use of a new property called ZPMusicMenuTitle. Use this with a property label at the top of the music menu list control to keep track of where you are in the browse (Album, Artist, Genre, Composer, Track, etc.). The title remains static for internet radio and the other choices...but this will change in the future.

It is almost there!!

Osler
Last edited by Osler on Mon Dec 03, 2007 12:19 am, edited 1 time in total.
Osler
HouseBot Guru
Posts: 742
Joined: Fri Feb 03, 2006 11:18 pm

Napster Album Art Support Added - Internet Radio Fixed

Post by Osler »

I added support to pull Napster album art.

I revamped the .wsc a bit so that HB can now interpret internet radio information correctly.

Next: Dynamic text on the interface depending upon what is playing (i.e., for queue Track, Artist, Album headings are displayed along with that information, for internet radio Source, Station, Information are displayed, etc.).

Osler
Last edited by Osler on Mon Dec 03, 2007 12:20 am, edited 1 time in total.
CouchPotatoe
Senior Member
Posts: 103
Joined: Sun Jul 31, 2005 2:43 pm
Location: Yorkshire UK

Post by CouchPotatoe »

Hi Osler,

This looks interesting :-) I had a go at the import but it failed with..

Unable to find file [Family Room NextPlaying.jpg] in import archive
Error processing additional files in the Import Configuration. Import has been abandoned.

I had placed the Sonos Images folder in the correct place.

Kevin

PS Are you using the Nokia via RDP ?
Osler
HouseBot Guru
Posts: 742
Joined: Fri Feb 03, 2006 11:18 pm

Post by Osler »

Crud...I knew I should have included those but didn't. Trying running the script prior to pulling in the new .hbx. Simply change your reference in the script to 1.03 or 1.03.1 and run it. Make sure you have added the new properites as outlined above prior to running. The script will create the needed NowPlaying and NextPlaying jpg file that is specific to that zone within the Sonos Images folder. Just make sure you have a full queue when you do this so they both get created. Sorry about that. Once these images are present, the import should be able to find all references and import without error.

If this doesn't work, then you will have to wait until I get back from holiday to create an .hbx that has the two missing files in it.

You don't need the .hbx to give this a whirl. Simply add the properties to the current script device then open your theme and create 2 dynamic images that references the NowPlayingPath and NextPlayingPath as the source of their image. Album art will be displayed by these if it is available.

Osler

Yes, I am using the Nokia via RDP. My server runs XP that has been hacked to allow multiple RDP sessions.
Osler
HouseBot Guru
Posts: 742
Joined: Fri Feb 03, 2006 11:18 pm

Post by Osler »

Also, have you been having issues with my script losing connection to your ZP's for updates of transport and rendering values?

Osler
CouchPotatoe
Senior Member
Posts: 103
Joined: Sun Jul 31, 2005 2:43 pm
Location: Yorkshire UK

Post by CouchPotatoe »

I haven't had any success in the import , I guess I have to create images for all the players now /next but that's not a problem I can happily wait until you return as I'm using my own theme mostly. BTW Is this Nokia theme the first one you have released supporting multiple players ? I think it's the first you've posted.

I have got the cover images working now however :-) so that's something to play with.

Re the disconnections - Yes , I have been seeing these when an adapted version of your script is used with HomeSeer and I think I have seen it in HouseBot too although I haven't tended to leave it running so long. I'll leave it overnight and let you know.

I know with another UPnP script the author had to monitor for players becoming unsubscribed and to automatically re-subscribe them. My players show this re-subscription happens two or three times a day. Interestingly one is usually around 3.30 AM which is either about 1 hour after I normally last use them or perhaps something caused by the Sonos automatic version update checks or the radio station update checks ?

I also tend to listen to streaming services a lot. To stop these you can only 'pause' them and the Sonos controller remains showing the name of the 'paused' stream for a considerable time. Some long time later this info is removed and the zone shows [no music] . Maybe this is what causes the subscription disconnect.

I mention these because some other users weren't seeing these subscription drops at all so I don't know why mi setup is different. Those two aspects were possibilities. All my ZP's are wired BTW.

Kevin

Kevin
Osler
HouseBot Guru
Posts: 742
Joined: Fri Feb 03, 2006 11:18 pm

Post by Osler »

All of my ZP's are wired as well. Enigmatic on the sonos forum had a good idea for monitoring subscriptions. I will try to get this implimented as a priority.

I will have to redo the .hbx file when I get home and repost it. I guess the import isn't going to work without those included files.

So you do have album art being pulled? Question: does rhapsody art also get pulled as well....not sure if the napster and rhapsody art url format is the same?

I am still looking at navigating napsters selection tree. After subscribing I am hooked and so this will definately be integrated in the near future.

Osler
CouchPotatoe
Senior Member
Posts: 103
Joined: Sun Jul 31, 2005 2:43 pm
Location: Yorkshire UK

Post by CouchPotatoe »

Yes - Rhapsody artwork works fine - but Pandora's doesn't. The music info does update from Pandora though.

I just saw a Napster zone go to [no music] on the Sonos controller but at the time it was actually playing and I was navigating the queue using your theme. So not sure why this happened , strange. I did have to stop/start your script to resubscribe as it had lost the updates.

Kevin
Osler
HouseBot Guru
Posts: 742
Joined: Fri Feb 03, 2006 11:18 pm

Post by Osler »

Ok...good to know. I will get to work on maintaining the subscription....I think I can get this done while I am here....but it will require you to test it for me as there are no ZP's where I am at. I will try to get something posted this evening as it should be only a few lines of code.

Osler
CouchPotatoe
Senior Member
Posts: 103
Joined: Sun Jul 31, 2005 2:43 pm
Location: Yorkshire UK

Post by CouchPotatoe »

Is there anything I can do to look at the art URL format that Pandora is returning compared to that returned by Rhapsody/Napster ? I'm having a play with some msgbox entries ATM.

I have sent you a PM with my direct email address - dont want to clog the forum up here on trial code...

Kevin
Osler
HouseBot Guru
Posts: 742
Joined: Fri Feb 03, 2006 11:18 pm

Post by Osler »

Yep...open the .wsc in a text-editor or your favorite script debugger. Scroll down to the Private Sub AVTransportCallback (or something similar). It is after the UPnP_Error subroutine....'bought half-way down. You should see an array entitled Transport (or something similar) being populated in this subroutine. Transport(11) is the one you're interested in. You can see I do some string manipulation to it towards the end of the sub. If you place MsgBox(Transport(11)) after I have populated it using the xmldom but before the manipulation, you will see the format that is being presented. You may need to do MsgBox(unescape(Transport(11))) to put it into a more readable format. Once you have made the change, just save it...no need to reregister. Start the script in HB and add Pandora as the source using the HH controller. A msgbox should pop with the format. Let me know what it is and I can change the script to handle it as well.

Also, no pm recieved.

Osler
CouchPotatoe
Senior Member
Posts: 103
Joined: Sun Jul 31, 2005 2:43 pm
Location: Yorkshire UK

Post by CouchPotatoe »

Osler wrote:
Also, no pm recieved.

Osler
Sorry you have now :-) and I sent you a Pandora image URL which is just an external reference. Not sure if there's something you'd prefer to do to recover this internally from the Sonos - which must have retrieved it.

K
Post Reply