Mochad X10 connection refused

I’ve installed the Mochad X10 gateway on my RasPi and the Mochad binding. Created dimmer items to control lights. I am sending X10 powerline commands to a CM15A device connected via USB to my RasPi. All works fine and I can control the lights. Unfortunately, this only lasts a few minutes. Then the connection drops.

Has anyone else experienced this issue? I assume it is possible that the the Mochad gateway is hanging or crashing . . .

Openhab log:

2017-11-16 20:20:57.664 [ERROR] [.mochadx10.internal.MochadX10Binding] - Received a “null” message
2017-11-16 20:21:17.694 [ERROR] [.mochadx10.internal.MochadX10Binding] - IOException: Connection refused (Connection refused) while trying to connect to Mochad X10 host:
2017-11-16 20:21:22.956 [ERROR] [.mochadx10.internal.MochadX10Binding] - IOException: Connection refused (Connection refused) while trying to connect to Mochad X10 host:
2017-11-16 20:21:22.966 [ERROR] [.mochadx10.internal.MochadX10Binding] - IOException: Socket closed while trying to send a command to Mochad X10 host:

I believe this is caused by an issue with the udev rule as per this link:

this worked for me to fix the issue (so far!):

Steps to fix issue:

  1. sudo rm /etc/udev/rules.d/91-usb-x10-controllers.rules
  2. wget
  3. tar zxvf master.tar.gz
    3a. cd mochad-master*
  4. ./configure
  5. make
  6. sudo make install

Also, for anyone looking to install the Mochad X10 Gateway, for example via the instructions here, should be aware that the version returned by GitHub is not the latest version. the latest version is available here:

Finally, note that if you are using a CM15A device to interface with the powerline, you first have to get a copy of ActiveHome Pro running on a PC, hook the device up to the PC and clear the memory.

Well, I am walking this back. While the issue did go a away for a bit it reappeared and I really cannot get the whole X10 thing to be stable. Again, my setup is running the Mochad gateway on the same raspi as I am running openhabian.

I got a new error today (see below), and I have decided to uninstall the Mochad X10 binding until I have more time to try to figure out what is going in. I am still thinking that the primary issue is the Mochad Gateway, but I cannot verify that.

017-11-21 07:21:59.882 [WARN ] [] - EventAdmin: Exception during event dispatch [org.osgi.service.event.Event [topic=openhab/command/OfficeLtsWork2] {bridgemarker=true, item=OfficeLtsWork2, command=100} | {, org.osgi.service.event.EventHandler}={event.topics=openhab/command/*,,,,, service.bundleid=201, service.scope=bundle} | Bundle(org.openhab.binding.mochadx10_1.10.0 [201])]
at org.openhab.binding.mochadx10.internal.MochadX10Binding.internalReceiveCommand([201:org.openhab.binding.mochadx10:1.10.0]
at org.openhab.core.binding.AbstractBinding.receiveCommand([182:org.openhab.core.compat1x:2.1.0]
at org.apache.felix.eventadmin.impl.handler.EventHandlerProxy.sendEvent([]
at java.util.concurrent.Executors$[:1.8.0_152]
at java.util.concurrent.ThreadPoolExecutor.runWorker([:1.8.0_152]
at java.util.concurrent.ThreadPoolExecutor$[:1.8.0_152]