Odianosen25 / Monitor-App

Appdaemon App for Andrew's Monitor Presence Detection System
74 stars 9 forks source link

Reboot of nodes not working #57

Closed pointlevel closed 4 years ago

pointlevel commented 4 years ago

Hello!

I cannot get the reboot of remote-monitors to work. I have installed paramiko on each device. When i run the mqtt: "monitor/all/reboot" i get the following in the logs, but nodes are not restarted.

2020-08-21 09:21:51.007412 INFO home_presence_app: Restarting topfloor's Hardware                               
2020-08-21 09:21:51.016062 INFO home_presence_app: Restarting outhouse's Hardware                               
2020-08-21 09:21:51.017947 INFO home_presence_app: Restarting entrance's Hardware                               
2020-08-21 09:21:51.019894 INFO home_presence_app: Running sudo reboot now on outhouse's Hardware               
2020-08-21 09:21:51.020498 INFO home_presence_app: Running sudo reboot now on topfloor's Hardware               
2020-08-21 09:21:51.021256 INFO home_presence_app: Restarting disable's Hardware                                
2020-08-21 09:21:51.024883 INFO home_presence_app: Running sudo reboot now on entrance's Hardware 
pointlevel commented 4 years ago

Im running AppDaemon in docker, without any local monitor-installation. Just using remotes. Do i need to install paramiko also in the AppDaemon docker-file?

Odianosen25 commented 4 years ago

Hello @pointlevel,

You need not install paramiko on the nodes, but only within AD, as that’s what it uses to ssh into the nodes. Also isn’t there some errors in you logs, so I can determine what’s causing it?

Lastly if running within docker, the container has to use -net host, so it has direct access to the NIC. If not, it won’t be able to reach the remote mode.

Regards

pointlevel commented 4 years ago

Thanks for clarification. Works like a charm :)