X10/Mochad limitation or incorrect usage?

We just recently installed HA on a raspberry pi, installed Mochad and plugged in a X10 CM15a so we’re real newbies.

I have a bunch of X10 modules defined as Mochad switches/lights and have been able to schedule them via HA automation. When an automation turns on these devices the icons do correctly show as turned on in the UI and conversely when off. If these modules are triggered on by a non-HA source, the UI never shows these devices as on. For example before we started to use HA, I had scripts set up on my X10 server that I could call from Google home or Alexa. If I ask Google to turn on one of these devices, HA never knows that it has changed state. Is this a limitation of Mochad, an incorrect setup on my part or do I need to constantly do some polling of these modules from HA to know their status?

I have several X10 eagle eye motion detectors as well as motion flood lights. I was hoping to know when these devices detect motion to trigger other devices/events.Just to test if any change of state was detected with these devices I set up automations that would increment counters. Nothing has ever been detected unless I physically turn on the device in HA. From what I’ve read in the Mochad documentation, I only have the choice to define these X10 items as switches - not a motion detecting device.

So my big question to any other X10/Mochad users is: can HA only send commands to X10 devices - not receive them? Thanks for taking the time to read this.

I have a lot of X10 devices still in use, but am just getting started with HA. I tried the mochad integration in HA, but could not get it to work at all. Was going to come here for help, but I found what seems to be a much better way to integrate X10/CM15a/mochad with HA that seems to work great. It does seem to update HA when switched by an X10 controller.

On github, timothyh(thank you Timothy) has project called mochad-mqtt that talks to mochad and makes all your X10 devices seem like MQTT devices. It then communicates to HA through an MQTT Message Broker. I am still testing it and have only tried switch modules so far, but it seems to have support for motion sensors and just about any type of X10 device. Mochad-mqtt is just perl scripts so even if it doesn’t work with some X10 device, should be easy to add it.

Right now I am running mochad, mochad-mqtt, and mosquitto(mqtt message broker) on a separate armbian box. I have HA running on a linux laptop and all of the X10 devices I defined in mochad-mqtt showed right up in HA and work fine. Eventually I want to put HA on the same armbian box, but I want to get all the X10 stuff fine tuned before I do.

Thanks for the info @jeffs555 Please let me know how this works out for you. Running our switch and light modules via Mochad had been working well until just recently. Now Mochad keeps going into a unusable state quite frequently. In fact, I just posted asking for help on how to test when it was in this state - How to test for non-functioning addon?.

I gave up trying to use all of the eagle eyes and motion floodlights. I was capturing the motion on a different PC and sending api notification to HA. Sounded like a good idea since I had 2 - CM15a’s but I ended up with dueling controllers. We’re in the process of switching these motion modules to zwave.

So if there is a better way to integrate X10 devices, I’m all in. Please let me know how everything works out.

I made changes to the mochad-mqtt script to allow input from X10 RF devices and have been running it about a week with X10 keypads and motion sensors. Seems to be working fine. I also packaged it as HA addon so I could run it on the same Raspberry PI that is running HAOS. If you want to try it, I put it up on Github. It installs like the Mochad addon. In HA go to addons, then addon store, then click the 3 dots at top right and select repositories. Then add GitHub - jeffs555/mochad-mqtt-ha-addon: Home Assistant Addon for X10 - provides gateway between Mochad and MQTT as a repository. Then click on update in 3 dot menu, then have to go out of the addons page and back in and mochad-mqtt-ha-addon should show up in the addon store ready to be installed.