It is currently Fri Sep 10, 2010 2:47 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 27 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: CM11A X10 (serial)
PostPosted: Sat Jan 31, 2009 3:02 am 
Plugin Developer

Joined: Sun Nov 23, 2008 4:22 am
Posts: 22
The CM11A X10 interface is natively supported via serial interface, no other software is needed. Most basic X10 commands are implemented. Events get generated for any command the CM11A receives from the powerline. Macro functionality is not implemented as I do not use it and do not think that it would add much to what Eventghost already offers.

The plugin automatically responds to CM11A's request to initialize after power failure. Besides X10 commands, it can also send a reset command that is helpful when the CM11A gets corrupted (which seems to happen every once in a while).

Code attached.


Attachments:
File comment: Patched version of SerialThread.py.
If you have problems sending X10 commands, deploy this file in the eg/Classes directory.

SerialThread.py [20.02 KiB]
Downloaded 69 times
File comment: Version 0.3.2, updated 10/7/2009.
Unpack the content in the plugins directory.

CM11A.zip [4.25 KiB]
Downloaded 88 times


Last edited by m3flyin2lo on Wed Oct 07, 2009 3:39 am, edited 3 times in total.
Top
 Profile  
 
 Post subject: Re: CM11A X10 (serial) plugin
PostPosted: Fri Mar 13, 2009 12:09 am 

Joined: Thu Mar 12, 2009 11:54 pm
Posts: 14
i also have a CM11A and have tried you plugin but i get the following error when i try to do anything with it,

Stack trace (most recent call last) (851):
File "C:\Program Files\EventGhost\eg\Classes\UndoHandler\NewEvent.py", line 51, in Do
File "C:\Program Files\EventGhost\eg\Classes\TreeItem.py", line 81, in Create
File "C:\Program Files\EventGhost\eg\Classes\ThreadWorker.py", line 307, in CallWait
Traceback (most recent call last):
File "C:\Program Files\EventGhost\eg\Classes\MainFrame\__init__.py", line 352, in FuncWrapper
func()
File "C:\Program Files\EventGhost\eg\Classes\MainFrame\__init__.py", line 839, in OnCmdAddEvent
).switch(self.document)
File "C:\Program Files\EventGhost\eg\Classes\UndoHandler\NewEvent.py", line 51, in Do
item = document.EventItem.Create(parent, pos, name=label)
File "C:\Program Files\EventGhost\eg\Classes\TreeItem.py", line 81, in Create
self = eg.actionThread.CallWait(partial(cls, parent, node))
File "C:\Program Files\EventGhost\eg\Classes\ThreadWorker.py", line 309, in CallWait
"Timeout in %s.CallWait()" % self.__class__.__name__
Exception: Timeout in ActionThread.CallWait()

PLEASE HELP ME


Top
 Profile  
 
 Post subject: Re: CM11A X10 (serial) plugin
PostPosted: Fri Mar 13, 2009 12:11 pm 
Plugin Developer

Joined: Sun Nov 23, 2008 4:22 am
Posts: 22
What version of Eventghost and what OS are you on?


Top
 Profile  
 
 Post subject: Re: CM11A X10 (serial) plugin
PostPosted: Wed Mar 25, 2009 4:57 am 

Joined: Thu Mar 12, 2009 11:54 pm
Posts: 14
o wait nvm thanks for your offered help tho!! i fixed it on my own sorry it took me so long to reply


Top
 Profile  
 
 Post subject: Re: CM11A X10 (serial) plugin
PostPosted: Wed Apr 15, 2009 2:35 am 

Joined: Wed Apr 15, 2009 2:32 am
Posts: 2
Hi,

I have a CM11a and I'm trying to use this plug-in.
Forgive me if I'm asking something stupid, I've only found EventGhost today (and its looking very good so far).

I have been using my own X10 console app that I wrote in C# but I thought I would give this CM11a app a try as it would integrate much better (with events and all that) but I have a problem....

I'm using the latest release version of EventGhost (v0.3.5c.908) and it says, when I try and add the CM11a plug-in I see:
Code:
Can't read __init__.py for plugin "CM11A"
in the log window.

Have I missed something stupid of is this a genuine problem? Is there any special configuration I need to perform?

If its important, I'm running on Windows Server 2008 x64 and everything else I have tried in EventGhost so far is working.

Thanks,
Phil


Top
 Profile  
 
 Post subject: Re: CM11A X10 (serial) plugin
PostPosted: Wed Apr 15, 2009 3:30 am 

Joined: Wed Apr 15, 2009 2:32 am
Posts: 2
I have now tried the latest beta version (v0.3.6.1476) and have different results.
It still failed but I was able to fix it.

Bugs I have found so far:

Line 161: The open command passed too many arguments, the "8N1" seems to be the problem here. I remove it and it opened the port.

Line 333 (and others):
The second parameter to SendReceive , chr(header+cmd) gave an error because header+cmd = 256 in my case (command=brighter, brightness=95) which is not a valid character (chr). After looking at my C# code and the sendreceive function, I figured this return argument was not needed as such, so I changed ALL lines containing
self.SendReceive(chr(header)+chr(cmd), chr(header+cmd))
to
self.SendReceive(chr(header)+chr(cmd), chr(0))

Now it seems to work OK, but my X10 light switches don't send events, so there is actually no real benefit to me using this plug-in over my console app, which means I can also use the X10 device from other programs as the com port is not tied up all the time. So for now I will probably leave it as it was.

Thanks for the plug-in though - and I hope if anyone else has problems, this post may help sort it out.
Phil


Top
 Profile  
 
 Post subject: Re: CM11A X10 (serial) plugin
PostPosted: Wed Apr 15, 2009 4:04 am 
Plugin Developer

Joined: Sun Nov 23, 2008 4:22 am
Posts: 22
The problems you are having are most probably due to the fact that you are not using the latest release. I would recommend 0.3.6.1487, that's the one I am running at it's been pretty stable. This release included some features that were added to the Serial interface for this plugin in particular (e.g. supporting odd/even parity).

I used to be in the same situation as you: running a separate Java-based X10 app. Eventghost + CM11a plugin makes things a lot easier, particularly when using the Timer plugin (to schedule events) or responding to events from other units.

Try this release and let me know if you still have problems.


Top
 Profile  
 
 Post subject: Re: CM11A X10 (serial) plugin
PostPosted: Wed Apr 15, 2009 4:10 am 
Plugin Developer

Joined: Sun Nov 23, 2008 4:22 am
Posts: 22
philg wrote:
I have now tried the latest beta version (v0.3.6.1476) and have different results.
It still failed but I was able to fix it.

Bugs I have found so far:

Line 161: The open command passed too many arguments, the "8N1" seems to be the problem here. I remove it and it opened the port.

Line 333 (and others):
The second parameter to SendReceive , chr(header+cmd) gave an error because header+cmd = 256 in my case (command=brighter, brightness=95) which is not a valid character (chr). After looking at my C# code and the sendreceive function, I figured this return argument was not needed as such, so I changed ALL lines containing
self.SendReceive(chr(header)+chr(cmd), chr(header+cmd))
to
self.SendReceive(chr(header)+chr(cmd), chr(0))

Now it seems to work OK, but my X10 light switches don't send events, so there is actually no real benefit to me using this plug-in over my console app, which means I can also use the X10 device from other programs as the com port is not tied up all the time. So for now I will probably leave it as it was.

Thanks for the plug-in though - and I hope if anyone else has problems, this post may help sort it out.
Phil


Good catch on the overflow bug, fixed and uploaded a new version.
Thanks!


Top
 Profile  
 
 Post subject: Re: CM11A X10 (serial) plugin
PostPosted: Sun May 03, 2009 9:32 pm 

Joined: Sun May 03, 2009 9:13 pm
Posts: 2
I was wanting to try out your plugin but it says it does not exist anymore. I was wondering if you could upload it again. Thanks alot! I was to use this to dim my lights when movies are played :-) I use a command line program currently. Thanks a bunch!


Top
 Profile  
 
 Post subject: Re: CM11A X10 (serial) plugin
PostPosted: Sun May 03, 2009 10:03 pm 
Plugin Developer

Joined: Sun Nov 23, 2008 4:22 am
Posts: 22
73challenger wrote:
I was wanting to try out your plugin but it says it does not exist anymore. I was wondering if you could upload it again. Thanks alot! I was to use this to dim my lights when movies are played :-) I use a command line program currently. Thanks a bunch!


Where are you trying to download it from? There is an attachment in the first post of this thread, with a ZIP file in it. Works fine for me. Did you try that one?


Top
 Profile  
 
 Post subject: Re: CM11A X10 (serial) plugin
PostPosted: Sun May 03, 2009 10:09 pm 

Joined: Sun May 03, 2009 9:13 pm
Posts: 2
Thats weird...it works now! The link might have broke because i was using server 2008?


Top
 Profile  
 
 Post subject: Re: CM11A X10 (serial) plugin
PostPosted: Sun May 03, 2009 10:17 pm 
Plugin Developer

Joined: Sun Nov 23, 2008 4:22 am
Posts: 22
73challenger wrote:
Thats weird...it works now! The link might have broke because i was using server 2008?


Out of the box Windows Server has all sorts of restrictions on websites and downloads through IE, maybe that was the issue.


Top
 Profile  
 
 Post subject: Re: CM11A X10 (serial) plugin
PostPosted: Tue Sep 15, 2009 2:45 am 

Joined: Sun Sep 06, 2009 12:34 pm
Posts: 8
This plugin is almost working for me.
It talks to my CM12 (CM11A but Australian 240V model) but I get
CM11A Unknown event: 66
for A1 ON.

All commands are unknown events.

I will play around with python code but I am a n00b who hasn't done much numeric stuff during my learning of python basics.


Top
 Profile  
 
 Post subject: Re: CM11A X10 (serial) plugin
PostPosted: Tue Sep 15, 2009 12:17 pm 
Plugin Developer

Joined: Sun Nov 23, 2008 4:22 am
Posts: 22
What version of Eventghost and Windows are you on?

One thing to try: in the __init__.py script for this plugin, search for "CM11A Unknown event" and a couple of lines above you will see a commented print statement. Uncomment it so that it shows the content of the buffer received from your CM12. Post that, it might help figure out what is going on.


Top
 Profile  
 
 Post subject: Re: CM11A X10 (serial) plugin
PostPosted: Tue Sep 15, 2009 2:33 pm 

Joined: Sun Sep 06, 2009 12:34 pm
Posts: 8
OK no problem. WinXP EG 0.3.7.r1076

Code:
11:20:33 PM   CM11A.ACK
11:20:33 PM   ('Buffer: 66', 1)
11:20:33 PM   CM11A Unknown event: 66
11:20:34 PM   ('Buffer: 020162', 3)
11:20:34 PM   CM11A.X10 'A.On'


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 27 posts ]  Go to page 1, 2  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 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