Page 1 of 1

Mochad compatibility with Raspbian Stretch

Posted: Thursday 04 January 2018 16:35
by amercat37
I've been working on upgrading from a Pi B+ with Weezy and Domoticz 2.xx to a Pi 3 with Stretch and the latest Domoticz.

It seems everything is working great except for mochad. I can build it just fine, but when I echo any commands to nc 1099 it just hangs forever.

Has anyone else tried mochad with Stretch? I could just go to Jessie instead if I had to. I would just like to upgrade to the latest when possible.

I've tried mochad 0.1.16 and 17.

Re: Mochad compatibility with Raspbian Stretch

Posted: Tuesday 30 January 2018 16:36
by amercat37
So I've given up on Mochad, and X10. Time to upgrade to something more modern.

[SOLVED] Re: Mochad compatibility with Raspbian Stretch

Posted: Thursday 10 May 2018 16:31
by Hansbit
SOLVED!
Had the same problem with Stretch and Mochad. Found a useful workaround. (after hours of searching :x )

Just add a timeout (-w1) of 1 second to your nc command:

Code: Select all

echo "st" | nc -w1 localhost 1099
This works great for me. I've updated my domoticz_main script.
Even more secure, now mochad can never cause the proces to hang.

Re: Mochad compatibility with Raspbian Stretch

Posted: Wednesday 03 April 2019 15:31
by Thuis
Hello, i have this also, mochad crashing domoticz after a while. I am a linux newbie, so before i go search for hours, could you tell me where or how to put:
echo "st" | nc -w1 localhost 1099
this?

maybe i put it in rc.local or in .bashrc, really i have no clue, please could someone help me or explain to me where i can put this.

I can type it on the cli, but where do i put it so it will start when the pi starts? Thanks in advance.

Ok ill put it in ~/.bashrc

thanks for this.