I want to shut down my Dreambox via Node Red. The suhtdown command shutdown -h now via command works wonderfully. But I'm currently not clear how I can make remotely via Node Red. Is there a node I can do that with?
I don't know the device, presumably node-red is running on a different machine. Can you ssh into the dreambox?
Yes, ssh is able into the dreambox. It's actually a Linux kernel.
In that case you should be able to use an exec node to run the shutdown command, something like
ssh user@dreambox 'sudo shutdown -h now'
Then in the device you may need to tell it to allow that command without password entry. On a Debian based system that is by using sudo visudo
and adding
user ALL=(ALL) NOPASSWD: /sbin/shutdown
where user is the user referenced in the ssh command.
Thanks, Colin for your replay!
For all the people who is interesseted in this case. Unforftunally, my enigma2 Receiver doens't care about ssh and it ssems to me it is not possible to install it into my image.
However, there is another way how to shutdown it via Node-Red.
Use exec node wget -q -O - <ip-adress>/web/powerstate?newstate=1