www.homeseer.com

Go Back   HomeSeer Message Board > HomeSeer > General Discussion Area

General Discussion Area General discussion about HomeSeer that does not fall into any other category or are not specific to 1.x or 2.x versions of HomeSeer.

Reply
 
Thread Tools Display Modes
  #1  
Old November 22nd, 2009, 11:35 PM
manxam manxam is offline
Seer Plus
 
Join Date: Oct 2009
Location: Canada
Posts: 102
Default Event Action Delayed but should be immediate

Hey! I'm wondering if someone can help shed some light on something for me.

I have a Sonos ZP90 connected to an amplifier and am using the Sonos Real Time Script to update the "Transport State" (play/stop/pause) in HSPRO to power up/down and adjust inputs on my amplifier as required.

I have an event that is triggered when the Sonos Real Time Script changes this particular's zone to "Changed", it then executes, and changes the status back to "Unchanged". When the Sonos changes songs, stops, or pauses, it then again changes the status to "Changed" and the cycle begins again.

I use this logic to check if the Sonos has started playing or has been stopped/paused for a given amount of time (at which point the receiver should turn off)

My issue is that there is a good 40+ second delay between the HSPRO log showing the status change to "Changed" and the event being run. There are no delays setup in the event or script so I'm not certain what's causing it.

I've included a small sample of the log to show this effect. The first time the event takes 48 seconds to run, the second 52.

Any help would be greatly appreciated!

Thanks

Code:
11/22/2009 9:17:12 PM  Sonos HS virtual device "Sonos Bonus Room Status Change" has been updated.
11/22/2009 9:18:00 PM  Event Event Trigger "Sonos Power State"
11/22/2009 9:18:00 PM  Event Running script in background: SonosPower.vb   
11/22/2009 9:18:08 PM  Sonos Updating virtual device status of Bonus Room
11/22/2009 9:18:08 PM  Sonos All virtual device property monitors for Bonus Room have been updated.
11/22/2009 9:18:08 PM  Sonos HS virtual device "Sonos Bonus Room Status Change" has been updated.
11/22/2009 9:19:00 PM  Event Event Trigger "Sonos Power State"   
11/22/2009 9:19:00 PM  Event Running script in background: SonosPower.vb
Reply With Quote
  #2  
Old November 23rd, 2009, 07:02 AM
dschoppe dschoppe is offline
Seer Master
 
Join Date: Aug 2004
Location: NC
Posts: 802
Default

Manxam,

I don't use Sonos, so I can't answer for certain, but what does your "Sonos Power State" event look like? You don't have any "do not retrigger for xx seconds" options configured do you? Also, are you using a device status change trigger or conditional trigger for this event?

Thanks,
Don
Reply With Quote
  #3  
Old November 23rd, 2009, 12:22 PM
manxam manxam is offline
Seer Plus
 
Join Date: Oct 2009
Location: Canada
Posts: 102
Default

Thanks for your response Don. I do not have any 'do not trigger..." options set (often times there is 4-5 minutes between status changes (avg length of song)).

I have used both device status change and conditional with Status Change is Changed and both are delayed.

Is it possible that while the Sonos script is changing the status to changed/unchanged, the script is not exiting at this time? That HS is waiting for for the script to complete before starting the event?

Call me confused.

Thanks!
Reply With Quote
  #4  
Old November 23rd, 2009, 03:05 PM
dschoppe dschoppe is offline
Seer Master
 
Join Date: Aug 2004
Location: NC
Posts: 802
Default

Quote:
Originally Posted by manxam View Post
Is it possible that while the Sonos script is changing the status to changed/unchanged, the script is not exiting at this time? That HS is waiting for for the script to complete before starting the event?
Hmmm. How many scripts are involved in this? Are you possibly making multiple calls into the same script from different events and do you possibly have the option enabled to allow only one instance of the script to run?
Just grasping here...
Reply With Quote
  #5  
Old November 23rd, 2009, 05:16 PM
manxam manxam is offline
Seer Plus
 
Join Date: Oct 2009
Location: Canada
Posts: 102
Default

Only two scripts involved. One being the Sonons Real Time Script in question, and the second run by the event that is getting delayed. This "script" has a small case statement looking for STOP, PLAY, PAUSE and then triggers a the appropriate device.

It's written in VB.net and is only a couple of lines. It shouldn't delay anything. Also, as the event that runs this script is getting delayed, I doubt that this is it.

Thanks again for your help.
Reply With Quote
  #6  
Old November 23rd, 2009, 06:06 PM
Rupp's Avatar
Rupp Rupp is online now
OverSeer
 
Join Date: Jan 2001
Location: Huntsville, Al. USA
Posts: 34,926
Default

What's your CPU level when the "real time" script is running? I wonder if it could be CPU blocking causing delays.
__________________
-Rupp
Reply With Quote
Reply

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 09:32 PM.


Copyright 1998-2008 HomeSeer Technologies, LLC