Jump to content
Gen2 Devices: FW Update Required / Gen2 Geräte: FW-Update erforderlich ×

shelly mqtt prefix and Client ID unclear documented


novski

Recommended Posts

I am trying to control the relay of a shelly 1 over MQTT.
The controls `Enable RPC over MQTT`, `RPC status notifications over MQTT` and `Generic status update over MQTT` are enabled.
If I omit the MQTT prefix and Client ID it get automatically filled with the `<model>-<mac>` value.
I can receive the changes when clicking the on / off button on the web interface on the topic path `shellyplus1-c82e180ad258/status/switch:0` with a payload as: {"id":0,"source":"WS_in","output":true,"temperature":{"tC":29.3,"tF":84.8}}

But I cannot control the relay with the described command in the doc's: `relay/0/command` and data:`{"payload":"on"}`.
And what is puzzling me, is that the topic path is not prefilled with `shellies/` as described in the same doc.
Does anybody know how prefix and Client ID are used correctly?

Link to comment
Share on other sites

I had the same problem with the dimmer plus. 

After exchanging many Communications with them they finally told me that in mqtt implementation was limited because of the light component. But in fact I realized that the device was not listening to the commands the message there were documenting but rather the device ID slash RPC..

I am giving you my solution for the light component you might be able to apply it to your Chevy OnePlus. The shelly one( the old one) reacted to the command message.

here is what i sent to allterco

 

I think this is wrong, shelly dimmer does not subscribe to the mentioned topics.

the examples are just for gathering info, not control the device.

Here is what should be found in documentation : 

Example to set the dimmer to 50% with MQTT: 

topic : [device]/rpc

payload : {"id":123, "src":"user_1", "method": "Light.Set", "params": {"id":0, "on":true, "brightness":50.0}}

where [device] is the shelly identifier or the specific ID specified in the configuration.  

if [device] is bureau, sending this message to the MQTT server:

bureau/rpc {"id":123, "src":"user_1", "method": "Light.Set", "params": {"id":0, "on":true, "brightness":50.0}}

will result in setting the dimmer to on and 50% and the dimmer responds with the following message through the MQTT server : 

bureau/status/light:0 {"id":0,"source":"MQTT","output":true,"brightness":50.0}

hope this helps.

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Erstelle neue...