roth-m / miioclient-mqtt

MI miio_client replacement with MQTT support
47 stars 18 forks source link

miio_client: How to start it automatically on Gateway restart #7

Closed scottie34 closed 4 years ago

scottie34 commented 4 years ago

Is there a way to start it automatically when the gateway is rebooted. I currently need to connect via ssh to run the following each time the gateway has been rebooted: killall miio_client && nohup /home/root/hack/miio_client &

Thanks for your work BTW.

roth-m commented 4 years ago

Hi,

You can add it to /etc/rc.local You should add at least a 30 seconds delay before launching the new miio_client as the original one will setup Wifi.

Best

Griizly commented 4 years ago

Hi, sorry to reply here but I don't know where to type the commmand in the rc.local ( i'm not good at linux ) Under which line should I put it ? Thanks ! Screenshot_2020-04-09-23-27-46-086_com sonelli juicessh

Griizly commented 4 years ago

i've added it juste after the last #fi now my gateway is stuck with white led and doesn't connect to the wifi :s Here is the 2 lines of code i've added: sleep 1m killall miio_client && nohup /home/root/hack/miio_client &

roth-m commented 4 years ago

It should be added just above fac_test .