Closed panciunio closed 1 year ago
SDM630 ImportActive =Energy Total.
If you want more registers you will need to start using the new user configurable modbus driver. See https://github.com/arendst/Tasmota/pull/18413#issuecomment-1510131402
This is also more future proof where dedicated modbus drivers will be removed someday.
Hi. Thanks for quick reply,
Yes.. I agree but I want to see Import Active for each phase... Thanks for tip I will write my own modbus .json dedicated to SDM630 but I thought, the section:
SDM630 {"Name":"SDM630","Baud":9600,"Config":"8N1","Address":1,"Function":4,"Voltage":[0,2,4],"Current":[6,8,10],"Power":[12,14,16],"ApparentPower":[18,20,22],"ReactivePower":[24,26,28],"Factor":[30,32,34],"Frequency":70,"Total":342,"ExportActive":[352,354,356],"User":{"R":[346,348,350],"J":"ImportActive","G":"Import Active","U":"kWh","D":24}}
from configurations.md file means the same... but I'm not sure how to inform compiler that should use this particular section.
Read the docs: SetOption129 0/1
When you use new modbus driver you do not need to tell the compiler any config data. It's entered at runtime. Again, see link above.
Okay, because I'm using small 8266 device I decided to use 'rule' method. So in case I added Rule3 as follow:
on file#modbus do
{"Name":"SDM630","Baud":9600,"Config":"8N1","Address":1,"Function":4,"Voltage":[0,2,4],"Current":[6,8,10],"Power":[12,14,16],"ApparentPower":[18,20,22],"ReactivePower":[24,26,28],"Factor":[30,32,34],"Frequency":70,"Total":342,"ExportActive":[346,348,350],"User":{"R":[346,348,350],"J":"ImportActive","G":"Import Active","U":"kWh","D":24}}
endon
This is exactly the same configuration which is into 'configurations.md' file for SDM630 There is part reflecting to ImportActive for each phase and as I understood correctly - should be visible on dashboard ("G": "Import Active"). I'm sorry, I'm trying to follow documentation and do what is required but i still have lack of knowledge... Could you please explain more with more details what I'm doing wrong?
One interesting thing... when I added rule using console, the system added rule wilt escapes chars - it's normal?
[20:27:06] cmnd/SDM630/rule3 on file#modbus do {"Name":"SDM630","Baud":9600,"Config":"8N1","Address":1,"Function":4,"Voltage":[0,2,4],"Current":[6,8,10],"Power":[12,14,16],"ApparentPower":[18,20,22],"ReactivePower":[24,26,28],"Factor":[30,32,34],"Frequency":70,"Total":342,"ExportActive":[352,354,356],"User":{"R":[346,348,350],"J":"ImportActive","G":"Import Active","U":"kWh","D":24}}
endon
19:31:41.421 MQT: stat/SDM630/RESULT = {"Rule3":{"State":"ON","Once":"OFF","StopOnError":"OFF","Length":362,"Free":149,"Rules":"on file#modbus do {\"Name\":\"SDM630\",\"Baud\":9600,\"Config\":\"8N1\",\"Address\":1,\"Function\":4,\"Voltage\":[0,2,4],\"Current\":[6,8,10],\"Power\":[12,14,16],\"ApparentPower\":[18,20,22],\"ReactivePower\":[24,26,28],\"Factor\":[30,32,34],\"Frequency\":70,\"Total\":342,\"ExportActive\":[352,354,356],\"User\":{\"R\":[346,348,350],\"J\":\"ImportActive\",\"G\":\"Import Active\",\"U\":\"kWh\",\"D\":24}} endon"}}
I used official tasmota-sensors v12.5.0 for above
Edit 1: I missed your comment according: SetOption129 0/1 - It's definitively changing situation:
but Energy Total not reflecting real state:
19:52:18.539 NRG: EnergyTotal[0] 7380.4106 kWh
19:52:18.541 NRG: EnergyTotal[1] 2926.9280 kWh
19:52:18.542 NRG: EnergyTotal[2] 7965.1777 kWh
Edit 2: Solved!
I read deeper according to given by you SetOption129... and I foung another one which is very interesting:
**SetOption72 | Set reference used for total energy 0 = use firmware counter (default)1 = use energy monitor (e.g., PZEM-0xx, SDM120, SDM630, DDS238, DDSU666) hardware counter**
set to 1 solving problem with bad calculation :-)
Many thanks for help, I hope it will be good lesson for other!
Same issue for Shelly 3EM missing Import Active, does SetOption72 also work for shelly 3em?
PROBLEM DESCRIPTION
A clear and concise description of what the problem is. SDM630 Power Meter connected to WeMoS D1 Pro doesn't provide Import Active on each phase.
REQUESTED INFORMATION
Make sure your have performed every step and checked the applicable boxes before submitting your issue. Thank you!
Backlog Template; Module; GPIO 255
:Backlog Rule1; Rule2; Rule3
:weblog
to 4 and then, when you experience your issue, provide the output of the Console log://#ifdef SDM630_IMPORT 0x015A, // + + + kWh Phase 1 import active energy 0x015C, // + + + kWh Phase 2 import active energy 0x015E, // + + + kWh Phase 3 import active energy //#endif // SDM630_IMPORT