EDL21 - increase the scan_interval?

Hi!
I was using a Powerfox Poweropti to read the data from my digital power meter. Since Powerfox is having frequent server issues though I switched over to a Hichi USB dongle and connected that to my RPi4 running HASSOS.

I added the EDL21 integration and everything works. The issue though…the readings only Update about every 60-90 Seconds. I tried adding scan_interval or update_interval to the config, but they don’t seem to be doing anything.

Is there any way I can get the sensor.sum_active_instantaneous_power to Update at something like 5 Seconds (like with the Poweropti)?

Thanks!

3 Likes

Would be great to have more scans.

2 Likes

I would also be interested in more frequent updates, or even better: The option to set how often an update should take place. I had a look in the source code here: core/sensor.py at dev · home-assistant/core (github.com)

It seems to be hardcoded to 60seconds: “MIN_TIME_BETWEEN_UPDATES = timedelta(seconds=60)”

1 Like

PR open for this: edl21: make scan interval configurable by jwefers · Pull Request #82332 · home-assistant/core · GitHub

2 Likes

Thanx @jwefers for trying to make the Update Interval configurable! Ate you going to update the integration as described on GitHub? Would love to check it out!

So your pull request was rejected, right? Did you get it running with a more frequent scan interval?
For me, just adding scan_interval parameter does not work.
I tried it the following way:
sensor:

  - platform: edl21
    serial_port: /dev/ttyUSB0
    name: stromzaehler_haus
    scan_interval: 5

However, it does not matter what I type for the scan_interval. It does not change the behavior.

1 Like

I had the same result. Adding scan interval changes nothing since the interval appears to be hardcoded?

Here you can download documentation and the custom component of edl21 integration that allows configuration of scan interval. Just copy some files in the custom component folder inside of your homeassistant config and restart - that’s it and you will get updates every 10 seconds. Then you can add a scan_interval_seconds option to set the scan interval to whatever you like. Thanx a lot @jwefers for your great work! Have fun.

1 Like

You may be able to use the update_entity service call, to create your own automation to poll the entities.

Hello everyone!
I am an absolute beginner.
Could one of you explain to me step by step where I can extract what from the files at Release configurable interval · fuslwusl/homeassistant-edl21-custom-interval · GitHub
files?
Thanks for your help!