Beiträge von deboiph

    I finally found a way to get the on/off status based on the "apower" property of the notifications:

                "topics": {
                    "getOnline": "shellyplus1pm-XXXXXXXXXXXX/online",
                    "getOn": {
                        "topic": "shellyplus1pm-XXXXXXXXXXXX/events/rpc",
                        "apply": "if(message.includes('apower')) { return JSON.parse(message).params['switch:0'].apower==0 ? 'false' : 'true'; }"
    },
                    "setOn": {
                        "topic": "shellyplus1pm-XXXXXXXXXXXX/rpc",
                        "apply": "return JSON.stringify({id:1, src:'shellyplus1pm-XXXXXXXXXXXX', method:'Switch.Toggle', params:{id:0}})"
    }
    },
                "onlineValue": "true",
                "onValue": "true",

                "offValue": "off",


    Gen2 device API is really a step back compared to v1!
    Look at how easy it was with API v1 (below) compared to API v2 (above):

                "topics": {
                    "getOnline": "shellies/shelly1-XXXXXXXXXXXX/online",
                    "getOn": "shellies/shelly1-XXXXXXXXXXXX/relay/0",
                    "setOn": "shellies/shelly1-XXXXXXXXXXXX/relay/0/command"
    },
                "onlineValue": "true",
                "onValue": "on",
                "offValue": "off",

    As indicated in this article, using a single topic for all messages is an anti pattern of MQTT.

    Best,

    pHiL

    Hello,

    I cannot connect to my Shelly Plus 1PM via the iOS App (v2.0.2).

    It indicates "Device is rebooting" although it is up & running.

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

    I can connect to the device in HTTP without any problem!

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

    The device is operating well!

    I deleted and reinstalled the device several times, without success.

    Any idea?

    Tx