flyte / mqtt-io

Expose GPIO modules (Raspberry Pi, Beaglebone, PCF8754, PiFace2 etc.) and digital sensors (LM75 etc.) to an MQTT server for remote control and monitoring.
MIT License
461 stars 157 forks source link

upgrade DHT11/DHT22 backing library #297

Closed pansila closed 1 month ago

pansila commented 1 year ago

Old DHT11/DHT22 backing library Adafruit_DHT is out of maintained and reporting error on my rpi4+python311.

ImportError: cannot import name 'Raspberry_Pi_2_Driver' from 'Adafruit_DHT'

And it has CPU usage hogging problem (~25%).

Upgrade DHT11/DHT22 backing library to adafruit-circuitpython-dht

mschlenstedt commented 11 months ago

Haven't checked that already, but why did you changed mqtt_io/modules/sensor/bmp085.py for the DHT22/11?

If this is another (new) sensor you should seperate your Pull Requests.

pansila commented 11 months ago

Yes, it's a combo PR, I will make it seperated, thanks.

mschlenstedt commented 11 months ago

Thanks!

linucks commented 1 month ago

What's happend with this pull request? The current DHT22 code isn't functional and it looks like this pull request would fix that, it just needs the code for bmp085 separated out. I can submit a new pull request just for DHT22 if that would be helpful?

mschlenstedt commented 1 month ago

I would highly appreciate that!