View unanswered posts | View active topics It is currently Thu Apr 24, 2014 2:32 pm



Reply to topic  [ 342 posts ]  Go to page: Previous  1 ... 4, 5, 6, 7, 8, 9, 10 ... 23  Next
 Sonos - The Beginning 
Author Message

Joined: Dec 20, 2010
Posts: 684
Post Re: Sonos - The Beginning
I'm having a tough time replicating the thread issue, but will keep trying. Mat - which process thread count was increasing? Is it the Python process that is running the plugin or pycpoint.py?

Thanks.


Fri Feb 24, 2012 8:19 pm
Profile WWW

Joined: Nov 25, 2010
Posts: 316
Location: Suffolk - UK
Post Re: Sonos - The Beginning
Not sure how to tell.

In activity monitor with the plugin disabled, python processes hold a fairly stable thread number. Two processes are root users and two are "logged in" users.

With the plugin active, one of the root user processes starts rising. This is a different "pid" ref to the ref given in indigos log when the pluging starts. When the plugin is stopped, the thread count stops increasing. If the plugin is restarted, the count rises again.

Port numbers are also rising when I click inspect, as is real, virtual and virtual private memory.

If I quit the process in activity monitor, the plugin stops working, with the "attempt again in 10 seconds" error - does this mean the plugin is causing an error in sonospy?

Tried to stop sonospy and got a no such process error. Restarted sonospy and plugin - thread count rising again.

Hope that helps!??! It's lost me now!


Sun Feb 26, 2012 9:16 am
Profile

Joined: Dec 20, 2010
Posts: 684
Post Re: Sonos - The Beginning
mat - I'm still working on the threading/memory issues. I haven't given up on this yet. Also working on selecting playlists and radio stations. Hopefully I'll have a release before the weekend is over.


Sat Mar 03, 2012 10:09 am
Profile WWW

Joined: Nov 25, 2010
Posts: 316
Location: Suffolk - UK
Post Re: Sonos - The Beginning
No probs. sorry I can't assist more, but that's beyond me.

Anything else I can do, just shout!


Sun Mar 04, 2012 8:50 am
Profile

Joined: Dec 20, 2010
Posts: 684
Post Re: Sonos - The Beginning
Think I hit a snag with the Radio - created a procedure to query for the entire list to maintain a local database of stations and it seems I am now cut off. Will wait a while and see if I get access back.


Sun Mar 04, 2012 2:23 pm
Profile WWW
User avatar

Joined: Jan 15, 2012
Posts: 196
Location: Ridgefield, CT
Post Re: Sonos - The Beginning
This is a great endeavor and I for one applaud you for taking it on. Best of luck! This may be a dumb question but what does one do with a Python extension? How does that get incorporated into Indigo? Also, could you give me an idea of what your goals are for what you are doing? What functionality are you planning for? I can not help code, but may have some ideas on functions.

_________________
John Patrick
http://patrickweb.com


Sun Mar 04, 2012 4:28 pm
Profile WWW

Joined: Dec 20, 2010
Posts: 684
Post Re: Sonos - The Beginning
My plugin calls the SonsoPy extensions - basically I use them for all the real communications with the ZonePayers. So you would just drop that package in your computer and launch the sonospy_web script. The plugin configuration asks for the name or ip address of the computer it is installed on. There is no other configuration required.

My goals with the plugin are to have basic control of each ZonePlayer (play, pause, mute, ff, few, etc), switch between sources, and select playlists or radio stations. It also polls each ZonePlayer continuously for status updates. I'm only three weeks in to this and still have a lot of work to do. There is a semi-functional beta available for download. If you nay have one ZonePlayer like I do, I'm not sure you will see the memory and threading errors that others are experiencing.


Sun Mar 04, 2012 5:24 pm
Profile WWW

Joined: Nov 25, 2010
Posts: 316
Location: Suffolk - UK
Post Re: Sonos - The Beginning
How about just favourite radio stations?


Wed Mar 07, 2012 1:15 am
Profile

Joined: Dec 20, 2010
Posts: 684
Post Re: Sonos - The Beginning
Unfortunately I don't seem to have any access to favorites - that was my original objective with Radio. I've worked out a scheme where I can save the entire radio station tree by location to a file and can refer to it for actions. I figure it does not update that often, so should be useful. Other good/bad news is that I'm now seeing my Mac crap out due to this plugin so clearly see that it is hogging resources - just have not figured out what the deal is yet.

Getting there... very slowly...


Sun Mar 11, 2012 1:58 pm
Profile WWW

Joined: Nov 25, 2010
Posts: 316
Location: Suffolk - UK
Post Re: Sonos - The Beginning
Shout if I can do anything


Sun Mar 11, 2012 3:07 pm
Profile
User avatar

Joined: Jan 15, 2012
Posts: 196
Location: Ridgefield, CT
Post Re: Sonos - The Beginning
Does anyone have a basic applescript that will turn the Sonos on or off? I want to start with the basics and make sure that works before adding more functionality.

_________________
John Patrick
http://patrickweb.com


Sun Mar 11, 2012 3:49 pm
Profile WWW

Joined: Dec 20, 2010
Posts: 684
Post Re: Sonos - The Beginning
From AppleScript, I would want to call out to curl to engage the SonosPy extensions - seems like the easiest way. Mat has done a good bit of work on this. I do ask that you try out the plugin I've been working on. It may quickly get you to where you want to be.


Sun Mar 11, 2012 6:17 pm
Profile WWW

Joined: Dec 20, 2010
Posts: 684
Post Re: Sonos - The Beginning
I've got an update posted. The following changes are in this version:

  • Added plugin option to enable/disable polling of ZonePlayers
  • Added menu option and action to import RadioTime stations to file for use in actions
  • Added action to tune to Internet radio station by location
  • Half implemented action to engage a Sonos Playlist (does not yet properly start queue)

It's been a couple of weeks so better to publish what I have - there are some incremental improvements to the load issue, although certainly not rectified. And I have an exception issue when the radio station database becomes out of sync. Think a scheduled action to update once per day would make that a non-issue, but I still need to code around it.


Sun Mar 11, 2012 6:20 pm
Profile WWW

Joined: Jun 10, 2011
Posts: 257
Post Re: Sonos - The Beginning
Loaded the new version and got the following errors with polling turned on

Sonos Error Error getting ZonePlayer data: Portable
Sonos Error Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
File "plugin.py", line 46, in runConcurrentThread
File "/Library/Application Support/Perceptive Automation/Indigo 5/Plugins/Sonos.indigoPlugin/Contents/Server Plugin/Sonos.py", line 71, in runConcurrentThread
File "/Library/Application Support/Perceptive Automation/Indigo 5/Plugins/Sonos.indigoPlugin/Contents/Server Plugin/Sonos.py", line 429, in getPlaylists
File "/Library/Application Support/Perceptive Automation/Indigo 5/Plugins/Sonos.indigoPlugin/Contents/Server Plugin/Sonos.py", line 132, in sendMessage
File "/Library/Application Support/Perceptive Automation/Indigo 5/IndigoPluginHost.app/Contents/PlugIns/plugin_base.py", line 85, in errorLog
<class 'Boost.Python.ArgumentError'>: Python argument types in
ServerInfo.log()
did not match C++ signature:
log(CCString message, CCString type='', bool isError=False)

Sonos Error plugin runConcurrentThread function returned or failed; will attempt again in 10 seconds

Turned polling off and got the following errors


Sonos Error Error getting ZonePlayer data: Office%20%28ZP%29
Sonos Error Error in plugin execution ExecuteAction:

Traceback (most recent call last):
File "plugin.py", line 57, in actionPlay
File "/Library/Application Support/Perceptive Automation/Indigo 5/Plugins/Sonos.indigoPlugin/Contents/Server Plugin/Sonos.py", line 166, in actionGeneric
File "/Library/Application Support/Perceptive Automation/Indigo 5/Plugins/Sonos.indigoPlugin/Contents/Server Plugin/Sonos.py", line 132, in sendMessage
File "/Library/Application Support/Perceptive Automation/Indigo 5/IndigoPluginHost.app/Contents/PlugIns/plugin_base.py", line 85, in errorLog
<class 'Boost.Python.ArgumentError'>: Python argument types in
ServerInfo.log()
did not match C++ signature:
log(CCString message, CCString type='', bool isError=False)


Mon Mar 12, 2012 2:26 pm
Profile

Joined: Dec 20, 2010
Posts: 684
Post Re: Sonos - The Beginning
Can you try the same thing with debug mode turned on. It should be telling of the issue - probably some string formatting issue. Thanks.


Mon Mar 12, 2012 3:40 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 342 posts ]  Go to page: Previous  1 ... 4, 5, 6, 7, 8, 9, 10 ... 23  Next

Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.   Template designed by STSoftware.