dhayab / homebridge-withings-air-quality

Homebridge plugin that exposes air quality data from the Withings WS-50 Smart Body Analyzer
MIT License
16 stars 6 forks source link

HAP Warning: Characteristic 00000093-0000-1000-8000-0026BB765291 not in required or optional ... #8

Open sandeen opened 4 years ago

sandeen commented 4 years ago

I get this warning when starting up:

HAP Warning: Characteristic 00000093-0000-1000-8000-0026BB765291 not in required or optional characteristics for service 0000008D-0000-1000-8000-0026BB765291. Adding anyway.

which I think is essentially saying the CO2 level isn't set up as a characteristic of the Air Quality service.

I'm new at this, and not sure how to test this w/ your index.ts, but I think adding CarbonDioxideLevel to airQualityService.setCharacteristic might fix it, based on another plugin I was playing with?

        this.airQualityService.setCharacteristic(Characteristic.Name, 'Air Quality');
        this.initServiceEvents(
            'carbondioxide',
            this.airQualityService.getCharacteristic(Characteristic.AirQuality),
            this.airQualityService.getCharacteristic(Characteristic.CarbonDioxideLevel),
            () => this.updateAirQuality(),
        );

And perhaps the same for StatusLowBattery?

dhayab commented 3 years ago

Hi, it appears the CarbonDioxideLevel characteristic is indeed not set to be used with an AirQuality service (https://developers.homebridge.io/#/service/AirQualitySensor), thus displaying this warning, but it should not prevent the plugin from working anyway. I'll silence the warning in a future version.