Plugin for cm15a/cm19a X10 Controllers /w Mochad Linux Daemon (full send/recv)

I just got my Vera3 and looking to utilize my X10 RF devices (motion sensors, door/window sensors, etc)…

It looks like the Mochad does not run directly on the Vera - is this correct?

I have a router with Tomato firmware installed - will it run on that?

How well does it work with the Vera? Anything special/specific I should want out for?

thx for the help

@radarengineer,

Once again, thanks for your tips!

Of course, modify a remote. I would have started out trying to wire across the buttons and simulate a button press to get the stored house/unit code to be sent. Looks like the reference you referred to is a bit more ambitious. Tapping into the remote as they suggest, would the low level X10 commands need to be sent? Kind of seems like it.

I’ve ordered a remote to experiment with. If anything comes of it, I’ll be sure to share my experiences. I might start with hooking something up to my Loftek 3200. It has an alarm block. Seems like it should be easy to get it to send some useful X10 signals. I tried it before with a DS10A. However, the Loftek’s alarm output contacts are normally open, which is backwards to what the DS10A expects. Consequently, the routine ‘normal’ messages sent to prove the DS10A is still alive were interpreted as alarms. And the DS10A sends security codes instead of simple house/unit codes. That tends to limit it’s compatibility with other X10 devices.

The normally open property of a button that can emit an X10 rf signal could be just the ticket.

Is this code still working with Vera 3, UI5?

I’m considering getting a Pogo Plug to run my CM19a & X10 motions sensors… but I want to make sure this is still working before I buy the Pogo and go through all the work to set it all up.

thx!

I have an issue with the mochad plugin using the instructions on the plugin wiki. I have a veralite that I just purchased and installled the plugin, but no virtual devices are shown. There is no error communicating with mochad that I can see and mochad is running correctly on my other box and tested with netcat.

Are there any new instructions for the mochad plugin when using UI5 on a veralite?

Thanks

Brad

@crush157, did you go into the advanced settings and fill out the list of your devices in the variables section?

(e.g., BinaryModules, DimmableModules)?

If that doesn’t help we might have to do a bit more digging.

We probably have some digging to do. I had set the variable for BindaryModules with 5 devices (in the form of A1,A2) and some SoftStartModules. One thing is I do not see these variables show up in the settings tab in the mochad device after I add them. Should I be seeing them?

Thanks

Brad

Also, a heads up that I may not have access to the forums for a few days, but I am interested in getting to the bottom of this with you.

Worse case I might have to put together a debug build for you that prints out some more debug messages to the log.

EDIT: Actually, I don’t think you should see them in the settings tab. I think they will just show up in the bottom of the advanced tab. Unfortunately, I can’t check mine right now to be sure.

Thanks radarengineer, I’m in no hurry. Appreciate your help.

Hello, this is my first post on this forum. I came here looking for help on getting a CM19A working with mochad on a Pogoplug running Arch Linux Arm. I seem to be having the same problems that khyizang talked about a year ago. When I run ‘mochad -d’, I get this message:

libusbx: error [op_open] libusbx requires write access to USB device nodes. mochad.c:628:Could not find/open CM15A/CM19A -5

I made the changes to the /etc/udev/rules.d suggested by radarengineer, but that didn’t seem to fix the problem. I know it’s been a while since this was discussed, but has anybody solved this problem?

So, some digging into the LuaPNP.log shows the following errors:

01 04/22/13 19:01:40.786 Device_LuaUPnP::LoadDeviceDoc #8 can’t parse name /uuid:4d494342-5342-5645-0008-0000021628dd <0x2b7d3000>
01 04/22/13 19:01:40.788 JobHandler_LuaUPnP::CreateDevice_LuaUPnP failed to load 8/D_Mochad1.xml so device 8 is offline <0x2b7d3000>
01 04/22/13 19:01:40.903 Device_LuaUPnP::CreateServices Aborting device 8 because the topmost device has no interface <0x2b7d3000>
01 04/22/13 19:01:40.904 JobHandler_LuaUPnP::CreateAllServices failed to create 8 <0x2b7d3000>
02 04/22/13 19:01:40.937 Device_Service::MatchupUpnpServices no upnp service for urn:micasaverde-com:serviceId:ZWaveDevice1 <0x2b7d3000>
02 04/22/13 19:01:40.940 Device_Service::MatchupUpnpServices no upnp service for urn:micasaverde-com:serviceId:ZWaveDevice1 <0x2b7d3000>
02 04/22/13 19:01:40.943 Device_Service::MatchupUpnpServices no upnp service for urn:micasaverde-com:serviceId:ZWaveDevice1 <0x2b7d3000>
02 04/22/13 19:01:40.946 Device_Service::MatchupUpnpServices no upnp service for urn:micasaverde-com:serviceId:ZWaveDevice1 <0x2b7d3000>
02 04/22/13 19:01:40.949 Device_Service::MatchupUpnpServices no upnp service for urn:micasaverde-com:serviceId:ZWaveDevice1 <0x2b7d3000>
02 04/22/13 19:01:40.952 Device_Service::MatchupUpnpServices no upnp service for urn:micasaverde-com:serviceId:ZWaveDevice1 <0x2b7d3000>
01 04/22/13 19:01:40.952 Device_LuaUPnP::CreateImplementations Aborting 8 because it failed to load <0x2b7d3000>
01 04/22/13 19:01:40.953 JobHandler_LuaUPnP::CreateAllImplementations failed to create 8 <0x2b7d3000>
06

I assume I have a problem getting the device setup.

Is there other debugging I can turn on to see what the issue is?

Thanks

Oh, well. I deleted all the install files from /etc/cmh-lu and /etc/cmh-ludl and started all over. Now it is working. I now see the variable definitions in advanced and can set them accordingly. Much better.

Thanks

Well, now to a different question since I seem to have this working.

This is more of a Luup question. The Luup code has the “incoming” method set to receive data from mochad. This only seems to receive data if a command was sent out to mochad from the UI. So the incoming method is not a permanent callback for the TCP I/O port? I was expecting to see if mochad got an Rx command over the cm15a that it would call the mochad device in Luup for incoming data and it does not.

Thanks

There are two blocks in an implementation file.

If an has both and element as as a child, then that section will be called when data comes in over the serial channel, if that job is still in progress (by virtue of it returning 5 some time in the past).

If no job is in progress, then the global section is called instead. This element is a child of the root element.

There’s a bit more to it than that, but that’s the gist. See the wiki for the official version.

The latter block should be getting these unsolicited messages that you mention.

Hmm, it sounds like I might need to make some tweaks to the implementation file then.

Any posibilty to send extended commands to manage window blinds

Regards

Anyone have windows blinds X10 modules working with mochad gateway?

Regards

Any developer fix this?

Sorry to kick up the dust on a old thread. I’m relatively new to the forum but I’ve been diligently reading it for the past few months. First, a BIG thanks to radarengineer for developing this plugin for MOCHAD. I’ve got MOCHAD running on an RPi interfacing with my Veralite so I could use my existing X10 stuff along with Insteon (Altsteon) and Z Wave. I love having the capability of a “universal” system!

After getting MOCHAD and this plugin up and running with my CM15a I found that several of my X10 devices would not respond properly over PL (powerline) commands. RF seemed to be fine for those devices, but when I switched to PL-only commands, they stopped working. Specifically, I could turn them off, but not turn them on. And dimming didn’t work at all. I tried setting them up as both “DimmableModules” and “SoftstartModules”. As “DimmableModules”, they would respond properly to an “OFF” command, but when sending “ON”, the light would turn on and then immediately dim to 0 (off). As “SoftstartModules”, they would not respond at all. After a considerable amount of experimenting and using the MOCHAD cli, I came to the realization and conclusion that none of my x10 devices responded to the “xdim” command, even though I thought they were “softstart” based on the way they turned on. As it turns out, they were actually SmartLinc devices that were set up with an X10 address. As one of their features, you can set the turn on/off ramp rate, so this made them appear to be “softstart” devices even though they were not.
After studying the L_Mochad1.lua file, I was able to modify the code in the area for “function set_pl_dim(lul_device, lul_settings, dev_x10_id)” that would restore proper bright and dim control to these devices using the standard DIM and BRIGHT commands.

In addition, I discovered that the dim/bright range varied, depending on the device. Some had a 0-31 range, while others had a 0-15 range. Since I don’t have any true “Softstart” devices, I modified the code to use the “SoftstartModules” category for the 0-15 devices and the “DimmableModules” category for the 0-31 devices. I would have preferred to create a new category for the 0-15 devices, but I was not able to figure out how to do that so that it would appear in the ‘Mochad Control’ advanced tab in the Vera UI.

I would be happy to share the modified L_Mochad.lua file with anyone interested.

Again thanks to radarengineer for this great plugin.

Well, got the plugin installed and mochad on my pogo mobile, and it all just works ™… The only thing that doesn’t work is PL Rx… But that seems to be an issue with my CM15Pro! :frowning:
If I look at it in ActiveHome, it shows everything except incoming PL commands as well!

I’d love to see the incoming commands as well, but this will (hopefully) meet the minimum requirements while I slowly migrate to Z-Wave… I’d just love to be able to see the PL commands from the X10 Alarm unit! :frowning:

(Oh, and I forgot: the LM12 modules (Marmitek X10 plugin dimmers) don’t work properly! They work when you send on/off or dim, but but require ‘bright’ to be sent to increase brightness, and the plugin doesn’t seem to do that?..)

Anyway… Thanks Radarengineer for maintaining such a great plugin! :smiley:

Ok, my CM15Pro now seems to receive PL commands again. However on the pogoplug it keeps disconnecting/reconnecting on USB. I fixed udev on it (by doing “ln -s /etc/udev/rules.d/91-usb-x10-controllers.rules /usr/lib/udev/rules.d/”) so it restarts mochad on dis-/re-connect, but (Still doesn’t work! Earlier it complained it couldn’t startup mochad, when I did “udevadm trigger -s usb”, because it was running, and now I needed it to start mochad, it didn’t start it! >:( )whenever this happens, a red warning ‘led’ appears on the mochad device, and it doesn’t seem to work anymore, and definitely doesn’t restart comms!

Also, on UI5, where can I find the alarm extensions by localuser? He mentions checking in some extra files for UI4, but I don’t see those files on my VeraLite?
(NOTE: I noticed the version in the vera downloads - at least for UI5 - is the 1.0 version…)

BTW: I switched the setting from PL to RF, and now the LM12 modules DO work. it definitely seems to have to do with the DIM/BRIGHT commands and lack of XDIM support. (RadarEngineer stated earlier that on PL both DIM and XDIM allow for direct setting of the dim state. This is true for XDIM. DIM always dims by the stated amount. To brighten you’ll need to send ‘BRIGHT xx’, at least for the LM12 plugin dimmer…)