How to APsystems Modell EZ1-M monitoring

hello,
and thanks for the update on this. I updated to 2.0.1 but still get errors:

2024-01-19 13:09:32.339 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.apsystems_ez1_lifetime_production_p1 fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 898, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1216, in async_device_update
    await self.async_update()
  File "/config/custom_components/apsystemsapi_local/sensor.py", line 206, in async_update
    await self.async_update_data()
  File "/config/custom_components/apsystemsapi_local/sensor.py", line 142, in async_update_data
    data = await self._api.get_output_data()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/APsystemsEZ1/__init__.py", line 163, in get_output_data
    return ReturnOutputData(**response["data"]) if response else None
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: ReturnOutputData.__init__() missing 6 required positional arguments: 'p1', 'e1', 'te1', 'p2', 'e2', and 'te2'

and suggestion to this?

Looks like it is receiving a response from the OutputData endpoint, but it does not contain any data.
Strange behavior @Mawoka

Could you please open http://[IP_Address_of_the_inverter]/getOutputData in your webbrowser and send me the output of that? That would be really helpful.

tried to connect to the inverter via http://[IP_Address_of_the_inverter]/getOutputData …

“ERR_CONNECTION_REFUSED” is the response … anything I needs to adjusted on the inverter to get the output?

Did you followed the instructions here @Monster_D GitHub - SonnenladenGmbH/APsystems-EZ1-API: The APsystems EZ1 Python library offers a streamlined interface for interacting with the local API of APsystems EZ1 Microinverters. ?

missed the PORT 8050 …
inverter-firmware: EZ1 1.6.0

{"data":{"p1":16,"e1":0.54192,"te1":13.19559,"p2":12,"e2":0.49503,"te2":8.68317},"message":"SUCCESS","deviceId":"E07000048699"}

are the return/output.

Firmware-Version is: EZ1 1.6.0

Error-Log looks like this:

2024-02-02 10:06:17.254 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.apsystems_ez1_lifetime_production fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 898, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1216, in async_device_update
    await self.async_update()
  File "/config/custom_components/apsystemsapi_local/sensor.py", line 196, in async_update
    await self.async_update_data()
  File "/config/custom_components/apsystemsapi_local/sensor.py", line 142, in async_update_data
    data = await self._api.get_output_data()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/APsystemsEZ1/__init__.py", line 163, in get_output_data
    return ReturnOutputData(**response["data"]) if response else None
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: ReturnOutputData.__init__() missing 6 required positional arguments: 'p1', 'e1', 'te1', 'p2', 'e2', and 'te2'
2024-02-02 10:06:18.251 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.apsystems_ez1_lifetime_production_p1 fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 898, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1216, in async_device_update
    await self.async_update()
  File "/config/custom_components/apsystemsapi_local/sensor.py", line 206, in async_update
    await self.async_update_data()
  File "/config/custom_components/apsystemsapi_local/sensor.py", line 142, in async_update_data
    data = await self._api.get_output_data()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/APsystemsEZ1/__init__.py", line 163, in get_output_data
    return ReturnOutputData(**response["data"]) if response else None
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: ReturnOutputData.__init__() missing 6 required positional arguments: 'p1', 'e1', 'te1', 'p2', 'e2', and 'te2'
2024-02-02 10:06:19.745 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.apsystems_ez1_lifetime_production_p2 fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 898, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1216, in async_device_update
    await self.async_update()
  File "/config/custom_components/apsystemsapi_local/sensor.py", line 216, in async_update
    await self.async_update_data()
  File "/config/custom_components/apsystemsapi_local/sensor.py", line 142, in async_update_data
    data = await self._api.get_output_data()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/APsystemsEZ1/__init__.py", line 163, in get_output_data
    return ReturnOutputData(**response["data"]) if response else None
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: ReturnOutputData.__init__() missing 6 required positional arguments: 'p1', 'e1', 'te1', 'p2', 'e2', and 'te2'
2024-02-02 10:11:17.251 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.apsystems_ez1_today_production_p2 fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 898, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1216, in async_device_update
    await self.async_update()
  File "/config/custom_components/apsystemsapi_local/sensor.py", line 246, in async_update
    await self.async_update_data()
  File "/config/custom_components/apsystemsapi_local/sensor.py", line 142, in async_update_data
    data = await self._api.get_output_data()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/APsystemsEZ1/__init__.py", line 163, in get_output_data
    return ReturnOutputData(**response["data"]) if response else None
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: ReturnOutputData.__init__() missing 6 required positional arguments: 'p1', 'e1', 'te1', 'p2', 'e2', and 'te2'
2024-02-02 10:11:18.254 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.apsystems_ez1_today_production_p1 fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 898, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1216, in async_device_update
    await self.async_update()
  File "/config/custom_components/apsystemsapi_local/sensor.py", line 236, in async_update
    await self.async_update_data()
  File "/config/custom_components/apsystemsapi_local/sensor.py", line 142, in async_update_data
    data = await self._api.get_output_data()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/APsystemsEZ1/__init__.py", line 163, in get_output_data
    return ReturnOutputData(**response["data"]) if response else None
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: ReturnOutputData.__init__() missing 6 required positional arguments: 'p1', 'e1', 'te1', 'p2', 'e2', and 'te2'

What does the inverter response look like at the time when you receive the error from the python lib?

The error message sounds as if the python lib received a response from the inverter, but this response contains no or only incomplete information for the “data” key.

How to see the response of the inverter at the error times? Please advice on what to do.
Thanks

Do you mean if the values drop to unavailable for example? This was not seen. I will check again.

Just do, what @Mawoka said here How to APsystems Modell EZ1-M monitoring - #68 by Mawoka when the error occures next time.

Or is the output you already postet here How to APsystems Modell EZ1-M monitoring - #71 by Monster_D at error time? Because it looks completely normal.

I’m gonna log the response on error to the console in a future update, when I won’t forget it

2 Likes

Is there the posibility to increase the frequency of the sensor poll - e. set the refresh rate of APsystems Sunny Total Power to every 20 Seconds.

hello, i have some questions about th EZ1.
as i already have a whole solarsystem on solaredge and a smartmeter, I wonder if i can use this with a battery without solarpanels, can this charge the otherway around? so from grid to battery?(obvious only with a script when my solaredge is giving juise;) )

I’ve just pushed an update: It’s possible, but you’ll have to re-add your inverter.

1 Like

Just wanted to say thank you for the EZ1 integration. Works like a charm. The only downside seems to be a rather complicated installation.

@Mawoka When I installed the integration today, there was this number “15” during the setup process. Is that the polling interval? I could not make sense of it first, because there was no label next to the input box.

The problem with the complicated installation will be fixed with the new version of HA. And regarding the number, you’re right, that is the polling interval.

That’s very cool! Just noticed you’re work in the HA repo :+1:.

Do you happen to know how the transition from the custom component is going to work?

Will the new first-party integration be able to take over the entity names and historical data from the current solution?

I’m wondering if I should maybe uninstall the third-party integration for now and wait for the next HA release.

There will be no way to transition, unfortunately, but you can also just keep using the custom one, but it won’t receive any updates anymore. So if you can wait, do so.

A big Thank You from my side as well.

FYI, I have updated to Firmware 1.7.0 and as far as I can see, things continue to be working just nicely.

http http://192.168.180.82:8050/getDeviceInfo
{
    "data": {
        "devVer": "EZ1 1.7.0",          <------------
        "deviceId": "E07000045161",
        "ipAddr": "192.168.180.82",
        "maxPower": "600",
        "minPower": "30",
        "ssid": "HOMECTRL"
    },
    "deviceId": "E07000045065",
    "message": "SUCCESS"

}

1 Like

Okay, so this integration is now part of Home Assistant and I’ll archive the custom repo.