thoukydides / homebridge-homeconnect

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

The appliance is offline #15

Closed DJay-X closed 4 years ago

DJay-X commented 4 years ago

Description of Issue

I was trying to turn the coffee make on with HomePod Siri also with Eve App. Always pointing to an Error "I get no response from your devices". I checked the HomeConnect App and the connection was available. Also the Wifi Symbol on the machine was showing and no error. The simple log on Homebridge was pointing to "The appliance is offline". Then I started the coffee machine with the HomeConnect App and this worked.

I asked Siri to make an Espresso but this also was declined with not response from the machine and Log still showing "offline".

Napkin 29 01 20, 12 41 14 PM

Plugin Version

homebridge-homeconnect v0.16.5

Home Connect Appliance(s)

BOSCH-CTL636ES6

HomeKit App(s)

Eve

Log File

-- Logs begin at Thu 2016-11-03 18:16:42 CET. --
Jan 29 12:28:07 raspberrypi-3BPlus homebridge[469]: [2020-1-29 12:28:07] [HomeConnect] [Kaffeevollautomat] SET BSH.Common.Setting.PowerState=BSH.Common.EnumType.PowerState.On
Jan 29 12:28:18 raspberrypi-3BPlus homebridge[469]: [2020-1-29 12:28:18] [HomeConnect] [Kaffeevollautomat] SET On
Jan 29 12:28:18 raspberrypi-3BPlus homebridge[469]: [2020-1-29 12:28:18] [HomeConnect] [Kaffeevollautomat] The appliance is offline
Jan 29 12:28:18 raspberrypi-3BPlus homebridge[469]: [2020-1-29 12:28:18] [HomeConnect] [Kaffeevollautomat] SET BSH.Common.Setting.PowerState=BSH.Common.EnumType.PowerState.On
Jan 29 12:28:38 raspberrypi-3BPlus homebridge[469]: [2020-1-29 12:28:38] [HomeConnect] [Kaffeevollautomat] SET On
Jan 29 12:28:38 raspberrypi-3BPlus homebridge[469]: [2020-1-29 12:28:38] [HomeConnect] [Kaffeevollautomat] The appliance is offline
Jan 29 12:28:38 raspberrypi-3BPlus homebridge[469]: [2020-1-29 12:28:38] [HomeConnect] [Kaffeevollautomat] SET BSH.Common.Setting.PowerState=BSH.Common.EnumType.PowerState.On
Jan 29 12:28:58 raspberrypi-3BPlus homebridge[469]: [2020-1-29 12:28:58] [HomeConnect] [Kaffeevollautomat] SET On
Jan 29 12:28:58 raspberrypi-3BPlus homebridge[469]: [2020-1-29 12:28:58] [HomeConnect] [Kaffeevollautomat] The appliance is offline
Jan 29 12:28:58 raspberrypi-3BPlus homebridge[469]: [2020-1-29 12:28:58] [HomeConnect] [Kaffeevollautomat] SET BSH.Common.Setting.PowerState=BSH.Common.EnumType.PowerState.On
Jan 29 12:29:21 raspberrypi-3BPlus homebridge[469]: [2020-1-29 12:29:21] [HomeConnect] [Kaffeevollautomat] SET Off
Jan 29 12:29:21 raspberrypi-3BPlus homebridge[469]: [2020-1-29 12:29:21] [HomeConnect] [Kaffeevollautomat] The appliance is offline
Jan 29 12:29:21 raspberrypi-3BPlus homebridge[469]: [2020-1-29 12:29:21] [HomeConnect] [Kaffeevollautomat] SET BSH.Common.Setting.PowerState=BSH.Common.EnumType.PowerState.Standby
Jan 29 12:29:35 raspberrypi-3BPlus homebridge[469]: [2020-1-29 12:29:35] [HomeConnect] [Kaffeevollautomat] SET On
Jan 29 12:29:35 raspberrypi-3BPlus homebridge[469]: [2020-1-29 12:29:35] [HomeConnect] [Kaffeevollautomat] The appliance is offline
Jan 29 12:29:35 raspberrypi-3BPlus homebridge[469]: [2020-1-29 12:29:35] [HomeConnect] [Kaffeevollautomat] SET BSH.Common.Setting.PowerState=BSH.Common.EnumType.PowerState.On
Jan 29 12:29:56 raspberrypi-3BPlus homebridge[469]: [2020-1-29 12:29:56] [HomeConnect] [Kaffeevollautomat] SET On
Jan 29 12:29:56 raspberrypi-3BPlus homebridge[469]: [2020-1-29 12:29:56] [HomeConnect] [Kaffeevollautomat] The appliance is offline
Jan 29 12:29:56 raspberrypi-3BPlus homebridge[469]: [2020-1-29 12:29:56] [HomeConnect] [Kaffeevollautomat] SET BSH.Common.Setting.PowerState=BSH.Common.EnumType.PowerState.On
Jan 29 12:30:17 raspberrypi-3BPlus homebridge[469]: [2020-1-29 12:30:17] [HomeConnect] [Kaffeevollautomat] SET On
Jan 29 12:30:17 raspberrypi-3BPlus homebridge[469]: [2020-1-29 12:30:17] [HomeConnect] [Kaffeevollautomat] The appliance is offline
Jan 29 12:30:17 raspberrypi-3BPlus homebridge[469]: [2020-1-29 12:30:17] [HomeConnect] [Kaffeevollautomat] SET BSH.Common.Setting.PowerState=BSH.Common.EnumType.PowerState.On
Jan 29 12:30:29 raspberrypi-3BPlus homebridge[469]: [2020-1-29 12:30:29] [HomeConnect] [Kaffeevollautomat] SET On
Jan 29 12:30:29 raspberrypi-3BPlus homebridge[469]: [2020-1-29 12:30:29] [HomeConnect] [Kaffeevollautomat] The appliance is offline
Jan 29 12:30:29 raspberrypi-3BPlus homebridge[469]: [2020-1-29 12:30:29] [HomeConnect] [Kaffeevollautomat] SET BSH.Common.Setting.PowerState=BSH.Common.EnumType.PowerState.On
Jan 29 12:31:02 raspberrypi-3BPlus homebridge[469]: [2020-1-29 12:31:02] [HomeConnect] [Kaffeevollautomat] Active (Run)
Jan 29 12:31:02 raspberrypi-3BPlus homebridge[469]: [2020-1-29 12:31:02] [HomeConnect] [Kaffeevollautomat] On
Jan 29 12:31:02 raspberrypi-3BPlus homebridge[469]: [2020-1-29 12:31:02] [HomeConnect] [Kaffeevollautomat] Manual mode (remote start allowed, being operated locally)
Jan 29 12:31:06 raspberrypi-3BPlus homebridge[469]: [2020-1-29 12:31:06] [HomeConnect] [Kaffeevollautomat] Remote operation enabled (remote start allowed)
Jan 29 12:31:07 raspberrypi-3BPlus homebridge[469]: [2020-1-29 12:31:07] [HomeConnect] [Kaffeevollautomat] Manual mode (remote start allowed, being operated locally)
Jan 29 12:31:11 raspberrypi-3BPlus homebridge[469]: [2020-1-29 12:31:11] [HomeConnect] [Kaffeevollautomat] Remote operation enabled (remote start allowed)
Jan 29 12:37:00 raspberrypi-3BPlus homebridge[469]: [2020-1-29 12:37:00] [HomeConnect] [Kaffeevollautomat] START Program 'Espresso' (ConsumerProducts.CoffeeMaker.Program.Beverage.Espresso)
Jan 29 12:37:00 raspberrypi-3BPlus homebridge[469]: [2020-1-29 12:37:00] [HomeConnect] [Kaffeevollautomat] The appliance is offline
Jan 29 12:37:00 raspberrypi-3BPlus homebridge[469]: [2020-1-29 12:37:00] [HomeConnect] [Kaffeevollautomat] START active program ConsumerProducts.CoffeeMaker.Program.Beverage.Espresso
DJay-X commented 4 years ago

Updated to homebridge-homeconnect v0.16.6 and restarted homebridge. Now with first command Siri was making the Espresso. 🤷🏼‍♂️

thoukydides commented 4 years ago

I suspect that the issue you saw was due to a bug that I introduced in v0.16.2 and fixed in v0.16.6. However, the actual cause of the problem will have been earlier than the log snippet that you provided.

If it is the issue that I think then it would have required the following sequence of events:

  1. Event stream terminated with an error (or without an error but taking longer than 3 seconds to be re-established).
  2. Event stream successfully re-established.
  3. Another error occurred whilst reading the appliance's state.

Step 1 would have treated the appliance as being offline.

Step 3 would have encountered the bug, which prevented the read of appliance state being retried. This would have left the plugin thinking that the appliance is offline, but being unable to restart the read of appliance state. The bug was in the error recovery code, so wasn't itself trapped and handled safely.