pokiiio / node-red-contrib-rpi-shutdown

Nodes to shutdown or restart your Raspberry Pi.
MIT License
4 stars 0 forks source link

node-red-contrib-rpi-shutdown does not work under Docker #1

Open linuxweenie opened 3 years ago

linuxweenie commented 3 years ago

node-red-contrib-rpi-shutdown works as advertised when node red is run plain on a Raspberry Pi (have verified this).

However, I cannot get it to work when running under Docker. To duplicate my initial docker-compose.yaml setup is as follows:

`version: "3.8"

services: strikedown: container_name: strikedown restart: unless-stopped image: nodered/node-red:1.1.3-10-arm32v7 user: root volumes:

[{"id":"f605a17a.7863a","type":"inject","z":"c9fb31d6.b69dc","name":"Restart","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":210,"y":100,"wires":[["d75f9eb.a74c96"]]},{"id":"4eece310.2dfb1c","type":"inject","z":"c9fb31d6.b69dc","name":"Shutdown","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":200,"y":160,"wires":[["ab316fb2.a5f2a"]]},{"id":"ab316fb2.a5f2a","type":"shutdown","z":"c9fb31d6.b69dc","name":"","x":420,"y":160,"wires":[]},{"id":"d75f9eb.a74c96","type":"restart","z":"c9fb31d6.b69dc","name":"","x":410,"y":100,"wires":[]}]

which is identical to your example in the npm directory. I was unable to get the Restart or the Shutdown to work on a Raspberry Pi using Docker. Please make this work under Docker, thank you.

Sp0rTB4cK commented 3 years ago

I have the same use case and would really appreciate Docker support. I also use docker-compose for my deployments.