Giter Site home page Giter Site logo

example for PM10 / PM2.5 device about esphap HOT 4 OPEN

yurik72 avatar yurik72 commented on August 23, 2024
example for PM10 / PM2.5 device

from esphap.

Comments (4)

Yurik72 avatar Yurik72 commented on August 23, 2024

Hi , you are right, i have implemented in example only this characteristic "Carbon Dioxide Level" which is measured by ppm
You mentioned about VOC (ug/mm3). I will think how to combine. Or you can do by yourself by adding those characteristic in
homeintegration.c
I will apprecciate a pull request

from esphap.

bfaliszek avatar bfaliszek commented on August 23, 2024

I wonder how to best solve it, because in the case of air pollution measurements, we measure various parameters (CO2, PM2.5, PM10, VOC etc.). Each of them has its own standards of acceptable values(not to mention the fact that are different acceptable values provided by WHO, US, EU and China).
Additionally, not every device performs all of these measurements. For example, I have two of my projects, one measures all of the 4 parameters mentioned above, and the other measures only PM2.5 and PM10.

from esphap.

Yurik72 avatar Yurik72 commented on August 23, 2024

In my understanding,
You should get EspHap_AirQuality_MQ135 as example and depending on capabilities you should add additional Characheristic (or replace Carbon Dioxide Level) , which are supported by Apple
For instance
CHARACTERISTIC_PM25_DENSITY
CHARACTERISTIC_PM10_DENSITY
CHARACTERISTIC_VOC_DENSITY

From library points of view it's very easy, see impementation of
hap_new_air_quality_service ( homeintegration.c )
You can add or replace additional characheristic.
Then behaviour in the code the same as in the given example EspHap_AirQuality_MQ135

from esphap.

Yurik72 avatar Yurik72 commented on August 23, 2024

Shure we can add additional function to homeintegration.c with parameters, which characheristic will be supported
On the main sketch behaviour very simple,
For instance following can be used
homekit_service_characteristic_by_type(airqualitylevelservice, HOMEKIT_CHARACTERISTIC_CARBON_DIOXIDE_LEVEL);

If it returns NULL, characheristic is not supported

from esphap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.