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

Out of range values from some pumps #116

Open
elupus opened this issue Oct 6, 2023 · 3 comments
Open

Out of range values from some pumps #116

elupus opened this issue Oct 6, 2023 · 3 comments

Comments

@elupus
Copy link
Collaborator

elupus commented Oct 6, 2023

Seems some pumps have really weird out of range values. See home-assistant/core#100852 (comment) these cause reading to throw exceptions.

I'm pondering if we should demote range checks for decode to only log warnings, or even just log debug messages. We can still validate on write.

@yozik04
Copy link
Owner

yozik04 commented Oct 7, 2023

If you read a single coil then ReadException is what you expect on failure. When a full table is read then, I think, it just logs a warning.

@elupus
Copy link
Collaborator Author

elupus commented Oct 7, 2023

Well, its not like the max/min have a real affect on things. We can still represent the value. So getting the out of range value (on read) might be more useful, given the rather poor quality of the databases of parameters.

Raising on write does make sense, to not confuse the pump.

@yozik04
Copy link
Owner

yozik04 commented Oct 7, 2023

I've seen invalid temperature readings previously. My MAX485 module is not that good because I see some mess on the line. After adding pull up registers oscilloscope started to display a better picture but far from perfect.. I do get read errors quite frequently. I was thinking that in the read response packet checksum somehow managed to be correct but readings were off (1000 degrees or above).

Also during a reboot you can get out of range values quite easily. Maybe we fixed it with
def _is_hitting_integer_limit(self, coil: Coil, int_value: int):

I'd better keep range checks to keep these two issues away.

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