Gen 2 - MQTT discovery

  • Hi,

    I have a question about Gen2 devices discovery via MQTT. In Gen1 devices there was 'shellies/announce' topic in which all devices could be discovered.

    I have problem with Gen2 devices. As far I had figured only via NDS there is possibility to discover devices.

    Do you have any clue how to discover Shelly Gen2 devices via MQTT without using NDS.

    I know that I can subscribe '#' or similar and figure what devices are in network but only Shelly Plus 1PM sends regular traffic via MQTT

    thanks

  • Hi and welcome to the forum. :)

    If you setup MQTT in every shelly, it send messages to your broker with all datapoints.

  • Hi,

    thanks,

    generally I have no problem with MQTT. The problem is with Gen2 device discovery via MQTT. In Gen2 MQTT is different than Gen1. Take a look here: https://shelly-api-docs.shelly.cloud/gen2/Overview/RPCChannels#mqtt

    In Gen1 there was one topic shellies/# with announces etc. And every device could be discovered via MQTT (off course only when MQTT was configured). And most of devices were sending once a while messages.

    In Gen2 every device got its own topic, and every client got own topic to. And that works well.

    Der Inhalt kann nicht angezeigt werden, da Sie keine Berechtigung haben, diesen Inhalt zu sehen.

    But Gen2 does not send any announces via MQTT (as far I see) and there are two ways to detect device:
    - use mDNS - which will give you all informations (but works only in LAN and sometimes it take a while to find device)
    - you must know device names - and then try to subscribe proper topics etc.

    And that is the problem - is there any other method to find the device via MQTT...

  • All devices NG are sending state after the reboot.

    That's what i see.

  • From what I know there's currently no announce topic via MQTT but you can customize the topic so you don't have to know the device names at all..

    Der Inhalt kann nicht angezeigt werden, da Sie keine Berechtigung haben, diesen Inhalt zu sehen.


    With this configuration you'd have to subscribe to either #livingroom or #livingroom/ceilinglight as topic.

    >100 Shellies, darunter so gut wie alles was der Hersteller produziert hat. ;)
    :!: ich beantworte grundsätzlich keine Fragen per persönlicher Nachricht:!:

  • Dieses Thema enthält 5 weitere Beiträge, die nur für registrierte Benutzer sichtbar sind.