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

✨ Support extra DHT sensor #8

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft

✨ Support extra DHT sensor #8

wants to merge 6 commits into from

Conversation

jerr0328
Copy link
Owner

@jerr0328 jerr0328 commented Jan 7, 2023

Support for popular DHT11/DHT22 sensor to augment the CO2 sensors, especially if the CO2 sensor doesn't have a built-in humidity sensor.

@jerr0328
Copy link
Owner Author

jerr0328 commented Jan 7, 2023

Some notes while testing this:

  • sigterm isn't actually terminating anymore, probably the homekit asyncio loop needs to be terminated as well?
  • Should probably refactor the co2 module.
  • Lots of errors when fetching temperature/humidity from the sensor. This is a known issue for DHT11/DHT22, will likely need to lower the log severity and not log a stacktrace to reduce log spam.
  • When upgrading to this version, need to remove and re-add the two homekit accessories.
  • DHT temperature (for me at least) is 2C higher than what the CO2 sensor reads.
  • Should add more optional labels for Prometheus to help organize/filter

For the overall problem with DHT sensors on a full Linux system, options are to either go with a I2C sensor or put a microcontroller in front of it. I have one ESP8266 with a DHT11/DHT22 (I can't remember exactly which) sensor pushing to prometheus push gateway, though I might change that to MQTT if I get more and unify the code (or have it run a prometheus web server and scrape it)

jerr0328 added a commit that referenced this pull request Nov 25, 2023
Splitting from #8

- Update pre-commit hooks
- Switch from setup.cfg to pyproject.toml
- Update workflow versions
- Use PyPi trusted publishing
- Remove twine
- Use setuptools-scm for versioning
- Require python 3.9 or newer
jerr0328 added a commit that referenced this pull request Nov 25, 2023
Splitting from #8

- Update pre-commit hooks
- Switch from setup.cfg to pyproject.toml
- Update workflow versions
- Use PyPi trusted publishing
- Remove twine
- Use setuptools-scm for versioning
- Require python 3.9 or newer
@jerr0328 jerr0328 marked this pull request as draft November 25, 2023 19:29
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

Successfully merging this pull request may close these issues.

None yet

1 participant