thoukydides / homebridge-homeconnect

Home Connect home appliances plugin for Homebridge
https://www.thouky.co.uk
ISC License
134 stars 14 forks source link

Apple Home App doesn't show control-elements for home-appliance #116

Closed tim-hilt closed 1 year ago

tim-hilt commented 1 year ago

Description of Issue

I can't see the control-elements for my appliance in the Apple-Home-App, even though the system startup-log shows no errors.

Plugin Version

v0.26.3

Home Connect Appliance(s)

Siemens CoffeeMaker (E-Nr: TI9558X1DE/10)

HomeKit App(s)

Apple Home

Diagnostic Checks

Log File

[18/12/2022, 21:08:27] [HB Supervisor] Restarting Homebridge...
[18/12/2022, 21:08:27] [HB Supervisor] Starting Homebridge with extra flags: -I
[18/12/2022, 21:08:27] [HB Supervisor] Started Homebridge v1.6.0 with PID: 1439
[18/12/2022, 21:08:31] Loaded config.json with 3 accessories and 2 platforms.
[18/12/2022, 21:08:32] Loaded 1 cached accessories from cachedAccessories.
[18/12/2022, 21:08:32] ---
[18/12/2022, 21:08:37] Loaded plugin: homebridge-config-ui-x@4.50.2
[18/12/2022, 21:08:37] Registering platform 'homebridge-config-ui-x.config'
[18/12/2022, 21:08:37] ---
[18/12/2022, 21:08:38] Loaded plugin: homebridge-homeconnect@0.26.3
[18/12/2022, 21:08:38] Registering platform 'homebridge-homeconnect.HomeConnect'
[18/12/2022, 21:08:38] ---
[18/12/2022, 21:08:47] Loaded plugin: homebridge-mqttthing@1.1.43
[18/12/2022, 21:08:47] Registering accessory 'homebridge-mqttthing.mqttthing'
[18/12/2022, 21:08:47] ---
[18/12/2022, 21:08:47] Loading 2 platforms...
[18/12/2022, 21:08:47] [HomeConnect] Initializing HomeConnect platform...
[18/12/2022, 21:08:47] [HomeConnect] new HomeConnectPlatform
[18/12/2022, 21:08:47] [HomeConnect] homebridge-homeconnect version 0.26.3
[18/12/2022, 21:08:47] [HomeConnect] Node.js version 18.12.1 (satisfies >=17.3.0 || ^16.14.0)
[18/12/2022, 21:08:47] [HomeConnect] Homebridge version 1.6.0 (satisfies >=1.4.0)
[18/12/2022, 21:08:47] [HomeConnect] Homebridge API version 2.7 (satisfies ^2.7)
[18/12/2022, 21:08:47] [HomeConnect] Homebridge HAP version 0.11.0 (satisfies >=0.9.0)
[18/12/2022, 21:08:47] Loading 3 accessories...
[18/12/2022, 21:08:47] [Tasmota Outlet 1] Initializing mqttthing accessory...
[18/12/2022, 21:08:47] [Tasmota Outlet 2] Initializing mqttthing accessory...
[18/12/2022, 21:08:47] [Tasmota Outlet 4] Initializing mqttthing accessory...
[18/12/2022, 21:08:47] [HomeConnect] Restored 1 cached accessories
Setup Payload:
X-HM://0024O832RBZBT
Enter this code with your HomeKit app on your iOS device to pair with Homebridge:

    ┌────────────┐     
    │ 727-14-643 │     
    └────────────┘     

[18/12/2022, 21:08:47] Homebridge v1.6.0 (HAP v0.11.0) (Homebridge E67F) is running on port 51249.
[18/12/2022, 21:08:48] [HomeConnect] [Kaffeevollautomat] Siemens CoffeeMaker (E-Nr: TI9558X1DE/10)
[18/12/2022, 21:08:49] [HomeConnect] Starting events stream for all appliances
[18/12/2022, 21:08:51] [HomeConnect] [Kaffeevollautomat] Door closed
[18/12/2022, 21:08:51] [HomeConnect] [Kaffeevollautomat] Inactive (Inactive)
[18/12/2022, 21:08:51] [HomeConnect] [Kaffeevollautomat] Remote operation enabled (remote start allowed)
[18/12/2022, 21:08:52] [HomeConnect] [Kaffeevollautomat] Off
[18/12/2022, 21:08:52] [HomeConnect] [Kaffeevollautomat] Connected
[18/12/2022, 21:08:52] [HomeConnect] [Kaffeevollautomat] Off
[18/12/2022, 21:08:52] [HomeConnect] [Kaffeevollautomat] Inactive (Inactive)
[18/12/2022, 21:08:52] [HomeConnect] [Kaffeevollautomat] Off
[18/12/2022, 21:08:52] [HomeConnect] [Kaffeevollautomat] Can be placed in standby
[18/12/2022, 21:08:52] [HomeConnect] [Kaffeevollautomat] Off
[18/12/2022, 21:08:52] [HomeConnect] [Kaffeevollautomat] Off
[18/12/2022, 21:08:52] [HomeConnect] [Kaffeevollautomat] Finished reading available program options
[18/12/2022, 21:08:52] [HomeConnect] [Kaffeevollautomat] Adding services for 29 programs
[18/12/2022, 21:08:52] [HomeConnect] [Kaffeevollautomat]     'Ristretto' (ConsumerProducts.CoffeeMaker.Program.Beverage.Ristretto)
[18/12/2022, 21:08:52] [HomeConnect] [Kaffeevollautomat]     'Espresso doppio' (ConsumerProducts.CoffeeMaker.Program.Beverage.EspressoDoppio)
[18/12/2022, 21:08:52] [HomeConnect] [Kaffeevollautomat]     'Espresso' (ConsumerProducts.CoffeeMaker.Program.Beverage.Espresso)
[18/12/2022, 21:08:52] [HomeConnect] [Kaffeevollautomat]     'Espresso Macchiato' (ConsumerProducts.CoffeeMaker.Program.Beverage.EspressoMacchiato)
[18/12/2022, 21:08:52] [HomeConnect] [Kaffeevollautomat]     'Caffè Crema' (ConsumerProducts.CoffeeMaker.Program.Beverage.Coffee)
[18/12/2022, 21:08:52] [HomeConnect] [Kaffeevollautomat]     'Cappuccino' (ConsumerProducts.CoffeeMaker.Program.Beverage.Cappuccino)
[18/12/2022, 21:08:52] [HomeConnect] [Kaffeevollautomat]     'Latte Macchiato' (ConsumerProducts.CoffeeMaker.Program.Beverage.LatteMacchiato)
[18/12/2022, 21:08:52] [HomeConnect] [Kaffeevollautomat]     'Milchkaffee' (ConsumerProducts.CoffeeMaker.Program.Beverage.CaffeLatte)
[18/12/2022, 21:08:52] [HomeConnect] [Kaffeevollautomat]     'Milchschaum' (ConsumerProducts.CoffeeMaker.Program.Beverage.MilkFroth)
[18/12/2022, 21:08:52] [HomeConnect] [Kaffeevollautomat]     'Warme Milch' (ConsumerProducts.CoffeeMaker.Program.Beverage.WarmMilk)
[18/12/2022, 21:08:52] [HomeConnect] [Kaffeevollautomat]     'Kaffee XL' (ConsumerProducts.CoffeeMaker.Program.Beverage.XLCoffee)
[18/12/2022, 21:08:52] [HomeConnect] [Kaffeevollautomat]     'Café cortado' (ConsumerProducts.CoffeeMaker.Program.CoffeeWorld.CafeCortado)
[18/12/2022, 21:08:52] [HomeConnect] [Kaffeevollautomat]     'Flat White' (ConsumerProducts.CoffeeMaker.Program.CoffeeWorld.FlatWhite)
[18/12/2022, 21:08:52] [HomeConnect] [Kaffeevollautomat]     'Americano' (ConsumerProducts.CoffeeMaker.Program.CoffeeWorld.Americano)
[18/12/2022, 21:08:52] [HomeConnect] [Kaffeevollautomat]     'Kleiner Brauner' (ConsumerProducts.CoffeeMaker.Program.CoffeeWorld.KleinerBrauner)
[18/12/2022, 21:08:52] [HomeConnect] [Kaffeevollautomat]     'Großer Brauner' (ConsumerProducts.CoffeeMaker.Program.CoffeeWorld.GrosserBrauner)
[18/12/2022, 21:08:52] [HomeConnect] [Kaffeevollautomat]     'Verlängerter' (ConsumerProducts.CoffeeMaker.Program.CoffeeWorld.Verlaengerter)
[18/12/2022, 21:08:52] [HomeConnect] [Kaffeevollautomat]     'Verlängerter braun' (ConsumerProducts.CoffeeMaker.Program.CoffeeWorld.VerlaengerterBraun)
[18/12/2022, 21:08:52] [HomeConnect] [Kaffeevollautomat]     'Wiener Melange' (ConsumerProducts.CoffeeMaker.Program.CoffeeWorld.WienerMelange)
[18/12/2022, 21:08:52] [HomeConnect] [Kaffeevollautomat]     'Cortado' (ConsumerProducts.CoffeeMaker.Program.CoffeeWorld.Cortado)
[18/12/2022, 21:08:52] [HomeConnect] [Kaffeevollautomat]     'Café con leche' (ConsumerProducts.CoffeeMaker.Program.CoffeeWorld.CafeConLeche)
[18/12/2022, 21:08:52] [HomeConnect] [Kaffeevollautomat]     'Café au lait' (ConsumerProducts.CoffeeMaker.Program.CoffeeWorld.CafeAuLait)
[18/12/2022, 21:08:52] [HomeConnect] [Kaffeevollautomat]     'Kaapi' (ConsumerProducts.CoffeeMaker.Program.CoffeeWorld.Kaapi)
[18/12/2022, 21:08:52] [HomeConnect] [Kaffeevollautomat]     'Koffie verkeerd' (ConsumerProducts.CoffeeMaker.Program.CoffeeWorld.KoffieVerkeerd)
[18/12/2022, 21:08:52] [HomeConnect] [Kaffeevollautomat]     'Galão' (ConsumerProducts.CoffeeMaker.Program.CoffeeWorld.Galao)
[18/12/2022, 21:08:52] [HomeConnect] [Kaffeevollautomat]     'Garoto' (ConsumerProducts.CoffeeMaker.Program.CoffeeWorld.Garoto)
[18/12/2022, 21:08:52] [HomeConnect] [Kaffeevollautomat]     'Red Eye' (ConsumerProducts.CoffeeMaker.Program.CoffeeWorld.RedEye)
[18/12/2022, 21:08:52] [HomeConnect] [Kaffeevollautomat]     'Black Eye' (ConsumerProducts.CoffeeMaker.Program.CoffeeWorld.BlackEye)
[18/12/2022, 21:08:52] [HomeConnect] [Kaffeevollautomat]     'Dead Eye' (ConsumerProducts.CoffeeMaker.Program.CoffeeWorld.DeadEye)
[18/12/2022, 21:08:52] [HomeConnect] [Kaffeevollautomat] Removing services for 5 programs
[18/12/2022, 21:08:55] [HomeConnect] Configuration schema file updated: /var/lib/homebridge/.homebridge-homeconnect-v1.schema.json
[18/12/2022, 21:10:52] [Homebridge UI] [homebridge-homeconnect] dynamic schema path: /var/lib/homebridge/.homebridge-homeconnect-v1.schema.json
[18/12/2022, 21:10:52] [Homebridge UI] [homebridge-homeconnect] dynamic schema loaded from: /var/lib/homebridge/.homebridge-homeconnect-v1.schema.json

config.json

{
    "platforms": [
        {
            "clientid": "1B0D6262200A488F1DF23062DDF5FEEDB376F67E2531646E5C7FEE65F4B98621",
            "simulator": false,
            "language": {
                "api": "de-DE"
            },
            "SIEMENS-TI9558X1DE-68A40E3A7381": {
                "addprograms": "auto"
            },
            "platform": "HomeConnect"
        }
    ]
}

let me know if I can provide further information or try stuff out in any way. Thank you!

tim-hilt commented 1 year ago

Note that it did work before. Unfortunately I can’t tell what happened that could have led to the plug-in stopping to work.

thoukydides commented 1 year ago

That log excerpt all looks fine. The plugin has found your coffee maker and will have added it as an Accessory with suitable Services to HomeKit.

The problem is most likely to be with the Homebridge connection to HomeKit.

tim-hilt commented 1 year ago

The bridge is in fact listed inside of the Home-App. However there are a few oddities going on:

  1. the coffee-maker is added as a door!
  2. The programs of the coffee-maker all say „Kaffeevollautomat“ instead of the actual program (power, Capuccino, Espresso…)
  3. None of the programs is showing up in the Home-App
tim-hilt commented 1 year ago

1784C234-993A-488C-949B-4F2F4DA1DA5E

thoukydides commented 1 year ago

This is a change in behaviour that Apple implemented in iOS 16.

Please see:

Sorry, there is nothing that I can do about it in this plugin. You will need to name all of the switches manually to match their functionality.

I cam getting a bit fed up of continually addressing this same issue, so I will add a note to the main README file...

tim-hilt commented 1 year ago

Thanks for your effort and engagement! I’m of course not blaming it on you. Is there some solution available? Anything I could help you with?

thoukydides commented 1 year ago

I have actually just stumbled across a Discord discussion that might help, and am trying a few experiments... which appear promising.

Unfortunately, it doesn't look like there have been any new public releases of the HomeKit Accessory Protocol Specification (non-commercial version) since R2 in 2019... but HomeKit has changed significantly since then. That version of the specification doesn't even list Configured Name as a defined characteristic, let alone explain how it is intended to be used.

thoukydides commented 1 year ago

I have just released v0.27.0 with Configured Name characteristics added to the Switch, Stateless Programmable Switch, and Lightbulb services. These are the services where the plugin may create multiple instances on a single appliance, so they need to be distinguished. I have not added it to any of the other service types which are unique by their type.

Within the Apple Home app this seems to restore the iOS 15 behaviour, where the useful names are shown for most tiles... except for the Stateless Programmable Switch ("unconfigured buttons") which continue to just be numeric.

Eve shows the useful names for everything, but shows the Configured Name characteristic for each service as a separate blank row which is annoying.

Home+ follows the Apple Home approach for the tiles, but at least opening up the details of the numeric Stateless Programmable Switch ("button") services shows the Configured Name characteristic with its useful description.

That's probably the best that can be achieved currently.

tim-hilt commented 1 year ago

I’ll try again with the newest version later today. Thanks for the heads up.

tim-hilt commented 1 year ago

I just tried it out and the naming issue seems to be fixed. However now I can see an API-error in the homebridge-logs:

[21/12/2022, 21:37:22] [HomeConnect] [Kaffeevollautomat] SET Off
[21/12/2022, 21:37:25] [HomeConnect] [Kaffeevollautomat] Home Connect API error: HomeAppliance reported an error [BSH.Common.Error.WriteRequest.Busy]
[21/12/2022, 21:37:25] [HomeConnect] [Kaffeevollautomat] SET BSH.Common.Setting.PowerState=BSH.Common.EnumType.PowerState.Standby
[21/12/2022, 21:37:25] [HomeConnect] [Kaffeevollautomat] PUT https://api.home-connect.com/api/homeappliances/SIEMENS-TI9558X1DE-68A40E3A7381/settings/BSH.Common.Setting.PowerState

It seems like the two issues are not related. Should I open another issue? Does it possibly have something to do with my setup?

tim-hilt commented 1 year ago

Note that I can now also add the different programs to the home-overview, as a favorite and so on. I just can't control it via the Home App or the Accessories-Tab in homebridge-UI.

thoukydides commented 1 year ago

The BSH.Common.Error.WriteRequest.Busy error is returned by the Home Connect cloud servers. However, that particular error code is not listed in the API documentation. I don't think I have ever seen that particular API error - it certainly hasn't occurred in the last year on my own setup (including with the latest plugin version).

If that error is completely repeatable, and occurs for all attempts to control the appliance from HomeKit, then it probably an internal failure within the Home Connect cloud services. Most likely it is a transient error that will sort itself out. If it continues occurring for more than a day then it would probably be worth reporting to the Home Connect team at: https://developer.home-connect.com/support/contact

Unless some operations work ,and the log shows that error only occurring after some other operation, I don't think there is anything that I can investigate.

tim-hilt commented 1 year ago

I’m sorry, that was my fault. The machine demanded user interaction when I tried to switch it off. I didn’t notice it at first, only saw the error.

The issue is solved for me! I can use it again.