www.homeseer.com    
 

Go Back   HomeSeer Message Board > Media Plug-ins > Media Discussion > PI-SonosController (3P)

PI-SonosController (3P) Discussion of Sonos Controller Plug-in

Reply
 
Thread Tools Display Modes
  #21  
Old November 4th, 2010, 01:55 AM
beerygaz's Avatar
beerygaz beerygaz is offline
Super Seer
 
Join Date: Mar 2006
Location: Johannesburg, South Africa
Posts: 1,592
I was just going to say, why not use a http URL like the other images rather than a file URL.

As for the size, yes, it's just an aesthetics thing where I use Jon00 screen builder to build a quick status screen.

The other issue I'm having is that I don't get any cover art whne accessing HS from an external network. I'm assuming that's becasue my browser is trying to render the image itself from the Sonos URL which is a private IP address.

This may be a big archtectural change to rememdy but I assume the only option is to have your plugin retrieve the image and store it locally on the HS machine and then render it the same way you will the noart.jpeg image (so go and fetch the cover art and save it as <zone name>.jpeg and then generate a URL for the device from there).

Lastly, why are we consolidating all the questions and issues into a single thread? Isn't this going to get messy when your plugin's popularity grows?
Reply With Quote
  #22  
Old November 4th, 2010, 03:23 AM
dcorsus dcorsus is offline
OverSeer
 
Join Date: Mar 2010
Location: California
Posts: 3,514
Quote:
Originally Posted by beerygaz View Post
As for the size, yes, it's just an aesthetics thing where I use Jon00 screen builder to build a quick status screen.

The other issue I'm having is that I don't get any cover art whne accessing HS from an external network. I'm assuming that's becasue my browser is trying to render the image itself from the Sonos URL which is a private IP address.

This may be a big archtectural change to rememdy but I assume the only option is to have your plugin retrieve the image and store it locally on the HS machine and then render it the same way you will the noart.jpeg image (so go and fetch the cover art and save it as <zone name>.jpeg and then generate a URL for the device from there).
  • Add following lines to the ini file under [Options]
    • ArtworkHSize=150
      ArtworkVSize=150
  • ArtworkHSize is the Height and VSize is the width
  • if you omit these entries the original size will apply
  • This is added to v1.0.0.33 but can only be set my manually modifying the ini file. I'll add some support to do it through the config web page later
  • Fixed the no-art in V1.0.0.33 so now you get an ugly CD case image
  • Changing the URL from Sonos to a local stored image wasn't hard because the plug-in was already doing it for HSTouch screens
Posted v1.0.0.33 here (http://board.homeseer.com/showthread.php?t=144724)

Let me know how it went

Dirk
Reply With Quote
  #23  
Old November 4th, 2010, 09:22 AM
mbdirtfarmer's Avatar
mbdirtfarmer mbdirtfarmer is offline
Seer Deluxe
 
Join Date: Jan 2004
Location: Central, Manitoba, Canada
Posts: 167
image url changes

Thanks for all your late night work on the script, Dirk.

My homeseer webserver runs on port 88 so the changes to the image location have some consequences.

http://192.168.1.220/SonosController/images/noart.jpeg

needs to be http://192.168.1.220:88/SonosControl...ges/noart.jpeg for my setup.

i am pretty sure there are many other people not running on default port 80.

you may need to pull this info from homeseer, or set up a variable in the ini.

--
Alan

Last edited by mbdirtfarmer; November 4th, 2010 at 09:27 AM. Reason: typo in url
Reply With Quote
  #24  
Old November 4th, 2010, 09:56 AM
beerygaz's Avatar
beerygaz beerygaz is offline
Super Seer
 
Join Date: Mar 2006
Location: Johannesburg, South Africa
Posts: 1,592
Dirk, I'm amazed at the development speed, thanks for addressing our issues so quickly. The art size tweak is working perfectly.

I still have an issue with the art URL though. It's now local, but it's grabbing the IP address of my HS server, which is a private IP address and still cannot be accessed externally. Can you not grab the FQDN instead? Or even allow an INI setting so folks can put whatever server name (and port as per Alan's issue) they like and you build the URL for the artwork from there? The alternative is to use relative URL's rather than explicit ones, so just "/SonosController/images/noart.jpeg" rather than http://xxx.xxx.etc and then the built in web server should sort out the server & port stuff automatically.

Lastly, and it's another minor aesthetic issue. Is is possible to change SONOSCONTROLLER to mixed case in the System field?
Reply With Quote
  #25  
Old November 4th, 2010, 11:06 AM
dcorsus dcorsus is offline
OverSeer
 
Join Date: Mar 2010
Location: California
Posts: 3,514
Quote:
Originally Posted by beerygaz View Post
The alternative is to use relative URL's rather than explicit ones, so just "/SonosController/images/noart.jpeg" rather than http://xxx.xxx.etc and then the built in web server should sort out the server & port stuff automatically.
That was a great suggestion. Version 1.0.0.34 posted which removed the whole specific address part.

Quote:
Originally Posted by beerygaz View Post
Lastly, and it's another minor aesthetic issue. Is is possible to change SONOSCONTROLLER to mixed case in the System field?
Which System field are we referring to? Now we are talking about aesthetics . I can look at it but want to make sure I don't break anything because a lot of functions of HS center around the plug-in name and I'm not sure how case sensitive their implementation is (including updater etc)

Dirk
Reply With Quote
  #26  
Old November 4th, 2010, 11:06 AM
dcorsus dcorsus is offline
OverSeer
 
Join Date: Mar 2010
Location: California
Posts: 3,514
Quote:
Originally Posted by mbdirtfarmer View Post
My homeseer webserver runs on port 88 so the changes to the image location have some consequences.

http://192.168.1.220/SonosController/images/noart.jpeg

needs to be http://192.168.1.220:88/SonosControl...ges/noart.jpeg for my setup.

i am pretty sure there are many other people not running on default port 80.

you may need to pull this info from homeseer, or set up a variable in the ini.

--
Alan
Alan,

try again with version V1.0.0.34

Dirk
Reply With Quote
  #27  
Old November 4th, 2010, 11:24 AM
beerygaz's Avatar
beerygaz beerygaz is offline
Super Seer
 
Join Date: Mar 2006
Location: Johannesburg, South Africa
Posts: 1,592
Dirk, awesome work mate, artwork working from all locations!

Never mind about the mixed case thing, it really is trivial.
Reply With Quote
  #28  
Old November 4th, 2010, 01:54 PM
pwhite8314
Guest
 
Posts: n/a
I'm not sure why all threads are getting moved to a single huge thread, but anyway, for my TTS problem....

I messed around with it some more, and can only assume the issue was with the HS Speaker app (the source of many issues previously), as when I restarted that, and reselected the voice, it started to work - awesome! This is more progress than I've had with any other Sonos plugin!

So, next question....it does suspend the current Sonos activity for TTS, but doesn't return it to it's prior state once the TTS has played out. Am I missing a command? Noting that I'm using the scripted command

&hs.speakex 60, "This is a test"

Not the drop-down Speak option in event settings (which I can't get to work for some reason). I'm guessing I need to insert a $SONOS$TTS$ somewhere, just not sure where...

Thanks...

Last edited by pwhite8314; November 4th, 2010 at 02:06 PM. Reason: added info
Reply With Quote
  #29  
Old November 4th, 2010, 03:18 PM
dcorsus dcorsus is offline
OverSeer
 
Join Date: Mar 2010
Location: California
Posts: 3,514
Quote:
Originally Posted by pwhite8314 View Post
I'm not sure why all threads are getting moved to a single huge thread,
I'm the one to blame, was envisioning some tree structure with few topics at the highest level, but realized that you now lose the threading option. I'll promise to stop doing it

Quote:
Originally Posted by pwhite8314 View Post
So, next question....it does suspend the current Sonos activity for TTS, but doesn't return it to it's prior state once the TTS has played out. Am I missing a command? Noting that I'm using the scripted command
Nope there is nothing further to be done and from your traces it clearly indicated the plug-in is dealing with the off event. So that brings us to what service was active when you activated the TTS? I've had problems with differences between playing regular tracks (like from your PC) versus on-line Napster or Radiostations .... Some of them required specific handling to restore. It appears yours may be one of those requiring special care or I broke something in the TTS implementation when I added Linking for music.

So any chance to describe which service was active prior to TTS, try it with other services and see if that differ and describe what you see on the controller for that zone after the TTS event was over. By the way, are you running Sonos SW3.3 and if so, did you upgrade to at least v1.0.0.31? You can grab the latest beta here (http://board.homeseer.com/showthread.php?t=144724). Hope there aren't other things broke with Sonos' release of SW R33. Also confirm this is a regular zone not a WD100 (although they should also work as of V1.0.0.31)


Quote:
Originally Posted by pwhite8314 View Post
Not the drop-down Speak option in event settings (which I can't get to work for some reason). I'm guessing I need to insert a $SONOS$TTS$ somewhere, just not sure where...
When you create an event, go to the Action tab, select option Speak, now make sure you click on Advanced View (upper right corner). You now should see the option to "wait for speech to finish" and you also see a box to enter the Speaker host. It is in this box that you need to set the name of the speaker prepended by the $SONOS$TTS$ prefix. If you don't know the name of the speaker, if you go to the HS web page, click on Interface, it is at the bottom ( I think, going of memory, can't pull it up here)

Dirk
Reply With Quote
  #30  
Old November 4th, 2010, 03:53 PM
pwhite8314
Guest
 
Posts: n/a
OK, so I've got the normal speaker function working, prepended with $SONOS$TTS$ - thanks!

In all cases, when I play the TTS, I see the (v3.3) PC controller correctly switch to the line-in for the Master Bedroom ZP120, then play the TTS. What it switches back to seems a little inconsistent:

1. When playing Sirius, it appears to switch back to that source, but does not restart it (allowing for the buffering delay)

2. When playing from the music queue, it does something odd. The first time, it switched back to the Sirius station, but didn't play it. The second time, it appears to switch back to the queue, and according to the time slider on the track display, it was still playing the song (it wasn't). When I flicked between zones to force a screen refresh, it had indeed gone back to the Sirius feed. Is it possible things are just happening 'a bit quick' for Sonos, so it gets momentary confused? Certainly, that seems to be the case for the Sonos PC app.

I tried the same thing using when a radio stream was playing, same outcome as (1) above.

I'm currently using 1.0.0.30 of the plug-in.
Reply With Quote
  #31  
Old November 4th, 2010, 03:54 PM
pwhite8314
Guest
 
Posts: n/a
Well, now I see you mention upgrading the plug-in....d'oh....give me a few minutes and I'll test with the latest.
Reply With Quote
  #32  
Old November 4th, 2010, 04:00 PM
pwhite8314
Guest
 
Posts: n/a
Well, not a huge success with 0.34, now it doesn't switch to the line in source at all. Here's the log

11/4/2010 2:59:00 PM - Event - Event Trigger "Test Sonos TTS using standard speech"
11/4/2010 2:59:00 PM - SONOSCONTROLLER - SpeakIn called for Device = 0, Text = This is another test, Wait=True, Host = $SONOS$TTS$HOMECONTROLPCEFAULT
11/4/2010 2:59:00 PM - SONOSCONTROLLER - SpeakerProxy activated with HostName = HOMECONTROLPCEFAULT Text = This is another test and LinkgroupName = TTS
11/4/2010 2:59:00 PM - SONOSCONTROLLER - HandleLinking called with LinkgroupName = TTS and OnEvent = True
11/4/2010 2:59:00 PM - SONOSCONTROLLER - HandleLinking done with LinkgroupName = TTS and OnEvent = True
11/4/2010 2:59:00 PM - TTS - Speak: (HOMECONTROLPCEFAULT):This is another test
11/4/2010 2:59:01 PM - SONOSCONTROLLER - HandleLinking called with LinkgroupName = TTS and OnEvent = False
11/4/2010 2:59:01 PM - SONOSCONTROLLER - HandleLinking done with LinkgroupName = TTS and OnEvent = False
Reply With Quote
  #33  
Old November 4th, 2010, 04:19 PM
dcorsus dcorsus is offline
OverSeer
 
Join Date: Mar 2010
Location: California
Posts: 3,514
Quote:
Originally Posted by pwhite8314 View Post
Well, not a huge success with 0.34, now it doesn't switch to the line in source at all. Here's the log

11/4/2010 2:59:00 PM - Event - Event Trigger "Test Sonos TTS using standard speech"
11/4/2010 2:59:00 PM - SONOSCONTROLLER - SpeakIn called for Device = 0, Text = This is another test, Wait=True, Host = $SONOS$TTS$HOMECONTROLPCEFAULT
11/4/2010 2:59:00 PM - SONOSCONTROLLER - SpeakerProxy activated with HostName = HOMECONTROLPCEFAULT Text = This is another test and LinkgroupName = TTS
11/4/2010 2:59:00 PM - SONOSCONTROLLER - HandleLinking called with LinkgroupName = TTS and OnEvent = True
11/4/2010 2:59:00 PM - SONOSCONTROLLER - HandleLinking done with LinkgroupName = TTS and OnEvent = True
11/4/2010 2:59:00 PM - TTS - Speak: (HOMECONTROLPCEFAULT):This is another test
11/4/2010 2:59:01 PM - SONOSCONTROLLER - HandleLinking called with LinkgroupName = TTS and OnEvent = False
11/4/2010 2:59:01 PM - SONOSCONTROLLER - HandleLinking done with LinkgroupName = TTS and OnEvent = False

OK, time for "Plan B". Can you turn the debug flag on and go through your sequence and perhaps just email me (dirk@famcorsus.com) the result because it could be quite extensive and not sure we want to burden this thread with it.

Another thing to try, is to link/unkink for "music". If you put a ";" behind your Sourcelinkgroupname than the plug-in won't switch to audio-input but just streams whatever is playing on the source zone to all the destination zones. The reason I would like you to try it has to with how I implemented the two. A while back I was obsessed about the time it took to switch back and forth and I removed any command that deemed unnecessary (like saving queue, send play etc) because from my testing, when I switch a zone to another zone's audio-input, the sonos players maintain their queue information so I can switch back and forth pretty efficiently. This is not true in the "link for music case", here the plug-in stores everything and restores everything. Would be interesting to know whether that scenario works fine which could indicate that I over optimized a bit for TTS

Maybe one more question: do all the zones exhibit the same "lost after TTS off" or some do and some don't? I wonder whether I missed something during testing.

My Sirius account ran out after 30 days of trial so I may have to sign up but hope we can figure it out from your traces.

Thanks for your help and sorry to read that you're struggling

Dirk
Reply With Quote
  #34  
Old November 4th, 2010, 04:35 PM
pwhite8314
Guest
 
Posts: n/a
Linking to the music source for the Master Bedroom zone as opposed to TTS didn't seem to make any difference. I'll now set the debug flag and send the results via email.

Don't worry about the snags, being the tester is way easier than being the developer :-)
Reply With Quote
  #35  
Old November 4th, 2010, 04:50 PM
dcorsus dcorsus is offline
OverSeer
 
Join Date: Mar 2010
Location: California
Posts: 3,514
Quote:
Originally Posted by pwhite8314 View Post
Linking to the music source for the Master Bedroom zone as opposed to TTS didn't seem to make any difference. I'll now set the debug flag and send the results via email.

Don't worry about the snags, being the tester is way easier than being the developer :-)

By the way, did you remove the extra blanks from your ini file? Just want to rule out everything. These are the blanks before after the "=" character in your Linkgroup items

Dirk
Reply With Quote
  #36  
Old November 6th, 2010, 11:30 AM
pwhite8314
Guest
 
Posts: n/a
Thumbs up It works!

Just wanted to publicly say thanks to Dirk for all the support over the past couple of days, the plug-in is now working perfectly for me
Reply With Quote
  #37  
Old November 6th, 2010, 12:02 PM
dcorsus dcorsus is offline
OverSeer
 
Join Date: Mar 2010
Location: California
Posts: 3,514
Quote:
Originally Posted by pwhite8314 View Post
Just wanted to publicly say thanks to Dirk for all the support over the past couple of days, the plug-in is now working perfectly for me
Well thank YOU Peter for pointing out a few bugs and figuring out what the deal was with XP's settings vis-a-vis UPNP. The info will go straight into the help file and I'm sure others will benefit from it.

For those who are using this forum for information. In this case ( a Windows XP PC), everything appeared to work (ignoring the bugs ) except, no real-time updates were happening. The plug-in could perfectly communicate with the players but updates from the player (like start/stop/pause/track playing/volume changes ....) were not reaching the plug-in.

This article (http://support.microsoft.com/kb/886257) describes what to do and Peter followed it step by step and got his configuration to work.

Dirk
Reply With Quote
  #38  
Old November 7th, 2010, 12:36 PM
cbarner cbarner is offline
Seer
 
Join Date: Dec 2007
Location: New England
Posts: 42
Crashing HS2 after install

Help. This PI seems to be just what I was looking for. However, when I stall 35 on HS2 2.4.0.66, it does not automatically enable, and as soon as I do enable it, it crashes Homeseer and I have to reinstall.

Anybody else have this problem? Am I doing something wrong in the install. I only see the two files: Setup and Install plug-in. Are there files I'm supposed to be putting in but am not or perhaps it is conflicting with my old Sonos Init?

Christian
Reply With Quote
  #39  
Old November 7th, 2010, 01:13 PM
dcorsus dcorsus is offline
OverSeer
 
Join Date: Mar 2010
Location: California
Posts: 3,514
Quote:
Originally Posted by cbarner View Post
Help. This PI seems to be just what I was looking for. However, when I stall 35 on HS2 2.4.0.66, it does not automatically enable, and as soon as I do enable it, it crashes Homeseer and I have to reinstall.

Anybody else have this problem? Am I doing something wrong in the install. I only see the two files: Setup and Install plug-in. Are there files I'm supposed to be putting in but am not or perhaps it is conflicting with my old Sonos Init?

Christian
Hi Christian,

to bad to read about your struggles. This is the first time I read or have heard about the PI crashing HS. Just to start from a clean slate, go to the windows systems page and uninstall any previous versions of this plug-in and then run the setup. At the end of the set-up the installer asks if you want to enable the PI, just leave it clicked ON. When you now restart HS, it should create everything properly. If you even want to be "safer", after the first step (the uninstall) make sure the subdirectory under HS root \html named SonosController is deleted. This will delete any old setting.

Now going through the checklist, which Windows version are you running? Is the PC up to date in .NET framework, it should have (at least) version 2 with latest SP and patches. Is the sentry on? Any other plug-ins that might conflict. If you have XP, check in the HS setup page whether HS is discoverable via UPNP. For whatever reason, I've seen some strange behavior on my XP machine (only XP, Vista / W7 seem fine) , sometimes errors but no bad behavior but I still don't trust it too much.

If we start sending lot's of stuff back and forth, suggest you email me in private at dirk@famcorsus.com. I will be out for the next 2~3 hours but on-line this afternoon.

Dirk
Reply With Quote
  #40  
Old November 7th, 2010, 02:22 PM
Toby Lankester Toby Lankester is offline
Seer
 
Join Date: Feb 2001
Location: Reading, Berkshire, Great Britain
Posts: 15
Dirk,

Many thanks for your earlier emails, we have now got the link all to work just as you described.

One minor niggle; every time we restart our HomeTroller (even with a save to C: drive) the Sonos plugin reverts to "trial" and we have to re-register with the password. This has become a bit annoying after about the 6th time!!

Anyway thank for this plugin which has allowed me to link my alarm system to Sonos.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 01:31 AM.


Copyright HomeSeer Technologies, LLC