I have committed my changes to the branches\1.10 UI4.
There are three new files that will need to uploaded to vera along with the updated files.
D_MochadAlarm1.json
D_MochadAlarm1.xml
S_AlarmPartition2.xml
After uploading the files, I am not sure if you will have to delete the existing Mochad device or not. For my testing I actually deleted the exsing mochad device and then rebooted the vera.
After rebooting you will see a new variable RFSecRemote. This will be the address that needs to be added to the security console. You can either type in an exisiting remote address or make one up. (Keep in mind the last two digits are for parity, and can only be 00 or 80. 00 if there are an even number of 1’s and 80 if there are odd when you convert the first four numbers from hex to binary).
If you type in your own address you will need to put your security console into INSTALL mode and then click ARM in the Alarm Partition Device.
You can now use scenes and mobile devices to arm/disarm the x10 Security consoles.
Bummer. Just got a new CM19A. The current one doesn’t catch all the RF signals from the more distant motion sensors. I wanted to get a backup and then do an antenna mod on one to try to pull in some of the weaker signals.
The new CM19A is recognized by Windows/X10 just fine. However, it’s NOT recognized when plugged into the PogoPlug! Dang. When I invoked mochad directly, I get:
failed
2012 Feb 29 17:34:13 alarm Could not find/open CM15A/CM19A -5
Tried both open USB ports. Same error.
Old CM19A works just fine.
Googling this problem, I haven’t come up with similar reports nor any suggested fixes. Anyone else have similar experiences and/or solutions?
Also, it seems like the new CM19A’s reception is quite a bit weaker than the older CM19A that I have. 'Tis a puzzlement and not a welcome development.
lsusb with non-working CM19A plugged in side by side with the one that works:
Bus 001 Device 005: ID 0bc7:0002 X10 Wireless Technology, Inc. Firecracker Interface (ACPI-compliant)
Bus 001 Device 006: ID 0bc7:0002 X10 Wireless Technology, Inc. Firecracker Interface (ACPI-compliant)
But they sure don’t work the same. Unfortunately, I don’t have another linux box with USB 1.0 capabilities to test using a different linux machine.
Hi, I’m a newbie and I have a house full of x10 stuff that I want to use with my new VeraLite box that has the new user interface (UI5). I bought it on the assumption that I plug my cm15a into the VeraLite USB port, and then I install Mochad onto it (which shows up as a regular plug-in in the Apps area, nice!).
But after reading this thread, I’m wondering if I got it wrong as it sounds like you folks are using a separate linux box, such as a PogoPlug. So did I get it wrong?
@rollertrol, we do run mochad on a separate box. The mochad plugin for vera talks over the network to the mochad daemon (written in C) which runs on a different linux box. When I first started working on this plugin I didn’t want to mess with what was running on my Vera (other than the supported lua plugins obviously). Since then other people on the forum have had luck building and installing software outside of the Vera ecosystem. Obviously without technical support from micasaverde!
So yes, technically it is possible to run the mochad daemon on Vera itself as under the hood Vera runs on OpenWRT. I haven’t tried, but I have run the mochad daemon on an Asus wl500gpv2 router that was actually the same hardware as the Vera 1.
Of course, it is really easy to set up Linux on a pogoplug, it just requires the pogoplug and a usb thumbdrive (I recommend going with SanDisk, some cheap drives have issues booting). That will run you about $25 for the pogo and $8 for a SanDisk 8GB usb drive. Mochad is now in the ArchLinuxArm repository, which means you don’t have to build it yourself.
Either way you go I’m happy to help out as much as I can. The pogoplug route will cost a bit more (not a lot more) but it is easy and tested. Building for the Vera is “free” in the sense that you already own everything you need, but it will cost you in time. For me the extra cost of the Pogoplug has been well worth it as I use it for quite a few other things.
Incidentally, hang on to your cm15a, they don’t make them anymore and ebay prices are up through the roof! Makes me very glad I have a spare.
Reading over on the Mochad help board I see that others have noted the newer CM19As don’t work with the previous version of mochad. Apparently, a newer version has been rolled out that makes mochad compatible with these newer CM19As mochad / Discussion / Help: Suddenly not working
Any chance we could prevail upon you to roll a newer version of mochad for the pogo plug? If this setup can be made to work with the current crop of devices in the supply chain, then it won’t be relegated to those with older devices. I’ve got one of the newer units with an antenna mod already to go. It would be great to get better reception. As is, quite a few of the units tend to come and go with changes in the weather conditions.
I’ve also been keeping an eye on the transmissions from my MS10A and MS18As. I put weak batteries in the MS18A in an effort to see if the low battery indicator would be sent. I wasn’t able to detect that message before the sensor simply quit responding. It seems that the sensors relate their current ‘health’ by sending the Motion_normal_MS10A message at regular intervals.
Theoretically, monitoring for lack of a normal response from the sensor should be the means to detect communication problems. However, my MS10A recently stopped sending that message altogether! Replacing the batteries didn’t restore the normal message from that sensor. It still sends the alert message just fine but not the normal message. Fortunately, I’ll be replacing that unit with a CA9000 zwave sensor in a couple of days and that should take care of that.
The other thing I noted about the current module’s handling of the X10 sensors is that the ‘LastTrip’ variable isn’t automatically updated - at least, not for the motion sensors. I’ve been handling that in lua, but it might be something to think about including in the module - if possible.
@khyizang, yes, I can certainly get a newer build of mochad for the pogoplugs made available. It is a supported package now in the official archlinuxarm repository so I’ll just see if they can update it, otherwise I can provide a build myself.
I had to update pacman before the revised mochad version became known to pacman. Once that was out of the way, I installed the more recent version and gave it a try. No luck. I downloaded the source and built it on my main linux box and gave that a try. That did work. I could get mochad to work with the newer CM19As on that machine. Just not the pogoplug.
I’m not sure it was worth the effort. The new units could only pick up and transmit reliably within the immediate room. It had problems reaching adjacent rooms. I grabbed the older CM19A and tried it in the same location. It was able to pick up and transmit to the floor above and even picked up some of the outside signals. No comparison.
I guess the next thing to try is an antenna modification. Initial efforts in that direction using a Windows machine were not encouraging. If folks have the older X10 units, I’d advise clinging to them dearly! The current crop of CM19As may leave much to be desired.
One interesting side effect of the update, my MS10A ‘normal’ signals are now being recorded again. Strange.
@khyizang, according to X10 they will be coming out with a replacement to the cm15a 2nd quarter 2012:
I guess I’ll believe it when I see it! There are some other options. For PLC Jeff Volp has a new controller: http://jvde.us/xtb/xtb_ordering.htm
There are also some hobbyists who are interfacing Arduinos with X10:
Basically RF receiving is with a $6 RF board from ebay, RF transmit with a cm17a firecracker, and PLC is with an X10 TW523 two-way plc interface module.
If the CM15A replacement is along the lines of their CM19A replacement, I’ll be passing that one up, too. Jeez. Guess we’ll see, huh? Didn’t someone get the X10 security panel working with Mochad and/or Vera? If so, that might be another option - at least for the rf devices. To be honest, I’m not sure what all that setup does and/or doesn’t do.
I’ve been bidding on some of the TW523s on Ebay. No luck so far. X10 is quickly sliding into the category of being a hobby to fiddle with when time allows.
I’ve also been brushing up on my Arduino. The one I have has the newer USB/serial chip and isn’t immediately recognized by Vera. I’ll need to do some of the more exotic steps to get Vera to claim it. Probably worth the effort. Seems like Arduino is often the solution to holes in the existing Z wave product line.
I’ve been following the door bell alarm interface thread and also thinking about how to use Arduino to receive motion sensor input and trip recording alarms on my dad’s Qsee DVR. X10 informed me that the Universal module is now a thing of the past. I’ve set aside INSTEON for the moment, so the I/O Linc is not an option. Besides, those are pretty much one code@ - and the DVR has 4+ cams to control. I could easily imagine the TW523 receiving multiple sensor inputs and relaying those to the Arduino which, in turn, would control the respective alarm block switches. Such a scenario wouldn’t require bothering Vera, although Vera could certainly be included in the communications - if so desired. With Vera in the picture and receiving the initial motion sensor inputs, the TW523 may not be necessary as the Arduino could be connected directly to Vera via the USB port and then to the DVR via the usual mess of wiring. I haven’t explored that route yet as dad lacks a Vera.
I’m hoping to punt that project to my son. He’s usually better about such things and has more time and energy to devote to such projects.
@khyizang, I’ve been thinking about adding some Arduino’s to my home automation setup in the near future as well. I actually have a couple on order (Uno and a Mega) and quite a few ATMEGA328P-PU DIP microcontrollers on order as well so I can put together my own Arduinos. An DIY Arduno clone will cost me $4-5, and ENC28J60 ethernet modules are about $6.50.
For that price I’m seriously considering just hooking all my Aruduino models up via ethernet which would make it really easy to interface with Vera. Or at least I hope so, I obviously haven’t tried this yet.
But I guess I am a little confused by your example. If you just want to receive X10 motion sensor input (say, from a ms10a) I don’t think you need a TW523. You just need an Arduino 315MHz receiver that you can modify (~$6). Or you could use a W800 RF receiver: http://www.wgldesigns.com/w800.html
If you want to take X10 motion sensor input and then close a circuit from that (which I am assuing you want to do with the universal module) you could just get some optoisolators (PC817s are about $0.10) or a ttl level relay board (you can get one with 8x 10A relays for $8) depending on how much current you need to support. You can control this with an Arduino and then also use an ethernet module to support monitoring/controlling status via tcp/ip.
If you want to monitor a non-X10 motion sensor that just closes a circuit? In that case I would probably just take X10 out of the loop all together and just monitor the switch with an Arduino (or similar).
Personally that (motion detectors) is all I really use X10 for right now. I have a ton of those. I have quite a few other X-10 modules but mostly I’ve switched to z-wave.
You think you’re confused? You should see things from my side! You’re much further down the path than I am. Probably further than I ever will be. Arduino belongs to the realm of electronic alchemy for folks like me.
I’m guessing that the signal from the outdoor MS16As won’t make it all the way to where the Arduino would be located using typical X10 equipment. The building has thick stucco walls and seems to resist rf signals. We miss a lot of cell phone calls in there! So I imagine the signal will need to be gathered by a transceiver on the inside of the wall and transmitted by PL to the Arduino, hence the need for the TW523 to grab the PL signal. I’d love to skip all that.
Something like the W800 would probably work better, but it’s a bit pricey for something intended to be an interim solution. Eventually, it all gets replaced with wired outdoor sensors powered from the same lines used to power the CCTV cams. When that happens, we’ll run wires. So an RF shield for the Arduino that might receive the distant signals would be a more cost effective solution. Do you have specific parts you’re looking at? I like the price range you’re talking about. I could live with that. Happily.
@khyizang, maybe we should start up a thread for basic Arduino + Vera info. So first, a warning, I have no idea if these sites are generally reputable other than I have ordered from then and received my items. They are all paypal which I feel to be generally safe. I found these basically by buying ebay items and then realizing you could (typically) save a little by ordering from the sellers directly. I still always check ebay just in case.
I picked up my Mega 2560 (compatible, not a real one, $18) and an 8 channel relay ($9) at buyincoins.com. They have some other Arduino boards, and they also sell on ebay. The ethernet module is based on the is the ENC28J60 and is made by geeetech (http://www.geeetech.com/arduino-enc28j60-ethernet-module-p-263.html). You can buy it from geeetech or buyincoins but it is slightly cheaper on ebay, right now the cheapest there is $6.40 shipped.
I picked up a LOT of random electronic parts (the ATMEGA328P-PU for instance) from taydaelectronics.com. I did the really cheap shipping and was quite happy (a week or so). I think they actually packaged up a bunch of orders and shipped them to someone in the US who then reshipped it out. Everything was nicely labeled (not typical with ebay!) and in little bags (not ESD bags though). The micro controllers were in ESD foam. I think I will be ordered quite a bit from them in the future.
Just to be complete, there is a company called seeed in China that I understand has a pretty good reputation in hobbyist electronic circles. They follow the open hardware ethics a little more closely (release improved and distinct Arduino clones, not straight copies for instance). They have a PCB service which is a great deal: http://www.seeedstudio.com/depot/fusion-pcb-service-p-835.html
If I get to the point where I have a nice add on module for Vera I plan on getting some PCB made up!
You are absolutely right, there is a problem with the new mochad build. The installer adds a file:
/etc/udev/rules.d/91-usb-x10-controllers.rules
This causes mochad to be launched on boot if a cm15a/cm19a is attached or if one is plugged in. Unfortunately the path for mochad is wrong in this file. The file is only two lines and in both “/usr/local/bin/mochad” should be “/usr/bin/mochad”.
If you fix that everything should hopefully work. Very sorry it took so long for me to get to this.
Thanks for the post, but my problem was a bit different. The new version of Mochad still doesn’t recognize the new CM19As that I recently bought. I was able to get a SUSE Linux box to recognize the new hardware using the most recent mochad build but the PogoPlug is still not recognizing those devices.
Curiously, my mochad binary IS in /usr/local/bin/ and the udev rules have it right. What’s behind the differences there, dunno. The old CM19A works fine with the updated Archlinux version. The new ones still don’t.
I also haven’t had much luck applying an antenna modification to the new units. The reception of my new units is pretty bad right out of the box. Doesn’t get much beyond the adjoining rooms. My old unit reaches to the floor above and even some units outside. Very different. At this point, I don’t know what to make of things.
Could be that I’ve just run into some poorly made clones. Didn’t purchase these directly from X10. I’ll be interested to hear what other folks are finding for their new units. There must be some actual differences to warrant a new version of mochad to accommodate the newer devices.
Lacking a compelling X10 transmitter/receiver solution, I’ve been slowly replacing some of the X10 motion sensors with Intermatic CA9000s. The biggest change we’ve noticed is that there can be a significantly longer lag time before the light comes when controlled by the CA9000. Watching the display, the sensor icon changes about as quickly as an X10 sensor placed next to it. So the signal is getting to Vera quickly enough. And the X10 tripped signal can certainly impact the target lights a bit quicker, so it doesn’t seem to be a network related delay.
At this point, I’m wondering if the difference is caused by the greater logging and settings adjustments that take place for the z wave device compared to the more spartan processing that takes place when an X10 sensor fires. Regardless, one argument in favor of using X10 motion sensors/mochad might be quicker response. I wonder if others are finding similar results?
Forgot to respond to your idea about starting a separate Arduino/Vera thread. I can see merit in that idea. Personally, most of the things I have to fiddle with are X10 devices. So I imagine that anything that might come from that would still fit within this thread.
That link to the relay block was a great catch. I’ve got to get one of those! Some of the other components, however, are way beyond my capabilities.
I keep thinking that I’d like to find a way to hack an MS16A for use as a general purpose RF transmitter. It already comes with the ability to set any House/Unit code and there are more receivers available for the common House/Unit codes than there are for the security codes employed by the DS10As, etc. If something like that could be made to work, it might diminish the need to install the X10 library into an Arduino.
@Aaron, I’m a little confused about what info you want. Do you mean using an Arduino to interface the motion sensors, or? If you let me know what sensors and X10 interfaces you have (cm11a, cm15a, cm19a, etc) I will try to tell you the best way to interface with Vera.
For @khyizang and anyone else looking at using the Arduino to send X10 events:
I would take a look at the CAI Webcontroller’s method for sending X10 events. They show how to modify either a X10 Firecracker (small serial RF sender) or X10 keychain remote to send X10 commands. They also let you use a small 433MHz transmitter that you can find on ebay for a couple dollars. Any of those methods would work with the Arduino.