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 »

Cool....stick with me. I have added some tracing and made the reconnection more robust. Please see the zip attached. Traced messages appear with a magnifying glass icon in the log (expand device tree...top most item).

Also here:

-added active poll at script start-up to initialize HB
-added ZPMusicMenuTitle functionality for Internet Radio

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

Post by Osler »

Well...this version seems to be a real lemon...working on it.

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

Post by Osler »

After bringing multiple zones into my set-up, there appears to be a problem with the contextual scripting Scott recently implemented. I am still investigating this, but multiple contextual scripts running continuously appears to do very bad things. in my situation, all scripts stop simultaneously after several minutes. Restarting the script without restarting HB is not effective - I never get the callback from the script telling me that all is well.

As a temporary work-around for this you will need to open your current script and do a find/replace for the following

SetPropertyValue(" ---------> SetPropertyValue("<YourDeviceName>

GetPropertyValue(" ---------> GetPropertyValue("<YourDeviceName>

Save a script for each individual device and then point that device to that script.

I am still doing some testing....but this does appear to be a bug in HB.

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

Post by Osler »

Well....its not an HB problem....the above changes didn't make much of a difference after all.

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

Version 1.04.0

Post by Osler »

Mental Note: insure you are using the most current version of the COM object BEFORE you debug the entire script!!

I spent half the day debugging before I realized I wasn't using my most recent .wsc file. Oh well...at least all is working now.

Find attached the latest version of the script and .wsc file. The .wsc file now includeds a comment at the top of the script section to indicate what version of script it is designed to work with (more for me....but hey).

The .hbx includes the 800x480 theme (hopefully with all needed files now). In addition, there is a seperate zip file with the script, .wsc, Sonos Images Folder (to go in Theme folder of HB), and a SonosHHImages folder which includes all misc. images I have created for the sonos theme but may not have included in the theme. This theme supports multiple zones (3 at the moment).

Images needed for the theme other than those for Family Room, Master Bedroom, and Playroom will be forthcoming.

Osler
Last edited by Osler on Fri Feb 01, 2008 5:04 pm, 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 O,

Well - I haven't done anything much yet apart from loading the new theme but I have to say it is visually superb. :D You've obviously spent a lot of time on this . It imported just fine - now just got to set my zones up correctly.

Very impressed,

K

[edit] All zoned up now and seems fine. Great job !
I wonder are you intending a full size theme as well or sticking with the Nokia one ? (conveniently I have a 770 and an 800 but haven't used them with HB yet - so that's a useful theme for me, I have a large touchscreen on the PC I intend to use too 1280x1024)
I have found a few little issues but they're just because it's 'in progress' I think - however I'll post them should you wish.
CouchPotatoe
Senior Member
Posts: 103
Joined: Sun Jul 31, 2005 2:43 pm
Location: Yorkshire UK

Post by CouchPotatoe »

Did I mention that this is very impressive ;-) ?

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

Post by Osler »

Hehe...I'm glad you like it. I still need to add linking.

Things to note about the theme:

1. The icon in the top left corner of the Now Playing screen acts as an Exit Remote button (FYI).

2. In case you don't figure it out, the zone name on the Zone Menu screen is a panel change button that will open the Now Playing screen for that zone.

3. The script actually calls and closes the pop-up panels AddSong and PlayMode. The calling is contextual and depends upon zone name. Hence, these panels need to be named "AddSong-" or "PlayMode-" concatenated with the actual zone name (e.g., AddSong-Master Bedroom). When changing the theme, keep this in mind for panel naming. The zone name can be obtained from the UDN.txt file that you run initially to find the unique device names or from the device itself under the property ZPName.

4. Yes, I am planning a larger resolution remote. This likely won't look like the present theme, though. I plan to make it support 1024x768 and 800x400 (and I will also support the resolution of you touchscreen).

5. Yes, please let me know about any issues as you are likely a more frequent Sonos user than I. Your reports have been very helpful at debugging.

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

Post by CouchPotatoe »

I'll have a little longer play before I come back with comments as I think some were based on 'first run' type situations. One thing though is that it's hard to dismiss the Play Mode popup.

On the linking I was wondering - is it possible that you can display zones in order such that from the zones menu any linked zones are vertically adjacent ? ( I'm thinking this may be very difficult ). That way you could do similar to the HHR and vertically expand the zone name graphics, or add a grey block between them to join them as one rather than duplicating the track information in each zone. Would look very neat.

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

Post by Osler »

A button to close the PlayMode and AddSong pop-up can be added. This should resolve the issue. I could actually tuck the selections into a list control with a button at the bottom for select or something like that. This may, in fact, be more visually appealing.

Taking care of linking from a visual standpoint is going to be a PITA. To do it as you describe (and as I would like) would require a list control that can handle the display of images. The current list control does not have this capability. As a result, I have no way to build the zone list on the fly AND maintain the eye candy you are now seeing. I may be able to do something using a dynamic image with the list control overlaid on top of it....just need to experiment a bit.

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

Post by CouchPotatoe »

... Yes, I had anticipated that - it would look great but I'm sure another solution word work well too...

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

Post by Osler »

Additional theme items. One .zip with additional zone menu buttons for all the stock zones. Other .zip with indicator strip for zone names and zone icons to use on now playing menu.

To use the indicators, replace the exit remote button and static label at the top left of the now playing screen with an indicator. Both indicators setting should be based on the ZPName value of the zone. ZoneIconIndicator has 17 images (50x50 pix each) and ZoneNameIndicator has 20 images (102x47 pix each).

Osler
Last edited by Osler on Fri Feb 01, 2008 5:04 pm, edited 1 time in total.
Osler
HouseBot Guru
Posts: 742
Joined: Fri Feb 03, 2006 11:18 pm

Post by Osler »

Linking has been added to the script and is functional. It is not perfect aesthetically. I am still making a few changes to the script and the theme. Expect a new version to be out this weekend that includes control of zone linking.

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

Now with Linking!!!

Post by Osler »

Find below the latest script and script component. In addition, there is a .hbx file which includes the latest Sonos based theme. A new addition is 3 Tasks which are required to integrate linking into the theme. These are simple enough...just insure zone naming is consistent when you go to change things to be consistent with your set-up. The theme is not perfect as yet....still some minor aesthetic points in my opinion...but hey.

There is a new button on the Zone Menu screen that will open a panel that allows you to change the volume and mute any zone. This button is now located on all Now Playing panels as well to allow volume control when zones are linked. I know...the button is an equalizer button...just haven't had time to make a unique button for this purpose.

There are now indicators at the top of each now playing screen to indicate which zones are currently linked together...just like on the Sonos handheld controller.

The tasks are used to evaluate if a zone is linked or not. If it is not, you are taken to its Now Playing screen from the Zone Menu. If the zone is linked, the task will take you to the Now Playing screen of the coordinator of the linked group of zone players.

On the zone menu panel, the transport control will still work if a zone is linked; however, the indicator doesn't work exactly right for a zone. By default, if a zone becomes linked its transport state changes to Play which may throw you the first time you look at the zone menu with zones linked together. I am working on a more elegant solution to indicate current transport state of zones in the zone menu. For now, I have coded it such that if you changes the transport state of a zone that is linked it will pass this information on to the group coordinator. It is at this point that the transport indicators get a bit buggy on the zone menu panel.

The following property values are new and need to be added to each device:

ZPTrackPosLen (alphanumeric)
ZPQueuePosSize (alphanumeric)
ZPGroupCoordinator (alphanumeric)
ZPDisplay1 (alphanumeric)
ZPDisplay2 (alphanumeric)
ZPDisplay3 (alphanumeric)
ZPDisplay4 (alphanumeric)
ZPLinked (boolean)
ZPUnlink (boolean)

ZPDisplay(n) are used to change the info on the now playing screen dynamically. So if you are playing a song Track/Title/Album will be displayed - if you are streaming internet radio Station/Source/Information will be displayed.

ZPTrackPosLen and ZPQueuPosSize simply give a composite of track position and length (00:00 / 00:00) and queue position and size (0 / 0) to make theme design a bit easier.

IMPORTANT:
All zoneplayer script devices must use the "ZP_" prefix followed by the zone name as it appears on the zoneplayer. At script start-up, I querie HB for all devices with a ZP_ prefix and extract their UDN and zone name to aid in managing linking. If you have a zone that doesn't follow this naming convention the script will fail.

Post any problems or questions.

Osler
Last edited by Osler on Fri Feb 01, 2008 5:05 pm, 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 , looking forward to this and just been having a first play. I think you've created a new ZoneIconIndicator2.png that resides in the SonosHH folder - could you perhaps post that - my zoneiconindicator.png even if renamed has the wrong number of images in it .

[edit] Actually looks like it's zoneNameIndicator.png that has the wrong number of names - can you post both ??

K
Post Reply