homeassistant-solax-modbus icon indicating copy to clipboard operation
homeassistant-solax-modbus copied to clipboard

[FR] Add support for Growatt SPF

Open wills106 opened this issue 1 year ago • 19 comments

          Have same problem: ERROR (MainThread) [custom_components.solax_modbus.plugin_growatt] unrecognized growatt inverter type - firmware version : 067.01068.01 , with Growatt spf 5000es inverter , spf inverter is not listed, how to setup?

Originally posted by @Asterix229 in https://github.com/wills106/homeassistant-solax-modbus/issues/673#issuecomment-1863296639

          Growatt SPF 5000 ES conected to local, usb-usb or rs485 modbus converter, work on pc program pvkeeper, on solaxpower recive some data if inverter put srne

Originally posted by @Asterix229 in https://github.com/wills106/homeassistant-solax-modbus/issues/673#issuecomment-1874429399

Growatt SPF is an Inverter aimed at off grid use, while having the capability to charge off the Grid or Generator etc Uses a different Modbus register set as outlined in "OffGrid-Modbus-RS485RS232-RTU-Protocol-V0.14-20210420.pdf"

wills106 avatar Jan 03 '24 08:01 wills106

My inverter hibrid Growatt SPF 5000 ES 1x solar PV, main, load, battery, software and hardware 067 01 1.04 and 068 01 1.04, DTC device type code 034xx OffGrid SPF 3-5K, where to change register? Try plugin_growatt.py change HIBRID number but no work, think Modbus protocol v0.14 is my inverter protocol. Where to change? Firmware version recognize. Error log:

2023-12-17 21:51:02.439 WARNING (MainThread) [homeassistant.util.async_] Detected blocking call to sleep inside the event loop by custom integration 'solax_modbus' at custom_components/solax_modbus/init.py, line 344: return self.client.read_holding_registers(address, count, **kwargs), please create a bug report at https://github.com/wills106/homsassistant-solax-modbus/issues 2023-12-17 21:51:02.504 WARNING (MainThread) [homeassistant.util.async] Detected blocking call to sleep inside the event loop by custom integration 'solax_modbus' at custom_components/solax_modbus/init.py, line 344: return self._client.read_holding_registers(address, count, **kwargs), please create a bug report at https://github.com/wills106/homsassistant-solax-modbus/issues 2023-12-17 21:51:02.556 ERROR (MainThread) [custom_components.solax_modbus.plugin_growatt] unrecognized growatt inverter type - firmware version : 067.01068.01

Asterix229 avatar Jan 03 '24 14:01 Asterix229

Just released a Beta with a couple of Solar an Battery sensors. 2024.01.3b1 Do they work ok?

wills106 avatar Jan 03 '24 15:01 wills106

just instal and try. no work. before recognize firmware, now not. error log 2024-01-03 16:57:53.796 WARNING (MainThread) [homeassistant.util.async_] Detected blocking call to sleep inside the event loop by custom integration 'solax_modbus' at custom_components/solax_modbus/init.py, line 344: return self._client.read_holding_registers(address, count, **kwargs), please create a bug report at https://github.com/wills106/homsassistant-solax-modbus/issues 2024-01-03 16:57:56.808 WARNING (MainThread) [custom_components.solax_modbus.plugin_growatt] growatt: reading firmware number from address 0xbb9 failed; other address may succeed 2024-01-03 16:57:56.809 ERROR (MainThread) [custom_components.solax_modbus.plugin_growatt] growatt: cannot find firmware version, even not for other Inverter 2024-01-03 16:57:56.809 ERROR (MainThread) [custom_components.solax_modbus.plugin_growatt] unrecognized growatt inverter type - firmware version : unknown

Asterix229 avatar Jan 03 '24 16:01 Asterix229

My mistake recognize firmware. error log: 2024-01-03 17:27:17.450 WARNING (MainThread) [homeassistant.util.async_] Detected blocking call to sleep inside the event loop by custom integration 'solax_modbus' at custom_components/solax_modbus/init.py, line 344: return self.client.read_holding_registers(address, count, **kwargs), please create a bug report at https://github.com/wills106/homsassistant-solax-modbus/issues 2024-01-03 17:27:17.468 WARNING (MainThread) [homeassistant.util.async] Detected blocking call to sleep inside the event loop by custom integration 'solax_modbus' at custom_components/solax_modbus/init.py, line 344: return self._client.read_holding_registers(address, count, **kwargs), please create a bug report at https://github.com/wills106/homsassistant-solax-modbus/issues 2024-01-03 17:27:17.474 ERROR (MainThread) [custom_components.solax_modbus.plugin_growatt] unrecognized growatt inverter type - firmware version : 067.01068.01

Asterix229 avatar Jan 03 '24 16:01 Asterix229

After installing 2024.01.3b1 did you restart HA?

wills106 avatar Jan 03 '24 16:01 wills106

yes, many times reinstal restarc change rs485 adapter the resul is same. 2024-01-03 18:46:11.203 WARNING (MainThread) [homeassistant.util.async_] Detected blocking call to sleep inside the event loop by custom integration 'solax_modbus' at custom_components/solax_modbus/init.py, line 344: return self.client.read_holding_registers(address, count, **kwargs), please create a bug report at https://github.com/wills106/homsassistant-solax-modbus/issues 2024-01-03 18:46:11.218 WARNING (MainThread) [homeassistant.util.async] Detected blocking call to sleep inside the event loop by custom integration 'solax_modbus' at custom_components/solax_modbus/init.py, line 344: return self.client.read_holding_registers(address, count, **kwargs), please create a bug report at https://github.com/wills106/homsassistant-solax-modbus/issues 2024-01-03 18:46:11.234 WARNING (MainThread) [homeassistant.util.async] Detected blocking call to sleep inside the event loop by custom integration 'solax_modbus' at custom_components/solax_modbus/init.py, line 344: return self.client.read_holding_registers(address, count, **kwargs), please create a bug report at https://github.com/wills106/homsassistant-solax-modbus/issues 2024-01-03 18:46:11.249 WARNING (MainThread) [homeassistant.util.async] Detected blocking call to sleep inside the event loop by custom integration 'solax_modbus' at custom_components/solax_modbus/init.py, line 344: return self._client.read_holding_registers(address, count, **kwargs), please create a bug report at https://github.com/wills106/homsassistant-solax-modbus/issues 2024-01-03 18:46:11.255 ERROR (MainThread) [custom_components.solax_modbus.plugin_growatt] unrecognized growatt inverter type - firmware version : 067.01068.01

Asterix229 avatar Jan 03 '24 17:01 Asterix229

Hi,

the beta broke my non SPF-Inverter. I guess the bug is

GEN            = 0x0001 # base generation for MIC, PV, AC
GEN2           = 0x0002
GEN3           = 0x0004
GEN4           = 0x0008
SPF            = 0x0016             <-- should be 0x0010 :)

/br christian

choenig avatar Jan 07 '24 07:01 choenig

the beta broke my non SPF-Inverter.

What exactly broke? Do you have any errors in your log?

Edit: I am getting my Hex and Decimal mixed up.

When you changed it to 10 locally did the beta start working again?

wills106 avatar Jan 07 '24 11:01 wills106

@Asterix229 are you able to try 2024.01.3b2 does it start to return a couple of registers?

wills106 avatar Jan 07 '24 11:01 wills106

Hi @wills106,

Thanks for the fix :)

I did not have time to test it again, but the problem was, that it tried to use the SPF-Registers for my SPH, too.

I am getting my Hex and Decimal mixed up.

That's why I'm always using the following syntax in C++, don't know about python, though:

enum MyType {
    Value0 = 0,       // 0
    Value1 = 1 << 0,  // 2^0 = 1
    Value2 = 1 << 1,  // 2^1 = 2
    Value3 = 1 << 2,  // 2^2 = 4
    ...
};

/christian

choenig avatar Jan 08 '24 08:01 choenig

Hi,

works fine now, thank you so much :)

/christian

choenig avatar Jan 08 '24 19:01 choenig

@Asterix229 Have you been able to test any of the later releases? I want to check the couple of registers I have implemented return something, before I work on adding in more.

wills106 avatar Jan 11 '24 09:01 wills106

2 days ago when install 2023.12.5 (show SW and FW in log file) gradual one update version not work even SW and FW, then install 2024.01.3b2 it work and show some data for 5 min when reload data or restart reinstall nothing work. Today finally find time and reinstall from 23.12.5 to 24.1.3 and work all ok. Reinstall 24.1.5 work too. Thank for patience, thank so much. error log: init.py, line 344 - 12 times, line 350 - 9 times

Asterix229 avatar Jan 11 '24 18:01 Asterix229

You can hide the blocking calls by looking here It's a know issue when using an RS485 - USB adaptor.

Now I know your Inverter is returning values I'll add in some more.

wills106 avatar Jan 11 '24 19:01 wills106

I have added more support for your Inverter with 2024.01.6 I still need to do the Write registers

Edit: I have had to guess some of the names or sensors. So might not be the best naming convention.

wills106 avatar Jan 12 '24 09:01 wills106

Work well, chenged register 27, Battery Load, and register 21 and 23, scale=0.001. Thank's

Asterix229 avatar Jan 12 '24 21:01 Asterix229

Thanks for the feedback.

I'll try and make some changes over the weekend for you to try.

wills106 avatar Jan 12 '24 21:01 wills106

I made those changes in 2024.02.5b5 Which missing features do you want me to focus on?

wills106 avatar Feb 15 '24 11:02 wills106

I have the SPF 5000TL and get the following, so desnt yet work with my generation:

Logger: custom_components.solax_modbus.plugin_growatt
Source: custom_components/solax_modbus/plugin_growatt.py:4761
integration: SolaX Inverter Modbus ([documentation](https://github.com/wills106/homsassistant-solax-modbus), [issues](https://github.com/wills106/homsassistant-solax-modbus/issues))
First occurred: 2:25:28 PM (1 occurrences)
Last logged: 2:25:28 PM

unrecognized SPF5000TL inverter type - firmware version : 500.10002.05

EDIT: Adding elif seriesnumber.startswith('500'): invertertype = HYBRID | SPF | X1 # Hybrid SPF 5kW to line 4757 did start it working and most of the data looks good (I havent been through it all yet)

PrimusNZ avatar Mar 15 '24 01:03 PrimusNZ

Closing down, if anyone wants to contribute more for the SPF Inverters please submit a PR.

wills106 avatar Aug 03 '24 08:08 wills106