davidjbradshaw / homebridge-aeg-wellbeing

Homebridge plugin for AEG Wellbeing Air Purifiers
Apache License 2.0
8 stars 1 forks source link

Characteristic Warnings #2

Closed Dann1bo1 closed 1 year ago

Dann1bo1 commented 1 year ago

Describe The Bug: Continuation of bug/status report: https://github.com/baboons/homebridge-electrolux-wellbeing/issues/20 Version 1.1.1 has been running fine so far, thank you. Haven't been logged off yet, but not too much time since install has elapsed. Still getting the usual characteristics warnings. I don't know whether this is due to the AX5 only having the PM and light sensors, whereas the AX9 does have TVOC, temperature, humidity sensors in addition to the previously mentioned sensors.

Expected behavior: Perhaps there's a way to chose in the plugin settings which sensors to display in HK. Or ideally have the plugin automatically choose the correct sensors. Just an idea. I have no clue, whether this can be achieved at all.

Logs:

[17/02/2023, 23:50:17] [homebridge-aeg-wellbeing] This plugin generated a warning from the characteristic 'Current Temperature': characteristic value expected valid finite number and received "undefined" (undefined). See https://homebridge.io/w/JtMGR for more info.
[17/02/2023, 23:50:17] [homebridge-aeg-wellbeing] This plugin generated a warning from the characteristic 'Current Relative Humidity': characteristic value expected valid finite number and received "undefined" (undefined). See https://homebridge.io/w/JtMGR for more info.
[17/02/2023, 23:50:17] [homebridge-aeg-wellbeing] This plugin generated a warning from the characteristic 'Carbon Dioxide Level': characteristic value expected valid finite number and received "undefined" (undefined). See https://homebridge.io/w/JtMGR for more info.
[17/02/2023, 23:50:17] [homebridge-aeg-wellbeing] This plugin generated a warning from the characteristic 'VOC Density': characteristic value expected valid finite number and received "NaN" (number). See https://homebridge.io/w/JtMGR for more info.
[17/02/2023, 23:50:17] [homebridge-aeg-wellbeing] This plugin generated a warning from the characteristic 'Filter Life Level': characteristic value expected valid finite number and received "undefined" (undefined). See https://homebridge.io/w/JtMGR for more info.
[17/02/2023, 23:50:17] [homebridge-aeg-wellbeing] This plugin generated a warning from the characteristic 'Swing Mode': characteristic value expected valid finite number and received "undefined" (undefined). See https://homebridge.io/w/JtMGR for more info.

Environment:

davidjbradshaw commented 1 year ago

Actual looking a bit more maybe it does have enough data when it creates it in HK. In theory I just need to see what fields are in the first response from the server and hopefully that has the data in it we need to decide what sensors to create.

Just looked at the AX-5 and it costs only 10 quid less than what I paid in the January sales for the AX-9. Bit out of my budget to go buy one, so if I see a way to fix this I'll need some help testing it.

davidjbradshaw commented 1 year ago

@Dann1bo1 I've just published v1.1.2-beta. It adds some extra logging when it starts up to print out all the data that comes back from the API. I would be greatful if you could post what you get back below. I've also tidied up the code a fair bit, so it would be good if you could test it a bit to see if I broke anything.

davidjbradshaw commented 1 year ago

This is what I see with the AX9.

[18/02/2023, 20:40:29] [homebridge-aeg-wellbeing] Fetched appliances:  [
  {
    applianceName: 'AEG AX9',
    created: '2023-01-31T16:10:35.420187Z',
    id: 1324775,
    modelName: 'PUREA9',
    timeZoneStandardName: 'Europe/London',
    pncId: '950011389103004025087076',
    domainId: 824217
  }
]
[18/02/2023, 20:40:29] [homebridge-aeg-wellbeing] Fetched data:  [
  {
    pncId: '950011389103004025087076',
    name: 'AEG AX9',
    modelName: 'PUREA9',
    firmwareVersion: '2.20',
    workMode: 'Auto',
    filterRFID: '1DB7027E580000',
    filterLife: 96,
    fanSpeed: 2,
    UILight: true,
    safetyLock: false,
    ionizer: true,
    sleep: undefined,
    scheduler: undefined,
    filterType: 96,
    version: 174,
    pm1: 0,
    pm25: 0,
    pm10: 0,
    tvoc: 46,
    co2: 688,
    temp: 23,
    humidity: 50,
    envLightLevel: undefined,
    rssi: -58
  }
]
Dann1bo1 commented 1 year ago

I'll just dump the whole debug log in here, maybe that can steer you in the right direction. And don't waste money on an AX5, just to test the plugin :)

Logs Debug:

[18/02/2023, 21:45:52] [homebridge-aeg-wellbeing] Fetched appliances:  [
  {
    applianceName: 'Luftreiniger ',
    created: '2022-01-19T15:43:04.5791514Z',
    id: 1047332,
    modelName: 'WELLA5',
    timeZoneStandardName: 'Europe/Berlin',
    pncId: '950011561110006975087076',
    domainId: 654220
  }
]
[18/02/2023, 21:45:52] [homebridge-aeg-wellbeing] Fetched data:  [
  {
    pncId: '950011561110006975087076',
    name: 'Luftreiniger ',
    modelName: 'WELLA5',
    firmwareVersion: '1.29.0',
    workMode: 'PowerOff',
    filterRFID: undefined,
    filterLife: undefined,
    fanSpeed: 0,
    UILight: true,
    safetyLock: false,
    ionizer: undefined,
    sleep: undefined,
    scheduler: undefined,
    filterType: undefined,
    version: 10833,
    pm1: 0,
    pm25: 0,
    pm10: 0,
    tvoc: undefined,
    co2: undefined,
    temp: undefined,
    humidity: undefined,
    envLightLevel: undefined,
    rssi: undefined
  }
davidjbradshaw commented 1 year ago

Thank you, that is really useful. You have a lot more undefined things than me.

If the AX5 had been cheap, I'd consider one in another room. It seems paying £290 for the AX9 was a crazy good deal last month, it's now £590.

davidjbradshaw commented 1 year ago

@Dann1bo1 just published another beta version that should hopefully get rid of those errors for you.

To remove all the useless sensors from HomeKit, you will need to remove your device from the HomeBridge cache. HK will then see it a few moments later as a new device in HK.

Please let me know how you get on with this version.

Dann1bo1 commented 1 year ago

@davidjbradshaw v1.1.2-beta.2 seems to have done the trick. No more redundant sensors in HK and no characteristics warnings in HB. Haven't had any login issues as well. Everything seems pretty stable at the moment. Thank you!

davidjbradshaw commented 1 year ago

Thanks for testing it. I've just released v1.1.2 which now also displays the correct AEG model names in the Home App. However, you will need to remove it from the HomeBridge Cache again to see this change.

It was all pretty simple to fix, just added a bunch of if() statements to check if the return data had defined values for the different features.