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

CO2 sensor, values not going to HMCharacteristicTypeCarbonDioxideLevel #249

Open
JustKarma123 opened this issue Jun 14, 2022 · 2 comments
Open

Comments

@JustKarma123
Copy link

JustKarma123 commented Jun 14, 2022

Really love the eDomoticz plugin for Homebridge it's amazing thank you for all the hard work.

I have been using this for a while and got a issue with how Carbon Dioxide levels are presented from Domoticz to Homebridge.

I am using MCO Home MH9 Carbon Dioxide sensors and in Domoticz this is correctly logged as Carbon Dioxide with values from 0-5000ppm and with an air quality value of 0-5 (0=not used, 1=excellent, 2=good, 3=fair, 4=inferior and 5=poor). In Domoticz the device is TYPE "Air quality" and SUBTYPE is "Voltcraft CO-20". This SUBTYPE is Carbon Dioxide with values 0-5000ppm.

When the MCO Home MH9 Carbon Dioxide sensor is exposed to Homebridge via eDomoticz the device is correctly recognised as type "Air Quality Sensor" and "Air Quality" (HMCharacteristicValueAirQuality) values 0-5 are correct. However the Co2 values in ppm (0-5000) are seem to be going to "Air Particulate Density" (HMCharacteristicTypeAirParticulateDensity).

This is the in correct HMCharacteristicType. Carbon Dioxide, Co2 PPM, values should be going to HMCharacteristicTypeCarbonDioxideLevel. Is there anyway this can be updated? If you need any further information please let me know.

https://developer.apple.com/documentation/homekit/hmcharacteristictypecarbondioxidelevel

@JustKarma123 JustKarma123 changed the title Air Quality Sensor: CO2 sensor, values not going to HMCharacteristicTypeCarbonDioxideLevel Jun 14, 2022
@PatchworkBoy
Copy link
Owner

No mention of support for HMCharacteristicTypeCarbonDioxideLevel as an optional characteristic in https://github.com/homebridge/HAP-NodeJS/blob/master/src/lib/definitions/ServiceDefinitions.ts for AirQuality service (see https://github.com/homebridge/HAP-NodeJS/blob/0655c18fc3ccc0637166ccfd915bf7aef0d2b14f/src/lib/definitions/ServiceDefinitions.ts#L143)

Nothing I can do til HAP-NodeJS / Homebridge includes it in it's service definitions.

@PatchworkBoy
Copy link
Owner

Would need rewriting to support the CarbonDioxide Sensor service type instead of AirQuality service type as that's the only service type allowed to have Characteristic.CarbonDioxideLevel... https://github.com/homebridge/HAP-NodeJS/blob/0655c18fc3ccc0637166ccfd915bf7aef0d2b14f/src/lib/definitions/ServiceDefinitions.ts#L401

Doesn't look like Homebridge has a spec that would match an AirQuality device with Co2 level, which makes implementation tricky.

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

No branches or pull requests

2 participants