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

INA219 0x42: Couldn't read values: Error: CNVR is not set, not ready #388

Open
jobe451 opened this issue Jan 11, 2022 · 1 comment
Open

Comments

@jobe451
Copy link

jobe451 commented Jan 11, 2022

I run ioBroker on Rapi 4 with a Waveshare USP HAT.
When I try to fetch the power readings with ioBroker.i2c, I get this error:
"INA219 0x42: Couldn't read values: Error: CNVR is not set, not ready"

Things that work:

  • I can properly read the power consumption / battery level with the waveshare python script from https://www.waveshare.com/wiki/UPS_HAT via console.
  • ioBroker.i2c properly finds the device when searching on i2c address 0x42

These are the settings I use:
image

@jobe451
Copy link
Author

jobe451 commented Jan 11, 2022

I compared a bit the python code against with the code here and got it working. The trick is to disable the "Einzelmessung"/"singleShot" tick.

I don't understand the difference between the two modes. I guess if somebody would need "singleShot" that there would need to be some wait time be added between writing the configuration and reading the values. This I assume because of the CNVR description at page 23 of https://www.ti.com/lit/ds/symlink/ina219.pdf.

Now I get similar values in ioBroker compared to the manufacturers python script:
image

The battery percentage that are seen in the output from the shell-script are calculated based on the voltage:
(bus_voltage - 6)/2.4*100 (this might be not universal)

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

1 participant