Page 3 of 19

Posted: Fri Nov 23, 2007 10:48 pm
by Osler
This should fix album art for Pandora. Script and .wsc needed for this.

Osler

Posted: Sat Nov 24, 2007 5:59 am
by CouchPotatoe
Hi Osler,

I know you weren't able to actually test this as you are on holiday but it unfortunately doesn't seem to fix it. The script becomes stopped once you select Pandora. I thought it was the unescapeing but it's nothing that simple. It may be to do with the next track being 'unknown' on Pandora. I'll have play and see if it's anything I can suss out but probably best to sort when you're back home. You enjoy your holidays.

Kevin

PS There is a missing 'Then' in the wsc file. If others are trying this then edit this line

ElseIf Mid(TransportState(12), 1, 4) = "http"
to this
ElseIf Mid(TransportState(12), 1, 4) = "http" Then

Posted: Sat Nov 24, 2007 2:18 pm
by Osler
Hmm....sorry about that. Let me take a look at it.

Use this wsc and script file. I have place some msgbox in it to show you what the wsc is sending over and what is being passed to xmlhttp.


If you can let me know what shows up in the two msgbox when you switch to pandora, I would appreciate it.

Osler

Posted: Sat Nov 24, 2007 10:20 pm
by Osler
Ok...first attempt at monitoring if the subscription to the ZP has died. This is included in the wsc file....the script is the same as that posted above. If the wsc receives a "SERVICE_INSTANCE_DIED" message from the ZP it will disconnect and then attempt to reconnect to the zoneplayer. I may need to get more involved than this....but this is the first step.

Osler

Posted: Sun Nov 25, 2007 7:18 am
by CouchPotatoe
Just trying these out Osler.

Did you perhaps fix something else as I am seeing album art now from Pandora and the script isn't stopping :-) ?

The msgboxes tend to make Sonos stop playing so I'm looking to see if there's a HouseBot writelog api call - or maybe I'll log them to a text file if I do see ongoing issues. I do notice the initial dialogs have blank data followed later by the full url. There are several per track change.

BTW If I ever do have to restart the script then it severs the streaming audio . resets volumes sometimes and I have to reconnect from the controller. It seems intrusive on the current state which I hadn't expected it to be .

Kevin

Posted: Sun Nov 25, 2007 9:32 am
by CouchPotatoe
Found an issue - moving back from Pandora to other services or local content now doesn't update the cover images ... re-running the script does although it alters volumes/transport state - or maybe this was a disconnect - blast I didn't check. K

<edit> Ahh I think it's clearing the queue (from the HH) that causes this.

Posted: Sun Nov 25, 2007 12:29 pm
by Osler
All I did was add the "Then" and put an err.clear at the end of the sub to insure an error was being carried over to the other functions.

These other issues I will look into these other issues.

Intrusiveness is something to talk about...should HB trump the controller or should the controller trump HB in terms of current settings.

Osler

Posted: Sun Nov 25, 2007 12:46 pm
by CouchPotatoe
I think at the time that the script is started then HB should just synch with the Sonos hardware states and not change anything . Thereafter they will stay in synch anyway won't they ?

I guess that error prorogation fix has fixed something too. Seems to work well now anyway :-)

Kevin

Posted: Sun Nov 25, 2007 7:59 pm
by CouchPotatoe
I've got another possibility as to why disconnects might happen - or at least why the script might stop.

I have a Napster album in my library but a couple of the tracks on that album won't stream . They come up with 'a valid license could not be obtained' and the Sonos skips on to the next track. I don't know why this is as those same tracks play in the Napster PC client ... very strange.

Anyway... when Napster hits one of these tracks it generates an error in the script (not the WSC) and it stops running

VBscript runtime error
Line 476 Char 1
Error:0 'Type mismatch: 'CInt''

Kevin.

Posted: Sun Nov 25, 2007 9:58 pm
by Osler
1. After you fixed the original missing "Then" in the .wsc, did you restart the script. If not, this may have been the only problem and, though you fixed the code, you didn't instantiate a new, "fixed" zonecontroller object. That may be why you continued to see a problem with pandora art and my upload "fixed" it.

2. There are likely to be some issues with album art moving between services. The way I am checking things at this point isn't terribly robust and does need some attention. This will get done.

3. I have seen the line 476 error before. This occurs because the queue position that is returning isn't numeric. I thought I had fixed this but obviously not. I will dig into this as well.

4. I will create a simple subroutine that does an intial poll of the ZP on script start-up and populates the current settings in HB. This should cause it to function as you are envisioning.

5. Navigation of the napster music library isn't obvious at this point. I am going to have to do some more digging to enable this in HB. It should be doable, I just need to figure it out.

I am just back from holiday (and need an additional holiday to recover). I may work on this some tonite....but don't be surprised if it is a few days before anything new crops up.

To fix the current script and wsc....do a find in your text editor for msgbox. Delete any you find in the script and the wsc and save them. This should hold you over to the next "release".

Also, keep the bug reports coming.

Osler

Posted: Tue Nov 27, 2007 4:43 am
by CouchPotatoe
Hi Osler,

Just to let you know that unfortunately I don't think the disconnect issue was fixed. I have left the system overnight two nights now and in both cases the realtime updates have ceased although the scripts are still showing running ,

I removed all msgbox lines of course. Is there a way to post messages to the HB log ? If so I could see if the re-subscibe code triggered. Or maybe create a log file.

If you get a chance to redo the Nokia theme import, which I think has the multiple player support too that would be great. I don't think you adapted the standard skin to multiple player did you ?

Kevin

Posted: Tue Nov 27, 2007 10:38 am
by Osler
yes...there is an error in the resubscription portion. I am revamping the wsc right now to add the error tracing as you suggested (for just the reason you suggested). For a temporary fix, open the wsc and scroll down and look at all the callbacks. You should see something like this:

Code: Select all

ElseIf (strType = "SERVICE_INSTANCE_DIED") Then
     Disconnect
     Connect("uuid:" & UDN)
End If
In yours, I forgot to add the "uuid:" portion, which may be the problem. For now, you can add a msgbox here as well to see if it at least is catching this overnight. There are three callbacks where this change needs to be made. What really needs to happen here is to check to make sure the connect function returns "OK" and if not do some additional stuff to hunt down the ZP and establish the subscriptions. Just an FYI....I left my script running while away for 5 days and came back and it still functioned correctly in all respects. However, as soon as I subscribed to Pandora on Sunday and played with it via the HH controller....the subscriptions were lost. So I see the issue now....

I will try to get to the themes this weekend. Neither are multi-zone at the moment but I was planning to add all my other zones this weekend and update the theme appropriately. If you can wait, I'll try to have the new wsc/script and the themes out this weekend.

Osler

Posted: Tue Nov 27, 2007 11:41 am
by CouchPotatoe
Thanks Osler - I'll get those updated.

No rush at all on the themes - I'm just a little stuck as to how to do the ZP name substitutions for the zones in some of the functions but I have loads to play with at the moment.

One other aspect - when a ZP is linked and not the master then it doesn't return now playing info. I think it would be quite friendly to try and hide this behaviour such that if you view a non master linked zone then it transparently recovers the info from the master. There may be some other awkward issues as masters can change should you drop the master from a multi ZP group.

Kevin

Posted: Tue Nov 27, 2007 12:53 pm
by Osler
Yes, group coordination (i.e., linking) isn't even addressed in the script right now....but it will be. The ZP will tell you who the coordinator of the group is if asked (exposed via Browse G:NP where I presume G = group and NP = Now Playing). Once you know this you can pull all of the relevant information from the coordinator.

I broached music services on the sonos forum......it isn't pretty and will require a considerable amount of time to integrate. For now I am going to focus on getting the core functionality up and running and I'll tackle that later. Hehe...all I wanted at the start of this was Stop, Pause, Play...now look at it. It's turned into an obsession!

Osler

Posted: Tue Nov 27, 2007 5:06 pm
by CouchPotatoe
The re-connect fix seems to work :-)

K