Page 2 of 2

Re: synology package : how to use x10 protocol

Posted: Saturday 27 February 2016 10:28
by franzelare
The USB device is visible in the configuration screen of synology as an external device
Connecting the first time takes a while, a few failures are visible in the log, but when it is connected I see devices coming in.
So learned all my the devices into domoticz to migrate them from the raspberry pi to the synology

Direct commands from the command line don't work seem to work, but they are not realy needed since you can do the same using json commands through domoticz

One thing I have to look into is that I disabled RF on the unit before and now I see RF signals coming in
So will hook the unit up to a windows PC later and see if the internal settings changed and RF is now enabled...

But after a reboot of the synology the controller can't be connected
2016-02-27 09:58:38.486 TCP: Reconnecting...
2016-02-27 09:58:38.487 Mochad: Can not connect to: 127.0.0.1:1099
2016-02-27 09:58:38.487 TCP: Connection problem (Unable to connect to specified IP/Port)
2016-02-27 09:58:38.487 TCP: Reconnecting in 30 seconds...
Until domoticz crashes, stops and my script restarts it.
CPU load remains about 15% so it is not crashing due to the load

I disabled and enabled the device in domoticz, no luck...
Removed the drivers from the package center and re-installed them, no luck...
Disconnected the device and re connected, no luck

When connecting the first time after a reboot, domoticz seems to see the mochad driver connecting:
2016-02-27 10:15:00.559 Mochad: Can not connect to: 127.0.0.1:1099
2016-02-27 10:15:00.559 TCP: Connection problem (Unable to connect to specified IP/Port)
2016-02-27 10:15:00.559 TCP: Reconnecting in 30 seconds...
2016-02-27 10:15:02.373 Incoming connection from: 192.168.2.250

after the first time, domoticz seems to crash faster and faster, the number of times it failed connections seem to get smaller after every crash, but that can also be just a variation due to other trafic

do you need any logging?
any tips, tricks?
remove persistent USB devices from the synology in some way? or fix the device on a adres?

Re: synology package : how to use x10 protocol

Posted: Saturday 27 February 2016 10:48
by franzelare
or is there a way to let domoticz think it is connected to check if there is data coming in or transmitted correctly?

Re: synology package : how to use x10 protocol

Posted: Saturday 27 February 2016 14:01
by jumbotroll
Sorry, I can unfortunately not provide any support on mochad , because I do not use this.
Have just cross compiled package so that you guys can play with it.
If you do not find mochad to work on synology, I will delete packages.

Re: synology package : how to use x10 protocol

Posted: Saturday 27 February 2016 19:13
by franzelare
it did work on the first try, so will play around with it to check if I can get it working again....
if I figure out a trick to get it functional I will post it here

Re: synology package : how to use x10 protocol

Posted: Sunday 28 February 2016 11:06
by franzelare
figured out that whn I start mochad from the command line, the device does connect and if I start it again, the connection is stopped and restarted
I updated the start_daemon in /var/packages/domoticz/scripts/start-stop-status
added to the last line:
/volume1/@appstore/mochad/bin/mochad

Now the unit works after a reboot of the nas or restart of domoticz

so keep the package! and possibly add this info to the wiki?

Re: synology package : how to use x10 protocol

Posted: Sunday 28 February 2016 13:22
by jumbotroll
It should not be necessary to start mochad according mochad readme.
https://sourceforge.net/p/mochad/code/c ... ree/README
Thought 91-usb-x10-controllers.rules would take care of it.
This file is located in /mochad/rules.d and mochad should start when you plug in the device.

#rules for mochad
Subsystem == "usb", ATTR {idVendor} == "0bc7" ATTR {idProduct} == "0001", RUN + = "/ usr / local / mochad / bin / mochad"
Subsystem == "usb", ATTR {idVendor} == "0bc7" ATTR {idProduct} == "0002", RUN + = "/ usr / local / mochad / bin / mochad"

Maybe this file needs to be changed or moved to another location?

== Run it

Plugging a CM15A or CM19A should launch mochad. There no need to run mochad
by hand or run it from /etc/rc.local. mochad is launched by a udev rule that
matches the CM15A and CM19A USB vendor and product ID codes.

Re: synology package : how to use x10 protocol

Posted: Tuesday 01 March 2016 13:49
by franzelare
that is set correct...
but doesn't seem to work

Re: synology package : how to use x10 protocol

Posted: Sunday 22 May 2016 23:55
by squixz
So, what is the solution now? I've tried to start mochad manually with telnet on the synology but can't get the device connected to Domoticz properly and even the manual pl-commands don't work. Domoticz works fine but keeps coming with the "reconnecting in 30 seconds error". The CM15APRO works ok too and can be operated with a remote control or through an ancient windows app. So mochad on a Synology 6 maybe not working anymore? Any help appreciated.

Re: synology package : how to use x10 protocol

Posted: Monday 23 May 2016 12:10
by franzelare
solution for me was to get a raspi3 and use that to run X10 commands... with a CM15Pro and CM11a to also be able to read back the dimmer actual of 2 way dimmers.