Closed IngmarVerheij closed 1 year ago
I'm aware of this issue, @freijn has also reported this to me and together with him we have tried a few things without success. So, sadly, I've no idea why it is going wrong at the moment. What doesn't help is that I don't have this issue. For me, everything has been running fine for over 24h
@freijn what's your setup? I'm running this on a Multical 603.
@golles Is there a way to force an initialization of the head on a read?
I'm getting the impression the IR transmitted keeps emitting a signal, which explains why moving the head away/re-initialising temporarily interrupts the signal.
Hi @IngmarVerheij
Would you be able to check out the add_diagnostics
branch or add a custom_components/kamstrup_403/diagnostics.py
manually with the following content: https://github.com/golles/ha-kamstrup_403/pull/36/files#diff-56cc7535ea9be5ea2af564f56fe2bb35e1f0a8e79744ada2f4c256370bfe48ce
After a restart, you should be able to get a diagnostic file from the integration, please sent that file, more info
@golles Yup! See attached two logfiles (success and fail)
config_entry-kamstrup_403-66febb359ac7a27e5899da3c439ed745.json (1).txt config_entry-kamstrup_403-66febb359ac7a27e5899da3c439ed745.json.txt
Thanks, I see you're running HA in Home Assistant OS in a VM, is that correct? Maybe that is a hint to the cause...
I'm running Home Assistant Container
@Golles, I am running in a VM as well on a nuc.
@Ingmar in the previous version the change of the scan freq was also a way I could get it to run again. a reload makes it stopped ( after a yaml change you reload). A disable and enable makes it works again as well.
To me, (just a wild guess!) on the first install, some config is not read. Then after a disable/enable or time change the config is read and its working again. Once working it is stable and working till the next reload happens.
@freijn then our results differ slightly.
There's no difference between a Reload or a Disable/Enable of the integration. During the first run I can read the sensor values, all consequent runs result in "No readings from the meter. Please check the IR connection"
@IngmarVerheij Are you in for a test ?
in the custom component /kamstrup403 file __init__.py
you find :
from .const import (
DEFAULT_BAUDRATE,
DEFAULT_SCAN_INTERVAL,
DEFAULT_TIMEOUT,
DOMAIN,
NAME,
PLATFORMS,
VERSION,
)
Add this below this array
DEFAULT_TIMEOUT = 2
so you should get :
from .const import (
DEFAULT_BAUDRATE,
DEFAULT_SCAN_INTERVAL,
DEFAULT_TIMEOUT,
DOMAIN,
NAME,
PLATFORMS,
VERSION,
)
DEFAULT_TIMEOUT = 2
Restart and let us know if you see any difference ?
I did 3 restarts and all are ok :-)
I can confirm that adding the line to init.py resolves the issue. Thanks, champs!
Awesome news and many thanks @freijn for your investigation.
@IngmarVerheij could you also test with DEFAULT_TIMEOUT
values 1.0
and 0.5
?
I'm very curious what these do for you.
I've re-opened the issue as I need to implement a fix 😀. I'm considering setting a default of maybe 1.0
and then make it configurable for the user, like with the scan interval.
@golles See results below:
2.0: Success! 1.0: Success, for a while... then fails 0.5: Success, for a while 0.2 (default setting): Failed 0: Failed
Did you read the instructions?
The problem
The sensor values are read succesfull, but only once.
I have two ways to solve this 1) Reload the integration 2) Move the head away from the IR port, and then back. then the sensor values are read again, but only once
What version of this integration has the issue?
2.0.0
What version of Home Assistant Core has the issue?
2022.11.2
Home Assistant log
Additional information
This is on a Kamstrup Multical 603