Context
External integrations are executed in an isolated Docker container. They can send a unicast Wake-on-LAN packet, but they cannot broadcast a packet on the local network.
Problem
Some devices (in my case an LG webOS TV) no longer respond to unicast Wake-on-LAN after prolonged sleep, likely due to the expiration of the ARP entry.
Wake-on-LAN works perfectly in broadcast (`192.168.1.255`), but this broadcast cannot be sent from an external integration.
Proposal
Add an API in the SDK to request that the Gladys core send a Wake-on-LAN packet.
Example:
await gladys.network.wake({
mac: '64:e4:a5:b4:88:74',
address: '192.168.1.255', // optional
port: 9, // optional
sourcePort: 9, // optional
});
Since the Gladys core is running in `network=host`, it can send the broadcast on the local network without the containerâs limitations.
Use Cases
TV (LG webOS, Samsung, âŠ)
PC / NAS
Servers
Any integration requiring reliable Wake-on-LAN
@pierre-gilles
Gladys side:
master â vincentBesseau:master
ouvert 11:43AM - 11 Aug 26 UTC
### Description
Add Wake-on-LAN support to the external integration Host API.âŠ
External integrations can now request Gladys Core to send a Wake-on-LAN magic packet from its network namespace through:
POST /api/integration/v1/network/wake
The API supports:
* MAC addresses in common formats (64:e4:d5:b4:12:66, 64-e4-d5-b4-12-66, 64E4D5B41266)
* Custom destination IPv4 address
* Custom UDP destination port
* Custom UDP source port
This allows external integrations running in isolated Docker networks to wake LAN devices through Gladys Core.
Tests cover magic packet generation, MAC address formats, source port handling, input validation and the external integration Host API controller.
## Forum
Forum: https://community.gladysassistant.com/t/api-sdk-wake-on-lan-via-le-coeur-gladys/10522
### Checklist
- [ ] Tests pass: `cd server && npm run coverage` (Codecov requires 100% coverage on changed lines) and Cypress (`npm run cypress:run`) if the UI changed
- [ ] Linter and prettier pass on both front and server (`npm run eslint`, `npm run prettier`)
- [ ] No undocumented breaking change
SDK to plan
@pierre-gilles all tests seem to be green for github core
Iâm closing the topic as this is available in Gladys Assistant 4.86:
Hi everyone!
Super excited to release Gladys Assistant 4.86.
Itâs simple, itâs the biggest version since the start of the project, with 68 PRs merged in one week
Itâs just incredible, and it shows the new pace we can keep with AI.
The goal is now clear: catch up with and surpass Home Assistant
Iâll talk about these 68 new features here:
Thanks to all the contributors!!