New Architecture for X10 PLI Plugins

Not sure how much interest there would be in this, as I’m not sure how many people are still using X10 devices with Vera. As I pointed out in another post, I am fairly new to Vera and my house is almost all X10 controlled and I was using MisterHouse for years. I purchased the Vera and an Insteon PLM when I read it could be backwards compatible with my X10. I plan to eventually convert most everything to Z-Wave, but it will take some time.

I was disappointed to see that the support provided by the Insteon device was not very good. No 2-way communication with my 2-way devices, long lag times before switching on/off stuff, and not good support for dimming switches.

I was happy when I found this thread by yoocesar,

http://forum.micasaverde.com/index.php/topic,10817.0.html

especially since my controller is a CM11A. I installed the plugin and it for the most part worked well, much better than the Insteon PLM.

Being a software developer by trade, I of course wanted to learn and understand luup and immediately started dissecting the plugin to learn and improve upon it. Some of the changes I incorporated were:

Support for extended dim switches
Support for SmartLinc switches (preset dim)
Better standard X10 dimming support.
Make the plugin actually listen and check checksums and acks sent by the CM11.
Have it update status properly from extended/presetdim info received over the PLM.

When that was all done and working, I began to look at the overall architecture of the plugin. I noticed that anytime I wanted to add a new type of X10 device, I would have to hard code support for it into the plugin. This seemed not quite right, as the CM11 is just a PLI. It should just send and receive X10 commands regardless of what kind of device is using it. So I set out to split up the functionality and make something that could be used not just for the CM11, but any X10 PLI (CM17, etc).

So, the main plugin for the CM11 now provides a service contract that has basically two actions. One is SendX10Command, and the other is RegisterX10Device. In turn, separate X10 devices have their own service contract which supports the UpdateStatus action which will be called by the controller when it receives status info.

Then I created separate devices for things like X10BinarySwitch, X10Dimmer, X10ExtendedDimmer, X10SmartLinc, X10DoorSensor, etc. These devices register their X10 ids with the controller and receive status updates from the controller. All the logic for how to handle dimming, etc., is built into the device file, not the CM11 plugin. The devices where possible are of the standard categories/sub categories and use the standard actions, so they show up in remote applications.

So, if there is any interest in this, let me know and I will post the files. They aren’t packaged up as a real plugin yet (one step at a time), but I can provide detailed instructions for installing and using.

Many thanks to yoocesar for the great work he did on the initial implementation of the CM11 plugin.

Bruce

Hello Bruce,

There are always people looking for X10 support as they start their migration to ZWave or alternative supported solutions.

I believe that this would get wider use then you may expected and no doubt their a number of members that still have x10 devices that they may decide to now use if they had the options to do so.

Please please post. I do the something similar with http and virtual devices

Sent from my GT-N7100 using Tapatalk

I second the request to post :slight_smile:

It’s coming. Just cleaned up the code a bit in preparation for uploading. Should be up tomorrow.

Bruce

Hello.

This is a very old thread, but it could be of high interest for me, so, I ask a couple of questions hoping someone could answer them?.

1.- Would these pluggins/app work in a new VERA Edge (UI7 I assume) box that says does not support X10?
2.- Would these pluggins/app work with CM15Pro/CM19 modules?

Thanks and kind regards.

[quote=“fje, post:6, topic:179537”]Hello.

This is a very old thread, but it could be of high interest for me, so, I ask a couple of questions hoping someone could answer them?.

1.- Would these pluggins/app work in a new VERA Edge (UI7 I assume) box that says does not support X10?
2.- Would these pluggins/app work with CM15Pro/CM19 modules?

Thanks and kind regards.[/quote]

I just upgraded my VeraLite to UI7 from UI5 today. It looks to me like my CM-11A plugin is not working, but I have to figure out what might be the problem.

In answer to your questions, if I get it working on UI7 again, then yes, it should work on your Edge.
I wrote the plugin to be fairly modular, so I always thought someone could adapt it to another controller. The other controller would have to use the exact same command set as the CM11 or it would need to be modified.

Thanks for your answer?. I will stay looking to this thread waiting for your possible advances.

Kind regards

I’m currently using MochaD on a Raspberry Pi to do my X10 stuff with Vera… It would be nice having a plugin that is native to Vera…