Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration works for one day. #261

Open
Dakhaasje opened this issue Aug 4, 2024 · 18 comments
Open

Integration works for one day. #261

Dakhaasje opened this issue Aug 4, 2024 · 18 comments

Comments

@Dakhaasje
Copy link

I have :
Core 2024.7.4
Supervisor 2024.06.2
Operating System 12.4
Frontend 20240710.0
1 ECU-B, with 2 DS3L inverters
Every day this works IF I reboot HA... rebooting the ECU-B has no effect at all.

@HAEdwin
Copy link
Collaborator

HAEdwin commented Aug 4, 2024

Have you allready investigated the logs?

@Dakhaasje
Copy link
Author

there is nothing in the log with ' ECU' the next day.

@Dakhaasje
Copy link
Author

Dakhaasje commented Aug 6, 2024

> 024-08-06 05:09:43.413 DEBUG (SyncWorker_16) [custom_components.apsystems_ecur] Not querying ECU due to query=False
2024-08-06 05:09:43.415 DEBUG (MainThread) [custom_components.apsystems_ecur] Finished fetching apsystems_ecur data in 0.002 seconds (success: True)

2024-08-06 05:09:43.424 DEBUG (MainThread) [custom_components.apsystems_ecur.sensor] State called for power
2024-08-06 05:09:43.424 DEBUG (MainThread) [custom_components.apsystems_ecur.sensor] POWER  703000 1
2024-08-06 05:14:43.414 DEBUG (SyncWorker_2) [custom_components.apsystems_ecur] Not querying ECU due to query=False
2024-08-06 05:14:43.416 DEBUG (MainThread) [custom_components.apsystems_ecur] Finished fetching apsystems_ecur data in 0.003 seconds (success: True)
2024-08-06 05:14:43.417 DEBUG (MainThread) [custom_components.apsystems_ecur.sensor] State class measurement - current_power
2024-08-06 05:14:43.417 DEBUG (MainThread) [custom_components.apsystems_ecur.sensor] State called for current_power
2024-08-06 05:14:43.417 DEBUG (MainThread) [custom_components.apsystems_ecur.sensor] State class total_increasing - today_energy
2024-08-06 05:14:43.417 DEBUG (MainThread) [custom_components.apsystems_ecur.sensor] State called for today_energy
2024-08-06 05:14:43.418 DEBUG (MainThread) [custom_components.apsystems_ecur.sensor] State class total_increasing - lifetime_energy
2024-08-06 05:14:43.418 DEBUG (MainThread) [custom_components.apsystems_ecur.sensor] State called for lifetime_energy
2024-08-06 05:14:43.418 DEBUG (MainThread) [custom_components.apsystems_ecur.sensor] State class None - qty_of_inverters
2024-08-06 05:14:43.418 DEBUG (MainThread) [custom_components.apsystems_ecur.sensor] State called for qty_of_inverters
2024-08-06 05:14:43.419 DEBUG (MainThread) [custom_components.apsystems_ecur.sensor] State class None - qty_of_online_inverters
2024-08-06 05:14:43.419 DEBUG (MainThread) [custom_components.apsystems_ecur.sensor] State called for qty_of_online_inverters
2024-08-06 05:14:43.419 DEBUG (MainThread) [custom_components.apsystems_ecur.sensor] State class measurement - temperature
2024-08-06 05:14:43.419 DEBUG (MainThread) [custom_components.apsystems_ecur.sensor] State called for temperature
2024-08-06 05:14:43.420 DEBUG (MainThread) [custom_components.apsystems_ecur.sensor] State class measurement - frequency
2024-08-06 05:14:43.420 DEBUG (MainThread) [custom_components.apsystems_ecur.sensor] State called for frequency
2024-08-06 05:14:43.420 DEBUG (MainThread) [custom_components.apsystems_ecur.sensor] State class measurement - voltage
2024-08-06 05:14:43.420 DEBUG (MainThread) [custom_components.apsystems_ecur.sensor] State called for voltage
2024-08-06 05:14:43.420 DEBUG (MainThread) [custom_components.apsystems_ecur.sensor] State class measurement - signal
2024-08-06 05:14:43.421 DEBUG (MainThread) [custom_components.apsystems_ecur.sensor] State called for signal
2024-08-06 05:14:43.421 DEBUG (MainThread) [custom_components.apsystems_ecur.sensor] State class measurement - power
2024-08-06 05:14:43.421 DEBUG (MainThread) [custom_components.apsystems_ecur.sensor] State called for power
2024-08-06 05:14:43.421 DEBUG (MainThread) [custom_components.apsystems_ecur.sensor] POWER  7030 0
2024-08-06 05:14:43.421 DEBUG (MainThread) [custom_components.apsystems_ecur.sensor] State class measurement - power
2024-08-06 05:14:43.423 DEBUG (MainThread) [custom_components.apsystems_ecur.sensor] State called for power
2024-08-06 05:14:43.423 DEBUG (MainThread) [custom_components.apsystems_ecur.sensor] POWER  70300 1
2024-08-06 05:14:43.423 DEBUG (MainThread) [custom_components.apsystems_ecur.sensor] State class measurement - temperature
2024-08-06 05:14:43.423 DEBUG (MainThread) [custom_components.apsystems_ecur.sensor] State called for temperature
2024-08-06 05:14:43.424 DEBUG (MainThread) [custom_components.apsystems_ecur.sensor] State class measurement - frequency
2024-08-06 05:14:43.424 DEBUG (MainThread) [custom_components.apsystems_ecur.sensor] State called for frequency
2024-08-06 05:14:43.424 DEBUG (MainThread) [custom_components.apsystems_ecur.sensor] State class measurement - voltage
2024-08-06 05:14:43.424 DEBUG (MainThread) [custom_components.apsystems_ecur.sensor] State called for voltage
2024-08-06 05:14:43.425 DEBUG (MainThread) [custom_components.apsystems_ecur.sensor] State class measurement - signal
2024-08-06 05:14:43.425 DEBUG (MainThread) [custom_components.apsystems_ecur.sensor] State called for signal
2024-08-06 05:14:43.425 DEBUG (MainThread) [custom_components.apsystems_ecur.sensor] State class measurement - power
2024-08-06 05:14:43.425 DEBUG (MainThread) [custom_components.apsystems_ecur.sensor] State called for power
2024-08-06 05:14:43.425 DEBUG (MainThread) [custom_components.apsystems_ecur.sensor] POWER  703000 0
2024-08-06 05:14:43.426 DEBUG (MainThread) [custom_components.apsystems_ecur.sensor] State class measurement - power
2024-08-06 05:14:43.426 DEBUG (MainThread) [custom_components.apsystems_ecur.sensor] State called for power
2024-08-06 05:14:43.426 DEBUG (MainThread) [custom_components.apsystems_ecur.sensor] POWER  70300 1
2024-08-06 05:19:43.414 DEBUG (SyncWorker_6) [custom_components.apsystems_ecur] Not querying ECU due to query=False

@Dakhaasje
Copy link
Author

2024-08-06 06:09:43.413 DEBUG (SyncWorker_31) [custom_components.apsystems_ecur] Not querying ECU due to query=False

@HAEdwin
Copy link
Collaborator

HAEdwin commented Aug 6, 2024

Don't overlook this entity switch.ecu_query_device. You should place the switch somewhere on the dashboard and link an automation to it. If query fails for a predefined number of times the switch will switch off so that an automation can react on it (optionally reboot, send a notification, ..)
So if you keep a close eye on this switch, a reboot of HA should not be needed, just turn the switch back on again using an automation.

If you encounter this often, try to reposition the ECU away from possible interference from other devices especially WiFi AP's or other Zigbee devices (you allready mentioned that in the other thread).

Let me know if this solves the issue. Mine is attached to a smart-plug and when the query switch flips (rarely the case) I'll turn the power off and on to reboot the ECU AND flip the query switch back on.

@Dakhaasje
Copy link
Author

Dakhaasje commented Aug 6, 2024

I tried that, after addon crash I hope this will work tomorrow.
Screenshot 2024-08-06 at 20-01-48 Overzicht – Home Assistant
Screenshot 2024-08-06 at 20-06-35 Overzicht – Home Assistant

@Dakhaasje
Copy link
Author

Dakhaasje commented Aug 6, 2024

If query fails for a predefined number of times the switch will switch off so that an automation can react on it (optionally reboot, send a notification, ..)

all night it fails... I added an automation at 1 hour after sun-up, to set it to ON if not already ON
To avoid errors, At sunset query off.

@Dakhaasje
Copy link
Author

Dakhaasje commented Aug 6, 2024

If you encounter this often, try to reposition the ECU away from possible interference from other devices especially WiFi AP's or other Zigbee devices (you allready mentioned that in the other thread).

The Ecu-B sits lonely on a roof beam in the shed with an unobstructed view on the panels with extended outdoor antenna.
I cannot find the short video of a Zigbee button-light test but I found this: https://www.usb.org/sites/default/files/327216.pdf , which explains the interference of USB3 with zigbee and wifi.

@HAEdwin
Copy link
Collaborator

HAEdwin commented Aug 7, 2024

How often does the integration use cached data (ECU Using Cached Data entity)? Mine looks like:
image
which is normal behaviour...

@Dakhaasje
Copy link
Author

How often does the integration use cached data

Screenshot 2024-08-08 at 20-11-50 Geschiedenis – Home Assistant
, but the turning off/on automation made it work for 2 days in a row
Screenshot 2024-08-08 at 20-07-20 Overzicht – Home Assistant

@HAEdwin
Copy link
Collaborator

HAEdwin commented Aug 12, 2024

Some have positive experiences by removing the WiFi antenna from the ECU, I positioned the antennas like so \ / (facing away from each other). There is no exact solution, you'll have to try out some to get the optimal results. If you agree I'll close this issue for it is not an integration issue.

@Dakhaasje
Copy link
Author

Dakhaasje commented Aug 12, 2024

Some have positive experiences by removing the WiFi antenna from the ECU,

I pointed one in (90 degrees to) the direction of the wifi AP, the other I put in clear view of the solar panels, using about 30cm extension cable leading outside. 78% signal should be fine. There is about 30 cm solid wood between both antennas. I could furter isolate that and focus both signals by using aluminium foil, but I do not see the need yet.
The ECU-B and their app have been working fine since last year. I only recently got HA OS instead of a core version.

I think it is just that: an integration issue... Everything works, except the integration.
I get it to start, but now it quits some during the day
Screenshot 2024-08-14 at 10-36-15 Overzicht – Home Assistant

@Dakhaasje
Copy link
Author

Dakhaasje commented Aug 12, 2024

, but the turning off/on automation made it work for 2 days in a row

I actually made the ECU query turn on well after the Enphase started giving power... Nothing beats Enphase ;-)

@HAEdwin
Copy link
Collaborator

HAEdwin commented Aug 21, 2024

You might also want to try https://github.com/HAEdwin/homeassistant-apsystems_ecu_proxy
As is often the case, a relatively small number of users will have problems with the integration, but with over 600 active installations, I think the integration is doing something right.

@Dakhaasje
Copy link
Author

I think the integration is doing something right.

I agree

@Dakhaasje
Copy link
Author

Screenshot 2024-08-21 at 12-31-53 Overzicht – Home Assistant 1 relapse, possibly moment of HA restart

@Dakhaasje
Copy link
Author

backup automation works for me

alias: Als ECU query device uitgezet, terwijl er nog zon is, zet weer aan
description: ""
trigger:

  • platform: device
    type: turned_off
    device_id: 1b1e #(query device)
    entity_id: 21cd88fd5cb2c
    domain: switch
    for:
    hours: 0
    minutes: 1
    seconds: 0
    condition:
  • condition: state
    entity_id: input_boolean.enphase_werkt #(when other system still works, this helper is ON)
    state: "on"
  • condition: sun
    before: sunset
    after: sunrise
    action:
  • action: script.ecu_query_aanzetten #(switch query back on)
    metadata: {}
    data: {}
    mode: single
    ``

@HAEdwin
Copy link
Collaborator

HAEdwin commented Aug 21, 2024

Great solution. I let mine (an older ECU-C starting with 2160...) query 24/7 and set the integration to try 5 times after that, the ECU Query Switch is switched off. So now my automation can react on that with a reboot using a smart powerplug AND I turn the ECU Query Switch back on (like you did also).

2024-08-19 13:16:57.841 WARNING (SyncWorker_55) [custom_components.apsystems_ecur] Using cached data from last successful communication from ECU. Invalid data error: [Errno 111] Connection refused
2024-08-19 13:21:57.788 WARNING (SyncWorker_33) [custom_components.apsystems_ecur] Using cached data from last successful communication from ECU. Invalid data error: [Errno 111] Connection refused
2024-08-19 13:26:57.807 WARNING (SyncWorker_43) [custom_components.apsystems_ecur] Using cached data from last successful communication from ECU. Invalid data error: [Errno 111] Connection refused
2024-08-19 13:31:57.849 WARNING (SyncWorker_30) [custom_components.apsystems_ecur] Using cached data from last successful communication from ECU. Invalid data error: [Errno 111] Connection refused
2024-08-19 13:31:57.850 WARNING (SyncWorker_30) [custom_components.apsystems_ecur] Communication with the ECU failed after 4 repeated attempts.
2024-08-19 13:31:57.850 WARNING (SyncWorker_30) [custom_components.apsystems_ecur] Try manually power cycling the ECU. Querying is stopped automatically, turn switch back on after restart of ECU.

But this is needed once a month at max, more often the ECU fails to let it being queried one time and next time all is well again.
image
This could be due to the fact that I have the proxy running simultanious, in fact there might be conflicts when the ECU also tries to upload data to EMA while at the same time the integration is querying the ECU but I never have matched the timestamps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants