gen2 mqtt control

  • I've used mqtt explorer to send some commands for gen1 devices

    Now when using gen2 devices I can't figure out how that mqtt topic & syntax is going for those devices

    topic for devices is shellies/test-pro4pm/rpc

    one of json variants what I have used:

    Code
    {
      "id": 1,
      "method":"Switch.Set",
      "params":{
        "id": 1,
        "on": true
      }
    }

    Appreciate help to know even one working json syntax

  • Have you checked the api docs?
    https://shelly-api-docs.shelly.cloud/gen2/Component…eceive-response

    your's is missing the source (src) parameter.

    Code
    mosquitto_pub -h localhost -p 1883 -u admin -P admin -t shellyplus2pm-a8032ab6343c/rpc -m '{"id":124, "src":"shellyplus2pm-a8032ab6343c", "method":"Switch.Set", "params":{"id":0,"on":true}}'

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