Well from the look of your decoder strings you are only using 16 bit not 32 bit
- SSss = extract a signed word (high order byte first)
- ssSS = extract a signed word (low order byte first)
- SSssSSss = extract a signed long word (high order byte first)
- ssSSssSS = extract a signed long word (low order byte first)
Sent from Mail for Windows
--
You received this message because you are subscribed to the Google Groups "TasmotaUsers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonoffusers...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/sonoffusers/fdd2570e-5b15-4245-b99c-36e9f220ef86n%40googlegroups.com.
The register lists are in the MODBUS definition line
The information about decoders is annoyingly sparse but they mostly seem to be 010304 or 010404
Are you sure it’s a signed value?
Most of the MODBus meter definitions have Watts as unsigned so I would try that.
Regards
Phil K
To view this discussion on the web, visit https://groups.google.com/d/msgid/sonoffusers/632e7cda-d038-4f63-a05a-aaf443eba306n%40googlegroups.com.
OK had some time to sit down and look at it
So the decoder format is
SSss = extract a signed word (high order byte first)
- ssSS = extract a signed word (low order byte first)
- SSssSSss = extract a signed long word (high order byte first)
- ssSSssSS = extract a signed long word (low order byte first)
So it definitely needs to be the second group as it’s INT32

So for INT32 a word is SSss as it’s MSB>LSB but I’m not sure what the Tasmota word order is but all the INT32 should be SSssSSss in the absence of further information. If that’s wrong it might need a trailing s - SSssSSsss
PF and Hz are INT16 so they should be SSss
The last 2 items are INT64 LSW-MSW (less significant word first, most significant word after) Within a word: MSB-LSB (most significant byte first, less significant byte after) so still signed so, in theory, SSssSSssSSssSSss but some of the examples have xxxxxxxxSSssSSss
Not sure if any of those help
Regards
Phil K
Sent from Mail for Windows
From: Albert Weterings
Sent: 18 March 2022 18:07
To: TasmotaUsers
Subject: Re: Tasmota and Carlo Gavazzi EM112 Energy meter
Thanks Phil for your help so far.
--
You received this message because you are subscribed to the Google Groups "TasmotaUsers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonoffusers...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/sonoffusers/4a80e419-0a50-481f-ad9b-b5ed8166b170n%40googlegroups.com.
The ‘trailing s’ changes the word order in INT32 from MSW – LSW to LSW – MSW (or vice versa)
To view this discussion on the web, visit https://groups.google.com/d/msgid/sonoffusers/8a04afdf-3b53-4849-94b5-4f2a3178eaffn%40googlegroups.com.
The decoder string for IEEE754 is
- ffffffff = extract a float value - IEEE754 decode
- FFffFFff = extract a reverse float value - IEEE754 decode

The SDM530 looks to be a good place to start and I think this might work
>D
>B
->sensor53 r
>M 1
+1,3,m,0,9600,MODBUS,1,1,01040002,01040004,01040006,01040008,0104000A,0104000C,0104000E,01040160,01040162,01040166,01040168,0104016A,
1,010404ffffffff@i0:1,Voltage,V,Voltage,2
1,010404ffffffff@i1:1,Current,A,Current,2
1,010404ffffffff@i2:1,Active Power,W,Power,2
1,010404ffffffff@i3:1,Apparent Power,W,PowerA,2
1,010404ffffffff@i4:1,Reactive Power,W,PowerR,2
1,010404ffffffff@i5:1,Power Factor,W,PowerF,2
1,010404ffffffff@i6:1,Import Active kWh,kWh,ImportAkWh,2
1,010404ffffffff@i7:1,Import Reactive kWh,kWh,ImportRkWh,2
1,010404ffffffff@i8:1,Export Active kWh,kWh,ExportAkWh,2
1,010404ffffffff@i9:1,Export Reactive kWh,kWh,ExportRkWh,2
1,010404ffffffff@i10:1,Total Active kWh,kWh,TotalAkWh,2
#
The meter definition registers might be 01030002, etc
The IEEE754 might be FFffFFff
If it does work please add it to the Tasmota documentation to help others
From: David Goadby
Sent: 20 March 2022 00:45
To: TasmotaUsers
--