binsentsu / am43-ctrl

Node Util for controlling an AM43 Blinds Drive Cover, either over MQTT or via a HTTP API
44 stars 25 forks source link

Auto run command with pm2 or anything #11

Closed anhtuanng98 closed 4 years ago

anhtuanng98 commented 4 years ago

Thank you for your perfect code.

I have connect my AM43 to home assistant but when I close terminal, this connection will stop. I have try with pm2 which you suggest but this still happen or I have something wrong when config it Could you suggest some thing to run command in background and after reboot or guide me to config pm2 right?

My command: sudo am43ctrl xx:xx:xx:xx:xx:xx --url mqtt://192.168.xxx.xxx:xxxx -u mqtt -p passwd

Thank you so much

anhtuanng98 commented 4 years ago

I have done it :D thank you for your best codes

reesion commented 4 years ago

Hi,

I am having the exact issue where the connection will stop when i close the terminal. Are you able to advise what was your fix?

Thank you.

anhtuanng98 commented 4 years ago

Hi,

I am having the exact issue where the connection will stop when i close the terminal. Are you able to advise what was your fix?

Thank you.

https://www.dexterindustries.com/howto/run-a-program-on-your-raspberry-pi-at-startup/ You could try the first method :D

reesion commented 4 years ago

https://www.dexterindustries.com/howto/run-a-program-on-your-raspberry-pi-at-startup/ You could try the first method :D

Hi,

That didn't work for me as I am not using a PI. I ended up using crontab and that resolved the issue. Thanks for the help!