What I doing wrong ? Shelly pro 3em

Posted Mar 26, 2025, 9:04 PM UTC
36

Posted Mar 26, 2025, 9:04 PM UTC
Guess would be that the docs are using Modicon notation, that being the case 31013 = input register 1013 (or, possibly, 1012 if your app uses PDU addressing). Note that you may well need to request two registers as it looks like this is a 32 bit value.
Can’t say specifically for this device but often holding regs are usually starting at 4xxxx and input regs at 3xxxx.
Are you trying to read Active Power? Try register 1013, rather than 31013 https://shelly-api-docs.shelly.cloud/gen2/ComponentsAndServices/EM/#modbus-registers
If you're not getting the result you expect, try reading up or down one register i.e. 1012 or 1014 😎
Also see if there's an option in the drop-down menu there to change from 4x (holding) to 3x (input) registers
This. Most Modbus pollers assume the 30/40 or whatever when you select the correct function code so you can eliminate the prefix. They are all different and you need to learn the nuances. I have been in automation for 20+ years and never had to use Modbus until I went into an industry that was like going back in a time machine. It’s still great learning on the basics of data structures, bits and bytes. Good luck!
Thank you, now I understand it. The first number(3) is the input register (select in drop-down ) and the last one 1013 is the start address.