OpenMarine
AHT20 sensor [solved] - Printable Version

+- OpenMarine (https://forum.openmarine.net)
+-- Forum: OpenPlotter (https://forum.openmarine.net/forumdisplay.php?fid=1)
+--- Forum: Feature Requests (https://forum.openmarine.net/forumdisplay.php?fid=5)
+--- Thread: AHT20 sensor [solved] (/showthread.php?tid=4390)

Pages: 1 2


AHT20 sensor [solved] - DroZDi - 2022-12-28

Hi
Just wondering how to add the dirver to be seen byt openplotter 3.x
According to https://docs.circuitpython.org/projects/ahtx0/en/latest/ I have added to library under

root@openplotter:/usr/local/lib/python3.9/dist-packages# ls -ltr *aht*||*AHT*
-rw-r--r-- 1 root root 5043 Dec 28 16:09 adafruit_ahtx0.py

adafruit_circuitpython_ahtx0-1.0.17.dist-info:
total 24
-rw-r--r-- 1 root root   92 Dec 28 16:09 WHEEL
-rw-r--r-- 1 root root   15 Dec 28 16:09 top_level.txt
-rw-r--r-- 1 root root 3859 Dec 28 16:09 METADATA
-rw-r--r-- 1 root root 1104 Dec 28 16:09 LICENSE
-rw-r--r-- 1 root root    4 Dec 28 16:09 INSTALLER
-rw-r--r-- 1 root root    0 Dec 28 16:09 REQUESTED
-rw-r--r-- 1 root root  841 Dec 28 16:09 RECORD

with sudo pip3 install adafruit-circuitpython-ahtx0

But it seems openplotter doesnt recognize it? Is it any way to rebuild the dirvers index to be used in such a way?

Update:
I fixed it and added the sensor to openplotter I2C Smile


RE: AHT20 sensor [solved] - Robbie98 - 2023-04-14

Hi, How did you do this? adding other I2C sensors?


RE: AHT20 sensor [solved] - aniaclug - 2024-05-01

I've added support for AHTx0 Sensors (AHT10 and AHT20). Changes can be seen in my github. I've also proposed a patch on openplotter-i2c. Feel free to test it here: https://github.com/gluca/openplotter-i2c/tree/gluca-patch-AHTX0


RE: AHT20 sensor [solved] - Sailoog - 2024-05-01

thanks!

I have not any AHTx0 so I will approve the patch without testing, can you confirm it is working for you?

You added the patch to openplotter 3 but do not worry I will port it to openplotter 4 once approved.


RE: AHT20 sensor [solved] - aniaclug - 2024-05-01

(2024-05-01, 09:09 AM)Sailoog Wrote: thanks!

I have not any AHTx0 so I will approve the patch without testing, can you confirm it is working for you?

You added the patch to openplotter 3 but do not worry I will  port it to openplotter 4 once approved.

Yes I have a sensor bought on Amazon (https://www.amazon.it/dp/B0B76Y29T7?psc=1&ref=ppx_yo2ov_dt_b_product_details) with BMP280 and AHT20 and now it's working in Openplotter 3. Tested on my RPI4 (see screenshots below).

   
   
   


RE: AHT20 sensor [solved] - Sailoog - 2024-05-01

Merged. Could you test again everything works after updating please?


RE: AHT20 sensor [solved] - aniaclug - 2024-05-01

(2024-05-01, 12:21 PM)Sailoog Wrote: Merged. Could you test again everything works after updating please?

It works but i found a bug (my fault). Humidity has to be divided by 100, to have ratio and % is formatted correctly. Now fixed.. see pull request


RE: AHT20 sensor [solved] - TVR - 2024-05-01

(2024-05-01, 03:01 PM)aniaclug Wrote:
(2024-05-01, 12:21 PM)Sailoog Wrote: Merged. Could you test again everything works after updating please?

It works but i found a bug (my fault). Humidity has to be divided by 100, to have ratio and % is formatted correctly. Now fixed.. see pull request

BME6xx has the same issue, relativeHumidity needs to be divided by 100 to turn it into a ratio.


RE: AHT20 sensor [solved] - Sailoog - 2024-05-02

I remember a change in SK server regarding humidity. All humidity sensors should be edited then. I will take a look ASAP


RE: AHT20 sensor [solved] - aniaclug - 2024-05-02

(2024-05-02, 12:22 PM)Sailoog Wrote: I remember a change in SK server regarding humidity. All humidity sensors should be edited then. I will take a look ASAP

You can use my proposed patch for ahtx0 as sample. It solves the issue (i divided by 100 property returned by object). Anyway, using a scale factor of 0.01 in settings (i2c) can be used as workaround for other sensors