Hello!
I’m trying to set up wake-on-LAN for my media computer using Node-RED, but the behavior is unstable: sometimes it works, sometimes it doesn’t… Maybe you can help? I give more details below.
My final goal is to rely on Gladys to activate everything needed when I have a home cinema session: the screen lowers, the lights turn off, the soundbar, the Freebox and the projector turn on, the shutters close. I have one remaining point to handle: that the computer on which I installed Kodi wakes up if it was turned off or in sleep.
Gladys is installed on a Raspberry Pi 4, via Docker, with Node-RED in its « integrated into Gladys » version. The computer with Kodi is a mini PC on the same network. The network is managed by a Freebox Revolution. Both devices are connected by Ethernet cable with static IPs: 192.168.0.105 for Gladys, 192.168.0.101 for Kodi.
From the « wake me up » app on my iPhone, connected via Wi‑Fi to my Freebox, wake-on-LAN works reliably.
In Node-RED, I installed « node-red-node-wol », and I added the « wake on lan » node into a flow that is triggered by a change of an MQTT topic controlled from Gladys. The node is configured with its default values, and the IP address « 192.168.0.255 » and the MAC address of my mini PC hosting Kodi. For testing, I also have an « inject » node to manually trigger the wake-on-LAN from Node-RED.
And here the behavior is erratic: sometimes the computer with Kodi wakes up correctly (so my configuration is presumably working), sometimes not (so something is still wrong…). It’s as if one of the elements (Node-RED, the Raspberry Pi, the Freebox?) had lost track of the mini PC…
To illustrate, here are my tests this morning:
- Last night, the mini PC went to sleep
- This morning, several hours later, the wake-on-LAN from Gladys and Node-RED worked.
- I put the computer back to sleep, and waited five minutes
- Another wake-on-LAN, which also worked.
- I put the computer back to sleep and waited 25 minutes
- The wake-on-LAN from Node-RED does not work. However, it works from the app on the iPhone.
Does anyone have a lead?
