yenoiwesa / homebridge-daikin-airbase

A Homebridge plugin for the Daikin Airbase WiFi module
Apache License 2.0
21 stars 4 forks source link

Airbase wifi v1.1.8 log fills with "plugin generated a warning from characteristic" #47

Closed woodgieboodgie closed 2 years ago

woodgieboodgie commented 2 years ago

This plugin generated a warning from the characteristic 'Target Heater-Cooler State': characteristic was supplied illegal value: null! Home App will reject null for Apple defined characteristics. See https://homebridge.io/w/JtMGR for more info.

every few seconds in the log. HB v1.4.1, node 16.16.0, airbase wifi firmware v1.1.8

woodgieboodgie commented 2 years ago

plugin v3.2.3

jonkoay commented 2 years ago

I have the same issue too. Would appreciate if someone can help, as I do not know how to fix this.

yenoiwesa commented 2 years ago

Hi @woodgieboodgie @jonkoay sorry I cannot reproduce this issue. Are you sure you are using a Daikin BRP15B61 controller?

I am running the latest version of the plugin (3.2.3) as well as node 16.2.2 and homebridge 1.5.0, and there are no warnings.

jonkoay commented 2 years ago

Hi @yenoiwesa, thanks for looking into this. Really appreciate it.

I am running the latest version too (3.2.3), Node 16.14.0 and homebridge 1.5.0. The adaptor model is BRP15B61.

Let me know if there are anything else I can do to help debug this issue.

yenoiwesa commented 2 years ago

What is your aircon and wall controller setup @jonkoay? As I mentioned I cannot reproduce the warning. Would also be good to paste the plugin config you are using.

jonkoay commented 2 years ago

My aircon is Daikin FDYQ50 with the wall controller BRC1E61.

Below is my homebridge config:

{
    "bridge": {
        "name": "Homebridge 350C",
        "username": "XX:XX:XX:XX:XX:XX",
        "port": XXXXX,
        "pin": "XXX-XX-XXX"
    },
    "accessories": [],
    "platforms": [
        {
            "name": "Config",
            "port": 8581,
            "platform": "config"
        },
        {
            "name": "Daikin Airbase",
            "hostname": "10.0.1.83",
            "pollingInterval": 5,
            "useIndividualZoneControls": false,
            "platform": "DaikinAirbase"
        }
    ]
}
yenoiwesa commented 2 years ago

Does the plugin actually work for you at all @jonkoay? Are the warnings the only problem you encounter?

Could you attempt a simpler config for the plugin:

{
     "name": "Daikin Airbase",
     "platform": "DaikinAirbase"
}

Apart from hostname, the other options are default values and do not need to be explicitly stated.

levinzhong commented 2 years ago

I have the same issue here. Homebridge 1.5.0. Nodejs 16.16.0 Daikin 1.1.8

jonkoay commented 2 years ago

@yenoiwesa The plugin works for me and I have been using it for months. The only issue I have is the warnings being logged in Homebridge at every polling (5 minutes).

Not sure if this information helps, I don't get this warning when I switched on Heat & Cool mode (Either Auto, Heat or Cool). I only get this warning when I switched off Heat & Cool mode and have Fan mode switched on.

[28/08/2022, 22:32:58] [homebridge-daikin-airbase] This plugin generated a warning from the characteristic 'Target Heater-Cooler State': characteristic was supplied illegal value: null! Home App will reject null for Apple defined characteristics. See https://homebridge.io/w/JtMGR for more info.

Reading the warning message, does it mean that when the Heat & Cool mode is off, the 'Target Heater-Cooler State' value is null! and that Home App rejects null value for Home accessories.

Thanks for looking into this. Really appreciate it.

TimofeyK commented 2 years ago

I only get this warning when I switched off Heat & Cool mode and have Fan mode switched on.

I think this is it - I just found that I have multiple of these warning logged on the day when I turned on Fan (first time in months)

TimofeyK commented 2 years ago

OK, this replicates for me:

  1. Turn the Aircon off
  2. Turn Fan on - warnings start showing up in the log every few second
  3. Turn off Fan (optional)
  4. Try turning on Aircon by simply tapping the tile (as opposed to selecting the mode) - aircon fails to turn on and Fan turns on
  5. Turn on Aircon by selecting a mode - this works and warning stops in the log

I remember @yenoiwesa made a design decision making the plugin stateless so not remembering last Aircon mode and defaulting to Cool if no mode is explicitly selected but this stopped working. Maybe baca use of some recent changes in Homebridge itself

yenoiwesa commented 2 years ago

Thanks all for the investigation, particularly @TimofeyK for the reproduction steps. To be honest I never look at my Homebridge logs, nor do I use fan and dry modes on my aircon lol...

So yes, the code does return null as the Target Heater Cooler State value when interrogated by HomeKit while the aircon is in Dry or Fan mode. That code is from 3 years ago and only recent versions of Homebridge log a warning about sending back null now.

I am happy to try sending cool as target value instead when the aircon is on fan or dry. I do not think it should impact anything since the default mode for the aircon as @TimofeyK mentioned is cool.

I'll make a quick patch and then we can all test the new version.

yenoiwesa commented 2 years ago

Please try the following version:

npm install -g yenoiwesa/homebridge-daikin-airbase#7c42ef82e7ad34c4a4a57bc1f8379d4e4ed3f4c6
yenoiwesa commented 2 years ago

Clicking the aircon tile to re-enable the aircon when Dry/Fan is on is indeed not working but it is not related to this warning.

Since HomeKit and the Home app are getting a big face lift with iOS 16, I will hold until the release is out to see what's worth fixing with the new Home app UI then.

jonkoay commented 2 years ago

@yenoiwesa I have installed the version, and it has fixed the warning messages issue.

This plugin has been really helpful and I use it everyday. Thank you very much for creating this and sharing it.

yenoiwesa commented 2 years ago

@jonkoay thanks a lot for testing! 🥳

I will release a new version of the plugin with that fix later today.

yenoiwesa commented 2 years ago

I just released version 3.2.4 of the plugin on npm, you can now install it :-)

Thanks all!