homebridge-blueair icon indicating copy to clipboard operation
homebridge-blueair copied to clipboard

Option to remove the CO2 sensor

Open w194 opened this issue 3 years ago • 8 comments

Hello there, could you please add an option to disable the CO2 sensor? It seems to be pretty unreliable because the CO2 is only calculated (not measured) and seems to rely on the VOC for calculating the CO2. I find the red warnings in Home App and notifications not very useful. Too many false alarms because it's not a real CO2 sensor, at least in the 680i.

w194 avatar Jul 22 '22 18:07 w194

I'll have to look into that as it will require a new approach. May take some time.

fjs21 avatar Aug 02 '22 18:08 fjs21

@fjs21 Similar to my other comment, I think I've got this all wrapped up. Can you review, version the code, and release when you have a chance?

jonato1 avatar Feb 24 '23 05:02 jonato1

@fjs21 Also, if it's easier for future releases, feel free to add me as a collaborator to npmjs- Happy to discuss and align on how you version the code and deploy. Hope you're doing well and had a good weekend!

jonato1 avatar Feb 27 '23 04:02 jonato1

@fjs21 Just a heads up - I drafted a new release and made it v1.2.0 given the new features. Let me know if you have any thoughts.

jonato1 avatar Mar 01 '23 03:03 jonato1

@w194 V1.2.0 is officially out! Feel free to check it out and let me know if the feature toggles work to your satisfaction.

jonato1 avatar Apr 13 '23 02:04 jonato1

@w194 Just a heads up - there were some stability issues with v1.2.0, so v1.2.1 is officially released. Please let me know if the CO2 feature toggle is working properly from your perspective. I don't have a device with a CO2 sensor, so I unfortunately cannot test.

P.S. @fjs21 If you happen to have a device with a CO2 sensor and can test, let me know what it looks like on your end.

jonato1 avatar Apr 16 '23 02:04 jonato1

Thank for the update, no it doesn't work any more when I set the option to disable CO2 in Homebridge

Here are the logged errors

[19/04/2023, 20:54:24] TypeError: Cannot read properties of undefined (reading 'updateCharacteristic')
    at BlueAirPlatformAccessory.updateCarbonDioxideSensor (/usr/local/lib/node_modules/@fjs21/homebridge-blueair/src/platformAccessory.ts:589:32)
    at BlueAirPlatformAccessory.updateAccessoryCharacteristics (/usr/local/lib/node_modules/@fjs21/homebridge-blueair/src/platformAccessory.ts:363:10)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
[19/04/2023, 20:54:24] Got SIGTERM, shutting down Homebridge...
[19/04/2023, 20:54:24] TypeError: Cannot read properties of undefined (reading 'updateCharacteristic')
    at BlueAirPlatformAccessory.updateCarbonDioxideSensor (/usr/local/lib/node_modules/@fjs21/homebridge-blueair/src/platformAccessory.ts:589:32)
    at BlueAirPlatformAccessory.updateAccessoryCharacteristics (/usr/local/lib/node_modules/@fjs21/homebridge-blueair/src/platformAccessory.ts:363:10)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
[19/04/2023, 20:54:24] TypeError: Cannot read properties of undefined (reading 'updateCharacteristic')
    at BlueAirPlatformAccessory.updateCarbonDioxideSensor (/usr/local/lib/node_modules/@fjs21/homebridge-blueair/src/platformAccessory.ts:589:32)
    at BlueAirPlatformAccessory.updateAccessoryCharacteristics (/usr/local/lib/node_modules/@fjs21/homebridge-blueair/src/platformAccessory.ts:363:10)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
[19/04/2023, 20:54:29] TypeError: Cannot read properties of undefined (reading 'updateCharacteristic')
    at BlueAirPlatformAccessory.updateCarbonDioxideSensor (/usr/local/lib/node_modules/@fjs21/homebridge-blueair/src/platformAccessory.ts:589:32)
    at BlueAirPlatformAccessory.updateAccessoryCharacteristics (/usr/local/lib/node_modules/@fjs21/homebridge-blueair/src/platformAccessory.ts:363:10)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)

w194 avatar Apr 19 '23 18:04 w194

This was driving me crazy. I figured out how to hardcode the alerts away, while still leaving the CO2 sensor (of dubious value) alive. Go to File is /usr/local/lib/node_modules/@fjs21/ . . . /dist/platformAccessory.js Search for CO2 flag above 2000 Then in the lines below, find the two places that read "....CarbonDioxideDetected, 1); and change the "1" to "0" and save it. Restart the plug-in / bridge. @w194

jonathanerosen avatar Mar 04 '24 20:03 jonathanerosen