This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
AHT20 sensor [solved]
#1
Hi
Just wondering how to add the dirver to be seen byt openplotter 3.x
According to https://docs.circuitpython.org/projects/...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
Reply
#2
Hi, How did you do this? adding other I2C sensors?
Reply
#3
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...atch-AHTX0
Reply
#4
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.
Reply
#5
Photo 
(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=...ct_details) with BMP280 and AHT20 and now it's working in Openplotter 3. Tested on my RPI4 (see screenshots below).

   
   
   
Reply
#6
Merged. Could you test again everything works after updating please?
Reply
#7
(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
Reply
#8
(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.
Reply
#9
I remember a change in SK server regarding humidity. All humidity sensors should be edited then. I will take a look ASAP
Reply
#10
(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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)