jantenhove / GoodWeLogger

ESP8266 based logger for GoodWe inverters. Can upload to pvoutput and publishes MQTT topics
GNU General Public License v3.0
96 stars 24 forks source link

Inverter Data to Serial Port #19

Closed EHUbels closed 5 years ago

EHUbels commented 5 years ago

Build the GoodweLogger today and it basically run direct as expected. I'm not interested into posting the data on PVOutput, so I left all those items blank and data is visible as it should, in the serial monitor, with the necessary HEX codes of course. My question is how can I make the data readable in the serial port. Obviously I looked into the code, tried some things but mostly lead to not being able to get the data anymore. Is there a way to take the data from the handlingincoming data from the goodewelogger.cpp?

Looking forward to hear from you.

sircuri commented 5 years ago

There is a function "getInvertersInfo" on the GoodWeCommuncation.cpp file. It contains all the discovered inverters with the data in it. Simple call that function after you called the "handle" function.

EHUbels commented 5 years ago

Dear Jan,

Thanks, I’ll have a look at it, need to wait to get the converter online tomorrow.

Thanks,

Erik

Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows 10


From: Arjen notifications@github.com Sent: Sunday, January 27, 2019 7:16:18 PM To: jantenhove/GoodWeLogger Cc: EHUbels; Author Subject: Re: [jantenhove/GoodWeLogger] Inverter Data to Serial Port (#19)

There is a function "getInvertersInfo" on the GoodWeCommuncation.cpp file. It contains all the discovered inverters with the data in it. Simple call that function after you called the handleData function.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fjantenhove%2FGoodWeLogger%2Fissues%2F19%23issuecomment-457940941&data=02%7C01%7C%7C626490b9986b407b62cc08d68483891d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636842097800763807&sdata=G0hFNnIuH%2BUrEnUU7Kv%2BOcdxSdRAeL7HNrzyJZU4bY0%3D&reserved=0, or mute the threadhttps://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAMnMpK19ZCmJWhCmkGRCnZCFwHIuKRfSks5vHezygaJpZM4aUxO1&data=02%7C01%7C%7C626490b9986b407b62cc08d68483891d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636842097800773818&sdata=%2FpLOS9%2FmGJg%2Bvy5dQTxnljBVaowY8f7rmsnXMfzq6n8%3D&reserved=0.

EHUbels commented 5 years ago

Arjen or Jan,

Thanks you so much for responding, really appreciate it. I have tried many different things today but I’m going trough a steep learning curve in C++.

Looking at the GoodWeCommunication.pp I understand that ones the converter is registered it starts handling the data by the handleIncomingInformation function, than the struct, based on the actual inverters address starts to fill from the individual items (inverter->vpv1 = bytesToFloat(data, 10);, that is after it converted the two HEX bytes to the actual float.

I’ve tried many different ways to read the individual items from the main loop, but did not succeed. I need the individual items to build a JSON formatted message. Any help to read the individual items (one example obviously would do it) into the main loop would be highly appreciated.

Regards,

Erik

Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows 10


From: Arjen notifications@github.com Sent: Sunday, January 27, 2019 7:16:18 PM To: jantenhove/GoodWeLogger Cc: EHUbels; Author Subject: Re: [jantenhove/GoodWeLogger] Inverter Data to Serial Port (#19)

There is a function "getInvertersInfo" on the GoodWeCommuncation.cpp file. It contains all the discovered inverters with the data in it. Simple call that function after you called the handleData function.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fjantenhove%2FGoodWeLogger%2Fissues%2F19%23issuecomment-457940941&data=02%7C01%7C%7C626490b9986b407b62cc08d68483891d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636842097800763807&sdata=G0hFNnIuH%2BUrEnUU7Kv%2BOcdxSdRAeL7HNrzyJZU4bY0%3D&reserved=0, or mute the threadhttps://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAMnMpK19ZCmJWhCmkGRCnZCFwHIuKRfSks5vHezygaJpZM4aUxO1&data=02%7C01%7C%7C626490b9986b407b62cc08d68483891d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636842097800773818&sdata=%2FpLOS9%2FmGJg%2Bvy5dQTxnljBVaowY8f7rmsnXMfzq6n8%3D&reserved=0.

jantenhove commented 5 years ago

You can create a file similar to MQTTPublisher that, instead of sending it with MQTT, prints it on the serial port. When you created something, please send a PR, so I can add it.