@pierre-gilles
Pour la récupération automatique de la MAC, j’ai regardé ce que renvoie actuellement scanNetwork('ssdp').
Pour ma TV LG, j’obtiens :
{
"source_ip": "192.168.1.71",
"source_port": 49363,
"headers": "..."
}
La MAC n’est pas présente dans la réponse SSDP elle-même.
Est-ce qu’il serait envisageable que le scan médié ajoute un source_mac lorsqu’il peut résoudre l’IP via la table ARP/neighbor du host ?
Par exemple :
{
"source_ip": "192.168.1.71",
"source_mac": "64:e4:a5:b4:88:74",
"source_port": 49363,
"headers": "..."
}
Ça permettrait aux intégrations utilisant le Wake-on-LAN de récupérer automatiquement la MAC lors de la découverte, sans demander à l’utilisateur de la saisir manuellement.
Qu’en penses tu ?
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.