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

Hide CO2 Sensor Crashes on 680i #393

Open jonathanerosen opened 4 months ago

jonathanerosen commented 4 months ago

My 680i appears to throw a lot of CO2 sensor alarms, and I hoped to disable. I tried using both the Homebridge UX, as well as setting the property manually in the config.json. However, in both cases, it crashes. Log capture: [2/12/2024, 12:33:31 PM] [@fjs21/homebridge-blueair] Living Room of type "classic_680i" initialized. [2/12/2024, 12:33:31 PM] [@fjs21/homebridge-blueair] Removing stale Service: uuid:[00000097-0000-1000-8000-0026BB765291] 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) at BlueAirPlatformAccessory.handleAirPurifierActiveGet (/usr/local/lib/node_modules/@fjs21/homebridge-blueair/src/platformAccessory.ts:252:5) [2/12/2024, 12:33:31 PM] [@fjs21/homebridge-blueair] Child bridge process ended [2/12/2024, 12:33:31 PM] [@fjs21/homebridge-blueair] Process Ended. Code: 1, Signal: null

jonathanerosen commented 4 months ago

@fjs21 I could not find anyway to use the UI checkbox or to enter a feature to disable like CarbonDioxide.Sensor.[my device uuid]. So, the best solution I could come up with: To hardcode the alerts away, while still leaving the CO2 sensor (of dubious value) alive. At /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. Not ideal, but posting here so others can use solution, and for your visibility that the Disable feature is not working as expected for CO2.