Shelly 4Pro. MQTT info

  • Hi All,

    I am unable to find the list of supported MQTT commands and what is sent out for the new 2Gen Shelly 4Pro plus. Also, I cannot find in the built in webserver, how to edit the MQTT name to set a custom name. The default one if very very long ....

    Thanks for your help!

    Martin Picard

  • Wandering#Sound#94 20. August 2021 um 09:41

    Hat das Label von Shelly 4Pro auf Shelly Pro 4PM geändert.
  • Dear Olsche,

    I am assisting Martin (the person who started the thread) with device integrations.

    Pleased advice if there is a way to hook up the device to my MQTT server directly?

    Is there an MQTT protocol commands reference available i.e. payloads i can publish to certain topics the device subscribed to etc the common way for MQTT?

    The reference you gave is relying on HTTP-methods and RPC which is not what we are looking for.

    Another question is how to rename the device, but I think it should be available in MQTT-protocol commands reference if any.

    Cheers, Alex

  • please check the API Docs,
    https://shelly-api-docs.shelly.cloud/gen2/Overview/RPCChannels
    (related section is MQTT)

    that was very helpfull, thank you!

    - we managed to setup MQTT server connection

    - we are getting events info on events/rpc topic

    but next question appeared:

    - we are able to send RPC commands (via MQTT as JSON, src: user_1) to device (topic shellypro4pm-84cca87e3eb8/rpc) , and we are listening to topic "user_1/rpc" for responce

    we are getting response right after command sent, but its an error response

    "{"id":1,"src":"shellypro4pm-84cca87e3eb8","dst":"user_1", "error": {"code":401, "message":"{\"auth_type\": \"digest\", \"nonce\": 1630447058, \"nc\": 1, \"realm\": \"shellypro4pm-84cca87e3eb8\", \"algorithm\": \"SHA-256\"}"}}"

    Please advice how to handle it

    Commands we are sending are taken from your docs like:

    {"id":1,"src":"user_1","method":"Switch.GetStatus","params":{"id":0}}

    or

    {"id":123,"src":"user_1","method":"Switch.Set","params":{"id":0,"on":true}}

    or

    {"id":1,"src":"user_1","method":"Switch.Toggle","params":{"id":0}}

    or

    { "jsonrpc":"2.0", "id": 1, "src":"user_1", "method":"Switch.GetConfig", "params": { "id":2 } }


    Cheers, Alex

  • Dieses Thema enthält 12 weitere Beiträge, die nur für registrierte Benutzer sichtbar sind, bitte registrieren Sie sich oder melden Sie sich an um diese lesen zu können.