Jump to content
NOTICE / HINWEIS: iOS 18 Update and Today Widgets ×

Shelly Plus 1PM, how to reset counters via MQTT?


Recommended Posts

Hi!

It's nice to meet you guys.

I'm trying to get some help with the Shelly Plus 1PM switch. I have this switch integrated via MQTT with other devices on my network. I'm using the topic my_shellyplus1pm/command/switch:0 to turn it on/off with the payload "on" and "off" as plain text and works fine. I send the commands through a MQTT broker and the switch turns on and off as expected.

Now I also need to reset the counters, so the "total" value when the shelly publishes on /my_shellyplus1pm/status/switch:0 could be set to 0, but I don't get which topic I have to publish the command nor the payload I have to use. I tried to use the same my_shellyplus1pm/command/switch:0 topic and publish the payload {"reset": "counters"} and {"reset":true}, "reset_counters" but none of them worked.

I tried to read the official documentation but I got super confused because they talk about a method "PM1.ResetCounters" but I don't get where to use that method, and other examples only explain using curl, but I need it with MQTT.

So please, could any of you guys help me out with which topic should I publish? is the topic "my_shellyplus1pm/command/switch:0" ok? if not, which one? and which payload I have to use?

Thanks in advance!

 

Link to comment
Share on other sites

  • 1 month later...

Something like

{"method":"Switch.ResetCounters","params":{"id":0,"type":["aenergy","ret_aenergy"]}}

published to `<topic>/rpc` might be what you need. In general you can invoke any and all RPC commands through MQTT by publishing to `/rpc`provided you've enabled "RPC over MQTT" setting.

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.

×
×
  • Create New...