kizniche / Mycodo

An environmental monitoring and regulation system
http://kylegabriel.com/projects/
GNU General Public License v3.0
2.99k stars 500 forks source link

Activating AnyLeaf PH sensor fails. #1335

Open ghunti opened 1 year ago

ghunti commented 1 year ago

Describe the problem/bug

Activating AnyLeaf PH sensor fails.

Versions:

Reproducibility

  1. Go to: Setup -> Input
  2. Add the "AnyLeaf: AnyLeaf pH: Ion concentration (anyleaf) [I2C]" input
  3. Install all the dependencies
  4. Go back to: Setup -> Input
  5. Activate the AnyLeaf input

Expected behavior

The AnyLeaf sensor should be active and provide measures. Although the AnyLeaf input displays as "active" on the interface, the logs show an error, which I think is preventing the AnyLeaf sensor from functioning properly and displaying any measures.

Screenshots

The error log: Selection_002

The AnyLeaf input configuration: Selection_001

Additional context

To see if the sensor is working, I've run the anyleaf-python examples, and everything seems to be working: Selection_003

Thank you :-)

kizniche commented 1 year ago

Are you setting the correct bus and address? You don't provide a copy of the I2C device tree to determine if you are.

kizniche commented 1 year ago

What is the output from sudo i2c-detect -y 1 ?

ghunti commented 1 year ago

Thanks for replying @kizniche

Are you setting the correct bus and address? You don't provide a copy of the I2C device tree to determine if you are.

To be honest, I'm a noob in this, don't know if I'm setting the correct bus, although address, I think I am. Is there somewhere I can read more about this?

What is the output from sudo i2cdetect -y 1 ?

image

kizniche commented 1 year ago

Looking closer at the trace back in your screenshot, it looks like the issue is with the ads1115 library, or rather, the call of a function of that library. It's been a while since the anyleaf library version has been updated, so this had likely been fixed. I'll check their library changelog.

kizniche commented 1 year ago

Looks like the library is still at 0.1.9 https://pypi.org/project/anyleaf/

kizniche commented 1 year ago

@AnyLeaf can you look into whether this is an issue with the ads1115 library specified to be installed when the anyleaf library is installed?

kizniche commented 11 months ago

@David-OConnor do you know if this is a known issue?