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

Automation Action to Set value for Alfen Power Connector Max Current Socket 1 fails #141

Open
menloperk opened this issue Aug 20, 2024 · 9 comments

Comments

@menloperk
Copy link

menloperk commented Aug 20, 2024

This has always been working but this has not working for some time now! (since HA 2024.8 or Alfen firmware 7??).
Anyway, log file give this error:

This error originated from a custom integration.

Logger: custom_components.alfen_wallbox.alfen
Source: custom_components/alfen_wallbox/alfen.py:280
integration: Alfen Wallbox (documentation)
First occurred: 8:07:00 AM (2 occurrences)
Last logged: 7:26:57 PM

Unexpected error on UPDATE VALUE

The strange thing is that if I run the Action manually from the Automation screen, it does work!?

I am running Alfen integration 2.8.9.

Rene.

@ervee
Copy link

ervee commented Aug 21, 2024

What does your service (action) call look like?

action: alfen_wallbox.set_current_limit
data:
  entity_id: number.alfen_eve_single_pro_line_power_connector_max_current_socket_1

Like this?

I use this in my automation:

action:
  - target:
      entity_id: number.alfen_eve_single_pro_line_power_connector_max_current_socket_1
    data:
      value: "{{ states('input_number.laad_power') | int }}"
    action: number.set_value

@menloperk
Copy link
Author

menloperk commented Aug 21, 2024

';ve just used the dropdown of possible Alfen call service actions in the UI which ends up to:

action:

  • device_id: xxxxxxxxxxxxxxxxxxxxxxxxxxx
    domain: number
    entity_id: yyyyyyyyyyyyyyyyyyyyyyyyyy
    type: set_value
    value: 0
  • action: input_boolean.turn_off
    metadata: {}
    data: {}
    target:
    entity_id: input_boolean.alfen

In fact this has always worked.

@ervee
Copy link

ervee commented Aug 21, 2024

I can't replicate that. In HA 2024.8 a lot changed in service calls: https://www.home-assistant.io/blog/2024/08/07/release-20248/#goodbye-service-calls-hello-actions-
Does it work when you use one of my proposed methods in #141 (comment) ?

@menloperk menloperk changed the title Automation that call service to Set value for Alfen Power Connector Max Current Socket 1 fail Automation Action to Set value for Alfen Power Connector Max Current Socket 1 fails Aug 21, 2024
@menloperk
Copy link
Author

I was indeed wrong in my title to say 'call service' as it is indeed a device action. This evening it worked fine so I need to dig a little further into why and when I see the error described above ('Unexpected error on UPDATE VALUE'). I will close this one for now.

@menloperk
Copy link
Author

Reopening as happened again this morning when the Max Current should have been set to 16A... Same error:

This error originated from a custom integration.

Logger: custom_components.alfen_wallbox.alfen
Source: custom_components/alfen_wallbox/alfen.py:280
integration: Alfen Wallbox (documentation)
First occurred: August 20, 2024 at 8:07:00 AM (3 occurrences)
Last logged: 7:58:33 AM

Unexpected error on UPDATE VALUE

Then I also see this error but not sure if it could be related:

Logger: homeassistant.components.sensor
Source: helpers/entity_platform.py:1031
integration: Sensor (documentation, issues)
First occurred: August 19, 2024 at 8:44:55 PM (287 occurrences)
Last logged: 8:15:32 AM

Updating alfen_wallbox sensor took longer than the scheduled update interval 0:00:05

@menloperk menloperk reopened this Aug 22, 2024
@menloperk
Copy link
Author

I tried to set the value manually now with the slider and it works although it also gives a POST Timeout (see log below)?!
Looking in the raw log file lines for today... apparently the Automation Action gave the 'Unexpected error on UPDATE VALUE'

2024-08-22 07:58:33.036 ERROR (MainThread) [custom_components.alfen_wallbox.alfen] Unexpected error on UPDATE VALUE
2024-08-22 07:58:42.867 WARNING (MainThread) [homeassistant.components.sensor] Updating alfen_wallbox sensor took longer than the scheduled update interval 0:00:05
2024-08-22 09:12:39.055 WARNING (MainThread) [homeassistant.components.sensor] Updating alfen_wallbox sensor took longer than the scheduled update interval 0:00:05
2024-08-22 09:12:58.036 WARNING (MainThread) [custom_components.alfen_wallbox.alfen] Timeout on POST
2024-08-22 09:13:04.060 WARNING (MainThread) [homeassistant.components.sensor] Updating alfen_wallbox sensor took longer than the scheduled update interval 0:00:05

It looks like some actions take longer than 'scheduled update interval 0:00:05?!
Where can we set this to a higher value to see if it helps?

@menloperk
Copy link
Author

What happened to this integration that was working just fine for a long time. Updates are not working properly again...
image

@leeyuentuen
Copy link
Owner

i'll later investigate it

@wimvermoens
Copy link

wimvermoens commented Oct 3, 2024

Is there an update about this issue? I am having the same after updating to the latest version.
Update: when I rollback to 2.7.29, everything works fine.

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

4 participants