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:
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:
And in the shutdown.sh:
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
I have docker installed through libreelec. And when I run these commands manually, they work.
Anyone a suggestion?