Hi, I’m just getting started with HASS, but I’ve been using one HA system or another for the past 15 years or so. As such, I still have some legacy X10 devices I’d like to continue to use. I’m trying to get Mochad working with HASS but I’m having some troubles.
I can see this in the interface and get no errors so I think my configuration for HASS is okay. I’m using HASSbian image on a RPi3 using a CM19A. I installed mochad per the instructions. I do have one oddity in that I can only run mochad using ‘sudo mochad -d’ . I’m not sure what the issue is there, but I have had the same thing happen to me when running OpenHAB but mochad functions despite the odd way I have to start it.
Any help with getting this working would be most appreciated. I only really use the PalmPad Remote Control units but we use them very often so this is one of the critical things I need to get going before I can switch to HASS. I’m open to any other X10 options that might be available.
With netcat? Yes… I can send commands … I tried the X10cmd you wrote and it works so communications are working. I’m only interested in the button presses on the remote so I really need the receiving side to work. I do see data come in when I press the buttons on the remote so that appears to be working too.
By PalmPad, I assume you mean something like an HR12A?. If I’m guessing what you are trying to do correctly, you want to be able to control your X10 devices with the palmpad and have the device state updated in HA?
That won’t work with the mochad controller currently as it does not have support for querying X10 device status.
Sorry… I was not descript at all in what I want to do. I’m currently using OpenHAB and I use the X10 remote (HR12A) as an easy way to do this:
Button B3 -> ON -> Triggers a rule that turns on Zwave lights in living room
Button B3 -> OFF -> Triggers a rule that turns off Zwave lights in living room
Button B4 -> ON -> Triggers a rule that raises current cool set point on Zwave thermostat by one degree
Button B4 -> OFF -> Triggers a rule that raises current cool set point on Zwave thermostat by one degree
Button B5 -> ON -> Triggers a rule that turns on whole house fan (Zwave thermostat)
Button B5 -> ON -> Triggers a rule that turns on whole house fan (Zwave thermostat)
So really it’s just a simple input device.
Is this possible with mochad? The remote buttons are very similar to what a motion detector would send. I’m guessing that those work in Home Assistant via mochad?
Thank you again for taking the time to help. I am on gitter chat if you prefer to communicate that way.
Let me make sure I understand. You’re saying that mochad controller can send commands (like B3 ON) but it can’t receive commands like I’m trying to do?
Yes. If you send B3 on using Home Assistant, the controller does not read the state from the mochad daemon and Home Assistant simply assumes B3 is now on. If another device or controller sends B3 off, Home Assistant will not be notified and Home Assistant will still show the device as being on.
Please forgive me for continuing to bother you. I think that this may be what I need to solve this problem https://github.com/ChrisArgyle/mochad_dispatch … Unfortunately I am such a newbie with python that I do not understand how to compile/set it up. It uses a setup.py file. I tried this and it did not work:
Are you sure? All of my X10 devices are RF based. The remote control is and I do have some motion detectors that I may or may not use. I just don’t know how to get the dang thing set up. Thank you for your patience. I’ve been working on HA stuff for a long time but I’m still very green when it comes to building things when problems arise.
This will send all X10 received commands to MQTT and from there you can do whatever you want with the payload. I’ve copied that line to a script file that I call using cron on reboot. It’s been working great for close to a year now.
@dinki , thanks for the script., however this only passes through RF based commands and not all X10 received commands that PL based. Tried all possible variations.
@vicom what devices are not being picked up? I use this for both RF and PL. I tweaked it for a separate command to correctly parse X10 security devices.
@netrunner, all command sent through as PL are not being processed by the script. only my RF MS13 modules. I use the MT10A with buttons to turn on/off X10 devices via PL. The script doesn’t process the commands. I can see the command when i use “nc”. I think it’s because PL command are sent as two separate lines by Mochad , unlike the one line RF based ones. I might be mistaken. Care to share your script? TIA