graham0 / ginlong-wifi

Collect data from second generation Ginlong/Solis inverter equipped with a WIFI stick.
GNU General Public License v3.0
48 stars 16 forks source link

Reading Inverter data through Raspberry Pi #5

Closed chauhansaurabhb closed 4 years ago

chauhansaurabhb commented 6 years ago

I am trying to read data through Raspberry Pi instead of using the ginlong-wifi module. I tried with RS485 to USB serial converter and RS485 to TTL converter along with Modbus protocol and serial communication to read the data from Inverter.

I got the following response from the inverter that: [Input/Output] No Response received from the remote unit and could not able to read the data.

I would be happy if you can share your views on the above.

Looking for the swift response!

Thanking you, Saurabh

acmorfe commented 6 years ago

hi Saurabh, try function 4, from address 2999 to 3079. these are what I have identified so far on Solis 5K-4G: Address Comment 3005 ac power 3007 pv power 3009 total energy 3011 month energy 3013 last month energy 3014 today energy /10 3015 yesterday energy /10 3017 year energy 3019 last year energy 3021 dc1 voltage /10 3022 dc1 current /10 3023 dc2 voltage /10 3024 dc2 current /10 3035 ac voltage /10 3036 ac current /10 3038 ac current /10 --duplicate of 3036 3041 temperature /10 3042 frequency /100 3043 status 0-2 init, 3 ready, error 3067 ??? error 3069 ??? error 3072 yy 3073 mm 3074 dd 3075 hh24 3076 mi 3077 ss

chauhansaurabhb commented 6 years ago

Hi,

Thanks for the pointer.

My concern is to read data directly from the inverter without using data logger. I have gone through your code but it seems that you pointed me to read data from data logger. My goal is to read data directly from the inverter, connecting inverter and Raspberry Pi through RS485 to USB serial interface.

Thanks, Saurabh

acmorfe commented 6 years ago

data logger? I am reading the values thru rs485...

chauhansaurabhb commented 6 years ago

Hi Graham,

I got your point and I could able to read the data from Microlyte inverter using Raspberry Pi through RS 485 to USB serial converter.

Now, I will use the address suggested by you for the mapping.

Thanks for the swift response!

Thanking you, Saurabh

On Sun, Mar 18, 2018 at 3:06 PM, acmorfe notifications@github.com wrote:

hi Saurabh, try function 4, from address 2999 to 3079. these are what I have identified so far: Address Comment 3005 ac power 3007 pv power 3009 total energy 3011 month energy 3013 last month energy 3014 today energy /10 3015 yesterday energy /10 3017 year energy 3019 last year energy 3021 dc1 voltage /10 3022 dc1 current /10 3023 dc2 voltage /10 3024 dc2 current /10 3035 ac voltage /10 3036 ac current /10 3038 ac current /10 --duplicate of 3036 3041 temperature /10 3042 frequency /100 3043 status 0-2 init, 3 ready, error 3067 ??? error 3069 ??? error 3072 yy 3073 mm 3074 dd 3075 hh24 3076 mi 3077 ss

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/graham0/ginlong-wifi/issues/5#issuecomment-373984449, or mute the thread https://github.com/notifications/unsubscribe-auth/AMetK_Fr_LKIstnrrmyCJOogwvViRemVks5tfiqAgaJpZM4SutfS .

arthurrnuness commented 6 years ago

@acmorfe did you used a RS485-USB converter?

chauhansaurabhb commented 6 years ago

Hi,

I could able to read data through RS485 to USB converter.

Thanks!

Thanking you, Saurabh

On Wed, Jul 11, 2018 at 1:39 PM arthurrnuness notifications@github.com wrote:

@acmorfe https://github.com/acmorfe did you used a RS485-USB converter?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/graham0/ginlong-wifi/issues/5#issuecomment-404138908, or mute the thread https://github.com/notifications/unsubscribe-auth/AMetKyMThyA9p9CxGBO1PpeFUhB9I6_aks5uFePWgaJpZM4SutfS .

graham0 commented 6 years ago

Hi, I would think it is possible but I have not tried it myself. Some have been playing around with it see here https://forums.whirlpool.net.au/archive/2081658 Hope this helps.

arthurrnuness commented 6 years ago

@graham0 So how did you connected the inverter and your PC? You only have tried with the wifi stick?

graham0 commented 6 years ago

I used the supplied wi-fi "stick" which can be configured to send it's data to a local server.

danho-san commented 6 years ago

Hey guys, interesting work! I am setting up a PI to monitor my Solis 5.0kW 4G 2 MPPT. @chauhansaurabhb : Which pins on the COM port did you use to connect your USB converter? I am using node-red on the PI to log a lot of stuff about my whole setup. Thanks

graham0 commented 6 years ago

Hi danho-san I'm not sure about the pinout. I don't connect directly to the inverter, I use the supplied Wi-Fi 'stck'. There are only 4 pins so one will be power, one ground to power the Wi-Fi unit. The other two will be the RS485 Tx/Rx. You should be able to identify power and ground with a multimeter. You will also need to look at code written specifically for the 4th gen Ginlong inverters. There are several on github eg: https://github.com/leocavadas/Ginlong-mqtt Hope this helps, Graham0

danho-san commented 6 years ago

Hi Graham0, thanks for the hint! Will try that. danho-san

chauhansaurabhb commented 6 years ago

Hi, I tried with Microlyte inverter and it has a same configuration as ginlong or may be replica of ginlong.

At this moment, I am not sure but if you look at the data logger carefully then you can find the pin names too.

I tried to connect it using RS 485.

Thanks, Saurabh

Sent from my iPhone

On Aug 25, 2018, at 1:01 PM, danho-san notifications@github.com wrote:

Hi Graham0, thanks for the hint! Will try that. danho-san

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

danho-san commented 6 years ago

Hi, I don't have the data logger and was hoping to directly connect to the COM pins. I measured voltages of the pins and found three pairs with sth around 1.5 V. Which I think should be close enough to the RS485 specs. Unfortunately to no avail. I am connecting with a RS485 to USB adapter: https://www.makershop.de/module/kommunikation-module/rs485-adapter/ But to no avail. I tried boh via the raspi and via a nice win tool I found: http://en.radzio.dxp.pl/modbus-master-simulator/

But no luck getting responses via modbus.

Maybe I'll have to buye that un-necessary data-logger. Which hurts my engineering pride a lot ;)

Thanks, danho-san

graham0 commented 6 years ago

Hi again, Have you seen this project https://github.com/Crosenhain/ginlong_poller ? It may point you in the right direction. My data logger came as part of the package. Having all the internal data from the inverter was interesting to begin with, but I now rely a pulse counter attached to the generation meter because of better accuracy. You can see my results here: http://whiteside.me.uk/solar

Graham0

chauhansaurabhb commented 6 years ago

Hi,

Sometimes you need to play with the register address and that could be the reason that you didn’t get the response.

I would say just look into the data logger datasheet and you will have an idea don’t need to buy.

All the best.

Thanks, Saurabh

Sent from my iPhone

On Aug 26, 2018, at 5:46 PM, danho-san notifications@github.com wrote:

Hi, I don't have the data logger and was hoping to directly connect to the COM pins. I measured voltages of the pins and found three pairs with sth around 1.5 V. Which I think should be close enough to the RS485 specs. Unfortunately to no avail. I am connecting with a RS485 to USB adapter: https://www.makershop.de/module/kommunikation-module/rs485-adapter/ But to no avail. I tried boh via the raspi and via a nice win tool I found: http://en.radzio.dxp.pl/modbus-master-simulator/

But no luck getting responses via modbus.

Maybe I'll have to buye that un-necessary data-logger. Which hurts my engineering pride a lot ;)

Thanks, danho-san

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

danho-san commented 6 years ago

@ graham0, thanks for the hint! I guess, using the wifi stick would be the quickest solution. Your statistics page is quite interesting :)

@ chauhansaurabhb, Yeah, I have the feeling that it should be possible to do it without the stick. I will try to "port-scan" through the registers. Maybe I'll get an answer somewhere..

I am mostly interested in reading out the DC voltage. And not so much in how much power it produced.

danho-san commented 6 years ago

Got the ginlong_poller running now and feeding into node-red on a pi :)

image

graham0 commented 6 years ago

Brilliant! That looks really good. I might take a look at Node-Red myself.

RobertSmart commented 4 years ago

We are using RS485 to poll the inverter every 2 seconds. This bypasses the data stick entirely and gives far better resolution. I'm happy to explain how if anyone is interested.

graham0 commented 4 years ago

Hi RobertSmart, That would be useful, I know several people have tried and failed. I've not tried direct access to the inverter without the 'Wi-Fi stick' myself, so I can't help people who ask for advice.

RobertSmart commented 4 years ago

Ok, whats the best to do it? as a wiki entry?

graham0 commented 4 years ago

Hi Again, Might be worth opening a new project on Github so it can be easily found.

RobertSmart commented 4 years ago

OK, I'll start a new project and add you as a collaborator if you want. Then presumably we can just link from here over to it?

Thanks,

Rob

anthonyl5826 commented 4 years ago

OK, I'll start a new project and add you as a collaborator if you want. Then presumably we can just link from here over to it?

Thanks,

Rob

Interested in this aswell, I have the hybrid inverter and currently using the WiFi monitoring stick but really want it more up to date than 5 minutes,

Which RS485 - USB are you using?

RobertSmart commented 4 years ago

I've started to detail whats needed in this repo https://github.com/RobertSmart/ginlong_RS485

jasonmadigan commented 3 years ago

I've started to detail whats needed in this repo https://github.com/RobertSmart/ginlong_RS485

That repo is gone, is it relocated elsewhere?

RobertSmart commented 3 years ago

Hi, I had to take that repo down unfortunately. I can answer questions on this repo though if that helps.

jasonmadigan commented 3 years ago

@RobertSmart ah OK! I've just been trying to poke for inverter (Solis Hybrid) data via RS485. Things are wired OK, and I'm poking around with minimalmodbus, but I don't seem to either be hitting on the right registers or something else to pull stats, so was wondering if someone else out there had gotten something working.

RobertSmart commented 3 years ago

OK, first things first, are you sure it's wired OK? How have you made the connection? Have you got the document for the modus registers? Which registers are you trying to get?