fjs21 / homebridge-blueair

BlueAir air purifier plugin for homebridge
https://www.npmjs.com/package/@fjs21/homebridge-blueair
Apache License 2.0
50 stars 6 forks source link

Option to remove the CO2 sensor #91

Open w194 opened 1 year ago

w194 commented 1 year ago

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.

fjs21 commented 1 year ago

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

jonato1 commented 1 year ago

@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 commented 1 year ago

@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 commented 1 year ago

@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 commented 1 year ago

@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 commented 1 year ago

@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.

w194 commented 1 year ago

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)
jonathanerosen commented 4 months ago

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