Beiträge von alexmed

    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

    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