Closed SirRenix closed 2 years ago
Today I found the Issue why the SMA-EM program become wrong data. The SMA-SHM20 send in ~30seconds a UDP bytecode over the port 9522 from the IP 192.168.x.x. The Bytecode(length 58) is ffffffffffff00d09356b7970800450000562f414000401188a2c0a80064c0a800ff25322532004297b9534d4100000402a00000000100260010606509a0ffffffffffff00007401e41195b3000000000000aba100020000000000000000000000000000
Better readable:
"\xff\xff\xff\xff\xff\xff\x00\xd0\x93\x56\xb7\x97\x08\x00\x45\x00" \ "\x00\x56\x2f\x41\x40\x00\x40\x11\x88\xa2\xc0\xa8\x00\x64\xc0\xa8" \ "\x00\xff\x25\x32\x25\x32\x00\x42\x97\xb9\x53\x4d\x41\x00\x00\x04" \ "\x02\xa0\x00\x00\x00\x01\x00\x26\x00\x10\x60\x65\x09\xa0\xff\xff" \ "\xff\xff\xff\xff\x00\x00\x74\x01\xe4\x11\x95\xb3\x00\x00\x00\x00" \ "\x00\x00\xab\xa1\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" \ "\x00\x00\x00\x00"
The bytecode changes with every cycle.
I've also noticed this problem. Not sure how much trouble it actually creates. My attempt at an hotfix: #69
I have this same problem. Can someone approve above mentioned pull request?
I think this are some Speedwire device discovery packages. SMA has published some documents, how the Speedwire Device Discovery works. You can find the term "534d4100000402a000000001002" in the documentation The measurement-packeages should have a size over 580 Bytes. So we ignore smaller packages. I hope this works for everyone.
Im testing the sma-em-measurement,py to get data for monitoring, My SHM20 has the actual firmware 2.7.5. . When I start the script then comes correct data, but after some updates failure. With the script sma-em-capture-package I have no problems.
When you need the original data stream output of the udp then write me here and I send you a Email. PS.: I have modify the output a little bit at line 80 to get the data stream.