Get Status from Shelly 1

Hi!

I have bougth a Shelly 1. Now I want to get the status via MQTT. The MQTT connection works, but I don´t know how to get the status.

https://shelly-api-docs.shelly.cloud/#shelly1-1pm-status

I am using the Mosca MQTT broker on Node-Red.

All I get is "published : msg.payload : Object { packet: object, client: object }"

As you probably suspected, I am new with Node-Red.

Hope you can help, thanks!
Marco

Have you read the page in the docs about working with messages? That will show you how to use the debug node and debug panel to understand the whole message.

https://nodered.org/docs/user-guide/messages

I read it. But there are no usefull informations in the message (as far as i can see).

{"topic":"shellies/shelly1-689B68/relay/0","payload":[111,110],"messageId":"Xd6K_Eb","qos":0,"retain":false}

Take a look at the topic in that message you posted here, and the topics described in the Shelly API documentation. Are you subscribing to the correct topics? The message you posted here isn't a status message, so it won't have that information you're looking for.

Looks fantastic to me.

If you change your mqtt node to: shellies/#, attach a debug node, change the debug node to display 'complete msg object'

Switch the relay and see what you receive.

Thanks!

I just found the solution... I thought I could edit the "Will topic". With "shellies/shelly1-
689B68/relay/0" it works just fine, giving me "on" or "off" via payload