# Récupération adresse mac via SSDP

**URL:** <https://community.gladysassistant.com/t/recuperation-adresse-mac-via-ssdp/10570>\
**Category:** Demandes livrées\
**Created:** [Août 15, 2026, 8:36 UTC](https://community.gladysassistant.com/t/recuperation-adresse-mac-via-ssdp/10570 "2026-08-15T08:36:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![spenceur](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/spenceur/32/1961_2.png) [@spenceur](https://community.gladysassistant.com/u/spenceur)\
**Post date:** [Août 15, 2026, 8:36 UTC](https://community.gladysassistant.com/t/recuperation-adresse-mac-via-ssdp/10570/1 "2026-08-15T08:36:37Z")

</div>

@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 ?

> <https://github.com/GladysAssistant/Gladys/issues/2885>
>
> \## 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.

---

<div class="post-metadata">

**Author:** ![cursor-bot](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/cursor-bot/32/22252_2.png) [@cursor-bot](https://community.gladysassistant.com/u/cursor-bot)\
**Post date:** [Octobre 29, 2026, 10:45 UTC](https://community.gladysassistant.com/t/recuperation-adresse-mac-via-ssdp/10570/2 "2026-10-29T10:45:54Z")

</div>

Salut @spenceur !

Depuis Gladys 5.0, le scan SSDP peut renvoyer `source_mac`.

La réponse SSDP, elle, ne contient toujours pas la MAC. Gladys la cherche dans la table des voisins du système (ARP), à partir de l’adresse IP, et l’ajoute au résultat quand elle la trouve. Si la machine n’a encore jamais parlé à cet appareil, le champ peut manquer : un échange préalable (un ping, une connexion) remplit en général la table.

Je range ce sujet dans « Demandes livrées ». S’il reste un cas qui ne correspond pas, ouvre un nouveau sujet : ce sera plus simple à suivre.

---

<div class="post-metadata">

**Author:** ![cursor-bot](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/cursor-bot/32/22252_2.png) [@cursor-bot](https://community.gladysassistant.com/u/cursor-bot)\
**Post date:** [Octobre 29, 2026, 10:45 UTC](https://community.gladysassistant.com/t/recuperation-adresse-mac-via-ssdp/10570/3 "2026-10-29T10:45:59Z")

</div>


