Open hoschult opened 2 years ago
there is a guy at victron community stating the following:
I have used your GIT hub code to hack my SMA EM v1 to work on this. There is essentially a 4 byte offset on the decodePhaseChunks.
... found a explanation for the 4 byte offset; SHM2 takes also grid frequency into account, SHM1 does not. According to a specification of the speedwire datagram (found at https://openwb.de/forum/viewtopic.php?p=51576 ), grid frequency is at position 160-163:
Got meter working with SMA EM (SHM1); Need to put an offset at decodePhaseChunks in main.go
L1 := decodePhaseChunk(b[156:300]) L2 := decodePhaseChunk(b[300:444]) L3 := decodePhaseChunk(b[444:588])
That's it.... At least for my setup. To do that in a more general way, offset can be determined on the Revision of the EM; Needs to be investigated since which revision frequency (offset) need to be added (or removed).
I also have an SMA Energy Meter and my consumption is incorrect. Unfortunately I don't understand how to write this offset in main.go and compile it, maybe someone can provide the modified shm-et340. Thank you Martin
hi Martin. I compiled you the shm10 binary, see download link attached: https://magentacloud.de/s/EdWHd267ffLLkZf
Hello Holger, can you provide the modified shm-et340 again? Under the link is no file anymore.
Thanks Olaf
Hi, tried to use your code with my SMA Energy meter (SHM1.0). Seems to be working - at least partly:
UID, Serial and 'Total W' are correct; V/A/W seems to be not decoded correctly (neither for any phases). Tried to look at the datagrams to be captured of speedwire multicast: https://github.com/datenschuft/SMA-EM/blob/master/speedwiredecoder.py - However I was not able to translate towards your code....
Are you foresee to implement also the readings of SHM1.0 (SMA Energy meter)? That would be fantastic.... I can offer my help by supporting the tests.
Thanks, Holger