Mochad compatibility with Raspbian Stretch

Others (MiLight, Hue, Toon etc...)

Moderator: leecollings

Post Reply
amercat37
Posts: 8
Joined: Wednesday 19 November 2014 19:31
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Mochad compatibility with Raspbian Stretch

Post 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.
amercat37
Posts: 8
Joined: Wednesday 19 November 2014 19:31
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Mochad compatibility with Raspbian Stretch

Post by amercat37 »

So I've given up on Mochad, and X10. Time to upgrade to something more modern.
Hansbit
Posts: 38
Joined: Monday 17 February 2014 15:10
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

[SOLVED] Re: Mochad compatibility with Raspbian Stretch

Post 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.
User avatar
Thuis
Posts: 273
Joined: Tuesday 11 September 2018 11:36
Target OS: Linux
Domoticz version: Beta
Location: The Netherlands
Contact:

Re: Mochad compatibility with Raspbian Stretch

Post 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.
I Love Domoticz ! And the community around it :-)
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest