4.4 testing

Post Reply
Message
Author
User avatar
kherron
Posts: 639
Joined: Mon Dec 05, 2011 10:44 am
Location: Jacksonville, Fl.
Contact:

4.4 testing

#1 Post by kherron » Thu Nov 13, 2014 2:38 pm

I currently only have 2 X-10 modules setup in OSA.

A5 - Back Porch Lights
A11 - Front Porch Lights.

If I run ON/OFF methods, both work fine.

However, I have an Event Script setup on the Weather Object that turns these on at Night and off at Day.

Here is the Script Processor Log:

Code: Select all

11/13 05:30:08 PM	INFO	OSAE.ScriptProcessor.ScriptProcessor	Executed Script	 
11/13 05:30:08 PM	INFO	OSAE.ScriptProcessor.ScriptProcessor	Found Script: Back Porch Lights On	 
11/13 05:30:08 PM	INFO	OSAE.ScriptProcessor.ScriptProcessor	Executed Script	 
11/13 05:30:07 PM	INFO	OSAE.ScriptProcessor.ScriptProcessor	Found Script: Front Porch Lights On	 
However in the CM15A log I have this:

Code: Select all

11/13 05:30:10 PM	DEBUG	OSAE.CM15A.CM15A	ReadCommPort SPAM (Exiting Sub, this is normal)	 
11/13 05:30:10 PM	ERROR	OSAE.CM15A.CM15A	Error params Back Porch ON (a7 ON)	 
11/13 05:30:10 PM	DEBUG	OSAE.CM15A.CM15A	ReadCommPort SPAM (Exiting Sub, this is normal)	 
11/13 05:30:10 PM	ERROR	OSAE.CM15A.CM15A	Error ProcessCommand ON OFF - The component is configured to use synchronization and this method call would cause a deadlock to occur. (Exception from HRESULT: 0x8004E005)	 
11/13 05:30:10 PM	DEBUG	OSAE.CM15A.CM15A	ReadCommPort SPAM (Exiting Sub, this is normal)	 
11/13 05:30:10 PM	ERROR	OSAE.CM15A.CM15A	Error ProcessCommand 1a1 - The component is configured to use synchronization and this method call would cause a deadlock to occur. (Exception from HRESULT: 0x8004E005)	 
11/13 05:30:10 PM	DEBUG	OSAE.CM15A.CM15A	ReadCommPort SPAM (Exiting Sub, this is normal)	 
11/13 05:30:10 PM	DEBUG	OSAE.CM15A.CM15A	ReadCommPort SPAM (Exiting Sub, this is normal)	 
11/13 05:30:10 PM	DEBUG	OSAE.CM15A.CM15A	ReadCommPort SPAM (Exiting Sub, this is normal)	 
11/13 05:30:10 PM	DEBUG	OSAE.CM15A.CM15A	ReadCommPort SPAM (Exiting Sub, this is normal)	 
11/13 05:30:10 PM	DEBUG	OSAE.CM15A.CM15A	ReadCommPort SPAM (Exiting Sub, this is normal)	 
11/13 05:30:10 PM	INFO	OSAE.CM15A.CM15A	Set ObjectFront Porch's State to On	 
11/13 05:30:09 PM	INFO	OSAE.CM15A.CM15A	Executed Front Porch ON (a11 ON)	 
11/13 05:30:09 PM	DEBUG	OSAE.CM15A.CM15A	Received :recvrf,a11,On,0,11/13/2014 10:30:09 PM
And the Back Porch Lights do not come on?

Any Idea?

Vaughn
Site Admin
Posts: 1432
Joined: Thu May 13, 2010 2:17 pm

Re: 4.4 testing

#2 Post by Vaughn » Thu Nov 13, 2014 8:01 pm

X10 is slow, so maybe the script is pushing the commands too close together. X10 needs 1 second in between commands. The plugin may need to help that and put a delay in before it responds to the next command.

In my 64-bit world though, I can't run the CM15A anymore, so I have not worked on it in a long time.


Vaughn

User avatar
kherron
Posts: 639
Joined: Mon Dec 05, 2011 10:44 am
Location: Jacksonville, Fl.
Contact:

Re: 4.4 testing

#3 Post by kherron » Fri Nov 14, 2014 5:24 am

Is there a WAIT command or something I can use in a script to delay the second command, and see if that is the issue here.

I had this issue once before, and it seemed to go away until now.

Automate
Posts: 1691
Joined: Sat Dec 11, 2010 1:44 pm
Location: US

Re: 4.4 testing

#4 Post by Automate » Fri Nov 14, 2014 9:43 am

@kherron you could try a PowerShell script. It has a delay function. Use something like

Start-Sleep -s 1

Vaughn
Site Admin
Posts: 1432
Joined: Thu May 13, 2010 2:17 pm

Re: 4.4 testing

#5 Post by Vaughn » Fri Nov 14, 2014 10:17 am

It is not really a scripting issues, but a plugin issue. After sending an X10 command, the plugin just needs a Sleep(500) command or the such.

Vaughn

Automate
Posts: 1691
Joined: Sat Dec 11, 2010 1:44 pm
Location: US

Re: 4.4 testing

#6 Post by Automate » Fri Nov 14, 2014 10:34 am

@Vaughn are you sure? I didn't think the OSA service makes sure a Method call is complete before doing other tasks. I thought the methods are run in a separate thread.

Otherwise a single hung Method could stop OSA from doing anything else.

Vaughn
Site Admin
Posts: 1432
Joined: Thu May 13, 2010 2:17 pm

Re: 4.4 testing

#7 Post by Vaughn » Fri Nov 14, 2014 1:26 pm

Automate wrote:@Vaughn are you sure? I didn't think the OSA service makes sure a Method call is complete before doing other tasks. I thought the methods are run in a separate thread.

Otherwise a single hung Method could stop OSA from doing anything else.
I am not referring to the service at all, just the CM15A plugin. It should only be able to run a single instance of Process_Command() at a time. So if you send 2 commands, it will run them one after the other, if the pause is in Process_Command, the second command will wait for the first to finish. With no impact to the Service.

Vaughn

User avatar
kherron
Posts: 639
Joined: Mon Dec 05, 2011 10:44 am
Location: Jacksonville, Fl.
Contact:

Re: 4.4 testing

#8 Post by kherron » Fri Nov 14, 2014 5:23 pm

I did reverse the order they were in the script so that the Back Porch comes on first. And I did not get the error this evening, and the Front Porch worked too.

Will see what happens in the morning when they get turned Off.

Post Reply