Integrate Shelly 1PM Gen3 to iammeter

Team,

I used a Tasmota plug until now with iammeter MQTT but would like to use a Shelly switch now as well, but I do something wrongly as it does not work. Can you advise PLS what goes wrong here PLS?

PLS see the online devices in iammeter cloud



Both Shelly and Iammeter shows they are connected, but when I publish a test, the Shell switch doesn't work.

Based on Shelly this is the command with default settings I need to use:

shellies/shelly1pmg3-dcda0cde4eec/relay/0/command   , the input can be ON or OFF

When I publish a test from iammeter I use a command according my manual settings where prefix is "device" and the ID is what iammeter has generated ID is  "b7tgs147u77g8qjx"

device/b7tgs147u77g8qjx/relay/0/command       and the payload is "ON" (or off) but nothing happens.

https://kb.shelly.cloud/knowledge-base/shelly-1pm-gen3

PLS see the Shelly's configuration page


Thanks 

Gabor

Thread Status
8
73
4
1
0

Sort replies by:

Hi Gabor,

I am not sure how the topic would be changed after you have set the A/B control ("device" and clientID")


The topic would not be the same as the picture below, so it did not work.

 

If possible, please confirm what is the real topic after you configure "device" and the client ID .

if you can not find this in the tutorial of shelly, maybe you can build an MQTT broker and let the shelly device connect to the mqtt broker you have built, then try to submit different topic and check which works.



You can try changing the 'MQTT prefix' and 'Client ID' of your switch to 'device/b7tgs147u77g8qjx'.

Thanks Xingyue for your advise

I made the changes PLS see below. On Shelly side itt looks" connected", but device is "offline" in iammeter The only one setting I found until now to get both Shelly and iammeter showing "connected" and ""online is when prefix and client ID is different as shared at start


This may require you to set up a local MQTT broker to see what the switch actually sends, and your username and password must be consistent with the username and password set in the IAMmeter backend MQTT

Thanks Xingyue for your adviseI made the changes PLS see below. On Shelly side itt looks" connected", but device is "offline" in iammeter The only one setting I found until now to get both Shelly and iammeter showing "connected" and ""online is when prefix and client ID is different as shared at start

Hi Gabor,

Let me try to describe in short.
1 if the mqtt broker socket and clientID is input correct ,it would show online. From the first ,it is obvious that your clientID and broker socket both input correctly.

2 but the topic format decide whether the command can be subscribed successfully.
The key of this issue is we do not know
how the topic format of the shelly device
how the parameter (a/b) affect the topic format.

You can find out these two answer by go through the shelly tutorials or just do some simple experiments (set up a local mqtt broker and configure the shelly device to it, then you will be able to view the real topic format and how the a/b control would affect it),

BR

Laoliu

Thanks Laoliu, I will look into this direction deeper now, until now I was convinced the format of the test is OK... and thought broker may not send out the message or it lost.

Thanks, have a nice day

Gabor

Hi Gabor,

As shown in the image, you only need to enter your ClientId in the text box below—do not include the "device/" prefix, and there’s no need to enter a username or password—to connect to our MQTT server. Please remember to reboot your device after making these changes.

If your previous test with the command
shellies/shelly1pmg3-dcda0cde4eec/relay/0/command
worked fine, you can now test using:
device/b7tgs147u77q8qjx/relay/0/command.




Thanks Laoliu, I will look into this direction deeper now, until now I was convinced the format of the test is OK... and thought broker may not send out the message or it lost.Thanks, have a nice dayGabor

Hi Gabor,

You can also utilize the script function on the Shelly device for this purpose.

For reference, check out this open-source project:
Virtual Meter Project - Shelly 3EM Pro

Let me know if you need further assistance!

Looks like you are new here. Register for free, learn and contribute.