EDIT I found a workaround:
I couldn' get it working, so I made a node-red flow on my server that creates a HTTP api, and converts the http data to MQTT
And put a wget in my startup and shutdown script:
wget -T 2 http://192.168.0.209:1880/endpoint/plexBox/state?state=OFF
Hello,
I followed the guide for creating autostart and shutdown commands (This guide). But my commands dont run
I autostart.sh I have the following code:
Code
(
sleep 50
docker run -it --rm eclipse-mosquitto mosquitto_pub -h 192.168.0.100 -t plexBox/state -m "ON"
)&
And in the shutdown.sh:
Code
case "$1" in
halt)
# your commands here
;;
poweroff)
# your commands here
;;
reboot)
# your commands here
;;
*)
docker run -it --rm eclipse-mosquitto mosquitto_pub -h 192.168.0.100 -t plexBox/state -m "OFF"
sleep 50
;;
esac
Display More
I have docker installed through libreelec. And when I run these commands manually, they work.
Anyone a suggestion?