Universal Solar Inverter over Modbus RS485 / TCP custom_component (AlphaESS, Growatt, Sofar, SolaX, Solinteg, Solis, SRNE, Swatten, TIGO TSI & Qcells Q.Volt Hyb)

I can confirm that this is working. Removed the dongle, connected the LAN directly to router.

Went in the IOS App and added a new inverter. Despite asking and showing a picture of the dongle, you can add the registration code after retrieving it as you mentioned, and the app picks it up. (Note I cannot find a way to do the same if I would go through the website, so I had to go through the App) .

You just made my day. Time to buy you a ko-fi !

1 Like

Glad you are sorted now, that’s the main thing!

hi Will
I’m a newbie with Homeassistant
installed now your HACS scripts from Github
but when I try to add the integration from the table I get this:
Der Konfigurationsfluss konnte nicht geladen werden: Invalid control character at: line 10 column 95 (char 597)
please could you check this ?

Could you send the complete stack trace for this error (if any) by clicking the log entry?

Logger: homeassistant.util.json
Source: util/json.py:33
First occurred: 12:55:54 (9 occurrences)
Last logged: 13:37:08

Could not parse JSON content: /config/custom_components/solax_modbus/translations/de.json
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/util/json.py”, line 33, in load_json
return json.loads(fdesc.read()) # type: ignore[no-any-return]
File “/usr/local/lib/python3.9/json/init.py”, line 346, in loads
return _default_decoder.decode(s)
File “/usr/local/lib/python3.9/json/decoder.py”, line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File “/usr/local/lib/python3.9/json/decoder.py”, line 353, in raw_decode
obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Invalid control character at: line 10 column 95 (char 597)

Thanks, this is an error in the german translation that we have already corrected in the source code some days ago.
Unfortunately, I fear that @wills106 has not packaged this yet in the HACS version. I dont know when Will bill be able to create a new HACS package
You can either temporarily switch to english or pull the source code (latter may not be consistent)

looks fine in english
thanks

I have just pushed out 0.4.13a which should fix the DE translation json.

What exactly does the unlock do? And how can I verify that the inverter is unlocked?

If your lockstate is locked. You can’t use the select or number functions.
The lock state normally gets unlocked the first time you connect the Inverter to the cloud and log into the settings page on the cloud.

If the Inverter has never been connected to the cloud you will need to press the unlock button to gain control over the Inverter locally.

To check the lock state you can enable the following disabled by default sensor.
Then press update and wait 30 or so seconds.

Be aware that in some recent prerelease versions, the unlock button was broken. The most recent version should be ok

Thanks for the help :slight_smile:
When I press Unlock I get the following error:

Failed to call service button/press. required argument is not an integer

The Logbook says:

changed to April 10, 2022, 20:01

Don’t know what it should change it to though…
BTW: I’m using version 0.4.13, but manually fixed the german translation if that is relevant.

We have already fixed this bug very recently.
It is certainly solved in the hacs beta (or latest prerelease) version.
The main version has not been updated yet.

0.5.0 probably isn’t far off from release now. Can people please verify if they have ran the pre-release branch ok? The latest is 0.5.0b5.

I know @infradom @matthewjporter & myself have being using it for the past couple of days, with tweaks along the way.

But we could do with knowing if a wider audience has been using it successfully or not?

I updated to 0.5.0b5, could unlock the inverter and can change numbers and selects now.

1 Like

Thanks for testing the new Pre-release out!

Hi Will,

Sorry, was a busy few days. I went back to reinstall and check for log errors. Is it removed now or does the 0.5.0b5 do it? I tried that but it didn’t load

The last test I did with minimal register reading was X1-AC-Test-5

What exactly do you mean by that?

When you setup the Integration there are no values within the Integration?

Or when you try to add the Integration you can’t find it in the list?

It showed with a red box, stating failed to load, with the following error


This error originated from a custom integration.

Logger: homeassistant.config_entries
Source: custom_components/solax_modbus/__init__.py:112 
Integration: SolaX Inverter Modbus (documentation, issues) 
First occurred: 15:20:51 (1 occurrences) 
Last logged: 15:20:51

Error setting up entry SolaX for solax_modbus
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 335, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/config/custom_components/solax_modbus/__init__.py", line 112, in async_setup_entry
    invertertype = invertertype | HYBRID  # adapt for AC model
UnboundLocalError: local variable 'invertertype' referenced before assignment

I didn’t see the X1AC beta, will reload HACS showing more beta options and see if it shows then