Hi!
I have a raspi (Raspberry Pi 3 Model B Plus Rev 1.3, Debian Linux 12 says webmin) in my greenhouse running NR 4 locally. The pi is on my network using wifi. From time to time the pi loses the connection. I also have shellies in the greenhouse, they just work all the time.
I could (and should) figure out why the wifi connection drops occasionally with the pi (but not with the shellies) but in the meantime I could just restart the raspi.
I am not that of a linux guy, there seems nothing related to be in the forum.
NR can ping the remote server, this may fail
NR can detect the change of availability of the remote MQTT server, how does one detect that?
NR should gracefully reboot the pi - how can this be done? Doesn't that need root/admin power?
Any idea how to find out why wifi drops? (btw: I tried powerline/cable, this was too flaky)
Thanks in advance!
Cheers, Uwe
If you try it with other Linux distributions you will likely need to do:
sudo visudo
# add after the last line of the file (#includedir /etc/sudoers.d):
YourUserName ALL=(ALL) NOPASSWD:ALL
The Pi has come with this as the default from the beginning unless it has been changed in the newer versions. Generally a very bad idea to have this set on a system that is used with the external Internet.
Don't do that, that allows node red (or any user) to run sudo with any command, without entering a password. Limit it to only the user and command that you want to allow, so if the user is, for example, pi then use pi ALL=(ALL) NOPASSWD: /sbin/reboot
That would seem to be a much better option, but the Raspbian OS has come setup as I'd described by default pretty much since day one. Maybe they have changed it in newer releases for the more powerful systems that people might use as actual desktops, but I've not done anything with a Pi for a couple of years now.
Can you add multiple commands to the list or add multiple lines? Being able to Power Down as well as reboot is useful for headless systems.