Closed Llibyddap closed 4 years ago
Well - I may have hit enter too fast... After a day - for whatever reason, the first set of data points hit my output file. I'll need to figure out the details... But exciting - assuming I'm not missing something.
I guess my final question is - I didn't capture the encryption key - is there something missing as a result?
{
"batteries_0x0030":{
"7F16EF57":{
"R15563P3SSEG":{
"AlwaysZero_40_float":8425.0,
"AlwaysZero_48_float":NaN,
"AlwaysZero_66_float":-107616408.0,
"AlwaysZero_70_float":6.826565598804779e-41,
"BattCapacityActual":396.5,
"BattCapacityNom":4.5179431944112146e-39,
"BattCharge":0.0,
"BattChargingStatus":19661,
"Date":"2019-11-10",
"EIn":0,
"EOut":0,
"HexConst_52":"ff ff ff ff",
"HexConst_56":"ff ff ff ff",
"Idc":1.0859270332730375e-05,
"Interval":410104,
"Temp":NaN,
"Time":"22:24:48",
"TotalEnergyIn":1176051712,
"TotalEnergyOut":1146945536,
"Undeciphered_data":"2c 01 00 00 00 00 00 00 02 00 00 00 00 00",
"Vdc":6.664491736252387e-10,
"batteryId":"R15563P3SSEG",
"dateTime":1573453488,
"devLen":100,
"devType":"batteries_0x0030",
"seId":"7F16EF57",
"seType":"0x0030"
}
}
},
"events":{
},
"inverters":{
"7F16EF57":{
"Date":"2019-11-10",
"Eac":0.0,
"Eday":28528.193359375,
"Etot":4608790.0,
"Freq":60.01667404174805,
"ID":"7F16EF57",
"Iac":0.9453125,
"Interval":300,
"Pac":0.0,
"Pmax":2288.64111328125,
"Temp":32.924407958984375,
"Time":"22:24:48",
"Uptime":11759,
"Vac":235.203125,
"Vdc":395.75
}
},
"meters_0x0022":{
"7F16EF57":{
"3_Consumption":{
"AlwaysZero_off10_int2":0,
"AlwaysZero_off18_int2":0,
"AlwaysZero_off26_int2":0,
"AlwaysZero_off34_int2":0,
"Date":"2019-11-10",
"E2X":0,
"EfromX":196,
"Flag_off12_hex":"00 80",
"Flag_off20_hex":"00 80",
"Flag_off28_hex":"00 80",
"Flag_off36_hex":"00 80",
"Interval":300,
"P2X":NaN,
"PfromX":2382.5517578125,
"Time":"22:24:48",
"TotalE2Grid":0,
"TotalEfromGrid":0,
"Totaloff22_int4":0,
"Totaloff30_int4":0,
"dateTime":1573453488,
"devLen":58,
"devType":"meters_0x0022",
"onlyIntervalData":1,
"recType":3,
"seId":"7F16EF57",
"seType":"0x0022"
},
"5_GridImportExport":{
"AlwaysZero_off10_int2":0,
"AlwaysZero_off18_int2":0,
"AlwaysZero_off26_int2":0,
"AlwaysZero_off34_int2":0,
"Date":"2019-11-10",
"E2X":0,
"EfromX":196,
"Flag_off12_hex":"00 00",
"Flag_off20_hex":"00 00",
"Flag_off28_hex":"00 00",
"Flag_off36_hex":"00 00",
"Interval":300,
"P2X":0.0,
"PfromX":2388.5517578125,
"Time":"22:24:48",
"TotalE2Grid":15976987,
"TotalEfromGrid":7212562,
"Totaloff22_int4":677578,
"Totaloff30_int4":27532337,
"dateTime":1573453488,
"devLen":58,
"devType":"meters_0x0022",
"onlyIntervalData":0,
"recType":5,
"seId":"7F16EF57",
"seType":"0x0022"
},
"6_UnrecognisedRecType":{
"AlwaysZero_off10_int2":0,
"AlwaysZero_off18_int2":0,
"AlwaysZero_off26_int2":0,
"AlwaysZero_off34_int2":0,
"Date":"2019-11-10",
"E2X":0,
"EfromX":0,
"Flag_off12_hex":"00 80",
"Flag_off20_hex":"00 80",
"Flag_off28_hex":"00 80",
"Flag_off36_hex":"00 80",
"Interval":300,
"P2X":NaN,
"PfromX":0.0,
"Time":"22:24:48",
"TotalE2Grid":0,
"TotalEfromGrid":0,
"Totaloff22_int4":0,
"Totaloff30_int4":0,
"dateTime":1573453488,
"devLen":58,
"devType":"meters_0x0022",
"onlyIntervalData":1,
"recType":6,
"seId":"7F16EF57",
"seType":"0x0022"
}
}
},
"optimizers":{
}
}{
"events":{
},
"inverters":{
},
"meters_0x0022":{
"7F16EF57":{
"7_Battery":{
"AlwaysZero_off10_int2":0,
"AlwaysZero_off18_int2":0,
"AlwaysZero_off26_int2":0,
"AlwaysZero_off34_int2":0,
"Date":"2019-11-10",
"E2X":0,
"EfromX":0,
"Flag_off12_hex":"00 80",
"Flag_off20_hex":"00 80",
"Flag_off28_hex":"00 80",
"Flag_off36_hex":"00 80",
"Interval":300,
"P2X":0.0,
"PfromX":NaN,
"Time":"22:24:48",
"TotalE2Grid":0,
"TotalEfromGrid":0,
"Totaloff22_int4":0,
"Totaloff30_int4":0,
"dateTime":1573453488,
"devLen":58,
"devType":"meters_0x0022",
"onlyIntervalData":1,
"recType":7,
"seId":"7F16EF57",
"seType":"0x0022"
},
"8_MostlyZeroes":{
"AlwaysZero_off10_int2":0,
"AlwaysZero_off18_int2":0,
"AlwaysZero_off26_int2":0,
"AlwaysZero_off34_int2":0,
"Date":"2019-11-10",
"E2X":0,
"EfromX":0,
"Flag_off12_hex":"00 80",
"Flag_off20_hex":"00 80",
"Flag_off28_hex":"00 80",
"Flag_off36_hex":"00 80",
"Interval":300,
"P2X":0.0,
"PfromX":NaN,
"Time":"22:24:48",
"TotalE2Grid":0,
"TotalEfromGrid":0,
"Totaloff22_int4":0,
"Totaloff30_int4":0,
"dateTime":1573453488,
"devLen":58,
"devType":"meters_0x0022",
"onlyIntervalData":1,
"recType":8,
"seId":"7F16EF57",
"seType":"0x0022"
},
"9_PVProduction":{
"AlwaysZero_off10_int2":0,
"AlwaysZero_off18_int2":0,
"AlwaysZero_off26_int2":0,
"AlwaysZero_off34_int2":0,
"Date":"2019-11-10",
"E2X":0,
"EfromX":0,
"Flag_off12_hex":"00 80",
"Flag_off20_hex":"00 80",
"Flag_off28_hex":"00 80",
"Flag_off36_hex":"00 80",
"Interval":300,
"P2X":0.0,
"PfromX":NaN,
"Time":"22:24:48",
"TotalE2Grid":0,
"TotalEfromGrid":0,
"Totaloff22_int4":0,
"Totaloff30_int4":0,
"dateTime":1573453488,
"devLen":58,
"devType":"meters_0x0022",
"onlyIntervalData":1,
"recType":9,
"seId":"7F16EF57",
"seType":"0x0022"
}
}
},
"optimizers":{
}
}
If you are getting JSON in the output file and you haven't captured the encryption key, then your inverter must be sending the data unencrypted. The "unknown function" and "discarding extra bytes" messages are caused by extra junk in the captured data that semonitor.py can't interpret. You should filter them out with tshark like this:
tcpdump ... | tee ... | tshark ... | xxd ... | semonitor ...
Adding the extra filters did reduce the junk. Thanks for the confirmation.
I think I have everything setup now - but two last questions...
Here is my setup as described in #141.
I have my capture and processing script setup as:
tcpdump -i eth0 -U -w - tcp and host 192.168.2.29| tee capture.pcap | ./solaredge/semonitor.py -d bill2_log -o bill2.json -vvvv
which results in the
-d bill2_log
output of:I recall reading, but now cannot find it, that
semonitor.py
will not save encrypted data (or will not process it) to the-o FILE
. If that is the case then I may not have my first question. If that is not the case, then I can't figure out why the data is not parsed into the json (e.g.,Nov 10 21:48:49 function: 0378
). I see that some functions are processed and some are labeledUnknown function
. I also see that there are0503
messages that are not open - i think this is the encryption (which I haven't downloaded the keys yet).The second question relates to
tcpdump
vs.tshark
. I think I have thetcpdump
command appropriately filtered for traffic from the SE Inverter that is TCP, but if not, how would you chain thetcpdump
to thetshark
to get a filtered stream?Thank's the the continuing education.