@pierre-gilles
For automatic MAC address recovery, I looked at what scanNetwork('ssdp') currently returns.
For my LG TV, I get:
{
"source_ip": "192.168.1.71",
"source_port": 49363,
"headers": "..."
}
The MAC address is not present in the SSDP response itself.
Would it be possible for the scan to add a source_mac when it can resolve the IP via the host’s ARP/neighbor table?
For example:
{
"source_ip": "192.168.1.71",
"source_mac": "64:e4:a5:b4:88:74",
"source_port": 49363,
"headers": "..."
}
This would allow integrations using Wake-on-LAN to automatically retrieve the MAC address during discovery, without asking the user to enter it manually.
What do you think?
ouvert 08:38AM - 15 Aug 26 UTC
## Feature request
It would be useful for mediated SSDP discovery to expose the… source MAC address when it can be resolved from the source IP.
Currently, an external integration using:
gladys.scanNetwork('ssdp', {
st: 'urn:lge-com:service:webos-second-screen:1',
timeoutSeconds: 5,
});
receives results such as:
{
"source_ip": "192.168.1.71",
"source_port": 49363,
"headers": "HTTP/1.1 200 OK\r\n..."
}
The source IP and port are available, but not the MAC address.
## Use case
Some devices discovered through SSDP also support Wake-on-LAN.
For example, an integration can automatically discover a device IP through SSDP, but still needs to ask the user to manually enter its MAC address before Wake-on-LAN can be used.
Since the SSDP scan is mediated by Gladys on the host network, it could be useful for Gladys to resolve the source IP through the ARP/neighbour table when possible.
## Proposed result
When the MAC address can be resolved, the SSDP result could include an optional `source_mac` field:
{
"source_ip": "192.168.1.71",
"source_mac": "64:e4:a5:b4:88:74",
"source_port": 49363,
"headers": "HTTP/1.1 200 OK\r\n..."
}
`source_mac` would remain optional, since MAC resolution may not always be possible.
## Benefits
This would allow external integrations to:
- automatically configure Wake-on-LAN after device discovery;
- avoid asking users to manually find and enter a MAC address;
- associate an IP address with a more stable network identifier;
- keep network discovery logic centralized in Gladys instead of requiring additional network permissions inside integration containers.
This is not specific to LG webOS and could benefit any external integration discovering Wake-on-LAN capable devices through SSDP.