meltaxa / solariot

Leverage your IoT enabled Solar PV Inverter to stream your solar energy usage data to a real time dashboard.
https://solariot.live
MIT License
201 stars 69 forks source link

Compatibility with SG6K-D inverter #10

Closed brunolinsalves closed 3 years ago

brunolinsalves commented 4 years ago

Hi,

I have a sungrow inverter (model SG6K-D) and I want to know if I can use this script (with modbus-sungrow-sh5k.py values). I don't know if I could explain, but how do I use this script with SG6K-D inverter ? Can I use the config.py with model = "sungrow-sh5k" ?

Thanks

brunolinsalves commented 4 years ago

I tried to execute with this config.py and got the [ERROR] 'ModbusIOException' object has no attribute 'registers'. The IP of the inverter is correct.

inverter_ip = "192.168.XXX.XXX"
inverter_port = 502
# Slave Defaults
# Sungrow: 0x01
# SMA: 3
slave = 0x01
model = "sungrow-sh5k"
timeout = 3
scan_interval = 10
meltaxa commented 4 years ago

Check your slave address is correct too. If you do not know it, try cycling through different addresses from 0x01 to 0x04.

mpp-piotrp commented 4 years ago

I have the same problem with sungrow-sh5k after a remote firmware upgrade. Have they changed the Modbus map? Slave address?

chrisvivo commented 4 years ago

I have the same issue for a month or so after a firmware update.. have tried different slave address etc, no luck. I think it was to do with a fix for https://solarcybersecurity.com/

Otherwise, it's been running great and thank you!

meltaxa commented 4 years ago

Unfortunately (or perhaps fortunately), I have an older wifi module that wasn't in the firmware update scope provided by Sungrow.

Can you confirm the default TCP port (502) is still open?

chrisvivo commented 4 years ago

Thanks for looking, yep, 502 is open:

Open TCP Port: 80 http Open TCP Port: 502 asa-appl-proto

mopedy commented 4 years ago

Hi meltaxa,

thanks for your great work, was working perfectly until recently. I guess i have same problem as chrisvivo. Did you get it to work again?

chrisvivo commented 4 years ago

Unfortunately not, I tried a multitude of things within my limited ability.

mopedy commented 4 years ago

I managed to get it working again, by using a old wlan module like you described above. Interestingly i was using it over Ethernet and not Wifi before, by setting up the wifi Module on the inverter again, it somehow opened the ethernet cable port as well. Which allows me to use my old setup without the wifi module again.

rpvelloso commented 3 years ago

I have a SG4K with an wi-fi interface. Tried using it with your SH5K config, got this: Load config sungrow-sg4k Load ModbusTcpClient Connect [ERROR] 'ModbusIOException' object has no attribute 'registers' [ERROR] 'ModbusIOException' object has no attribute 'registers' [ERROR] 'ModbusIOException' object has no attribute 'registers' {}

Any idea? Where can I find register mapping for my inverter? How did you find yours?

Thanks.

meltaxa commented 3 years ago

Refer to #12 which will track any updates on using the SungrowModbusTcpClient library which addresses the encryption issue on later firmware versions.