steilerDev / homebridge-openhab2-complete

A homebridge plugin for openHAB, that has the expectation to fully support all Services offered by Apple's Homekit Accessory Protocol (HAP)
GNU General Public License v3.0
52 stars 16 forks source link

Subscription Service Closed #23

Closed Naruk-TUBK closed 5 years ago

Naruk-TUBK commented 5 years ago

Hello,

i have configured on lightbuld for test purposes. After the startup of homebridge this error occurs every second:

[6/7/2019, 23:01:43] [openHAB2-Complete] Trying to reconnect subscription service... [6/7/2019, 23:01:43] [openHAB2-Complete] Subscription service closed, trying to reconnect in 1sec...

Strangely it is possible for me to add the bridge to homekit and control the light. The error is still produced every second.

This is the log of the startup phase:

[6/7/2019, 23:00:07] Loaded config.json with 0 accessories and 1 platforms. [6/7/2019, 23:00:07] --- [6/7/2019, 23:00:09] Loaded plugin: homebridge-openhab2-complete [6/7/2019, 23:00:09] Registering platform 'homebridge-openhab2-complete.openHAB2-Complete' [6/7/2019, 23:00:09] --- [6/7/2019, 23:00:09] Loading 1 platforms... [6/7/2019, 23:00:09] [openHAB2-Complete] Initializing openHAB2-Complete platform... [6/7/2019, 23:00:09] [openHAB2-Complete] Loading accessory types... [6/7/2019, 23:00:09] [openHAB2-Complete] Loading and activating accessory type airpurifier [6/7/2019, 23:00:09] [openHAB2-Complete] Loading and activating accessory type air [6/7/2019, 23:00:09] [openHAB2-Complete] Loading and activating accessory type co2 [6/7/2019, 23:00:09] [openHAB2-Complete] Loading and activating accessory type co [6/7/2019, 23:00:09] [openHAB2-Complete] Loading and activating accessory type contact [6/7/2019, 23:00:09] [openHAB2-Complete] Loading and activating accessory type door [6/7/2019, 23:00:09] [openHAB2-Complete] Loading and activating accessory type fan [6/7/2019, 23:00:09] [openHAB2-Complete] Loading and activating accessory type faucet [6/7/2019, 23:00:09] [openHAB2-Complete] Loading and activating accessory type filter [6/7/2019, 23:00:09] [openHAB2-Complete] Loading and activating accessory type garage [6/7/2019, 23:00:09] [openHAB2-Complete] Loading and activating accessory type heatercooler [6/7/2019, 23:00:09] [openHAB2-Complete] Loading and activating accessory type humidifier [6/7/2019, 23:00:09] [openHAB2-Complete] Loading and activating accessory type humidity [6/7/2019, 23:00:09] [openHAB2-Complete] Loading and activating accessory type irrigation [6/7/2019, 23:00:09] [openHAB2-Complete] Loading and activating accessory type leak [6/7/2019, 23:00:09] [openHAB2-Complete] Loading and activating accessory type light [6/7/2019, 23:00:09] [openHAB2-Complete] Loading and activating accessory type lux [6/7/2019, 23:00:09] [openHAB2-Complete] Loading and activating accessory type lock [6/7/2019, 23:00:09] [openHAB2-Complete] Loading and activating accessory type motion [6/7/2019, 23:00:09] [openHAB2-Complete] Loading and activating accessory type occupancy [6/7/2019, 23:00:09] [openHAB2-Complete] Loading and activating accessory type outlet [6/7/2019, 23:00:09] [openHAB2-Complete] Loading and activating accessory type security [6/7/2019, 23:00:09] [openHAB2-Complete] Loading and activating accessory type smoke [6/7/2019, 23:00:09] [openHAB2-Complete] Loading and activating accessory type switch [6/7/2019, 23:00:09] [openHAB2-Complete] Loading and activating accessory type temp [6/7/2019, 23:00:09] [openHAB2-Complete] Loading and activating accessory type thermostat [6/7/2019, 23:00:09] [openHAB2-Complete] Loading and activating accessory type valve [6/7/2019, 23:00:09] [openHAB2-Complete] Loading and activating accessory type window [6/7/2019, 23:00:10] [openHAB2-Complete] Loading and activating accessory type windowcovering [6/7/2019, 23:00:10] [openHAB2-Complete] Waiting for openHAB host (http://192.168.178.20) to come online... [6/7/2019, 23:00:22] [openHAB2-Complete] openHAB host (http://192.168.178.20) is online, now syncing... [6/7/2019, 23:00:22] [openHAB2-Complete] Syncing all items & types from openHAB [6/7/2019, 23:00:23] [openHAB2-Complete] 'OpenHAB2 - Complete Edition' plugin loaded - Version 0.10.1 [6/7/2019, 23:00:23] [openHAB2-Complete] --- [6/7/2019, 23:00:23] [openHAB2-Complete] Loading accessories from configuration, this might take a while... [6/7/2019, 23:00:23] [openHAB2-Complete] Added accessory Schreib tischlampe (Type: light) [6/7/2019, 23:00:23] [openHAB2-Complete] Syncing all item values from openHAB [6/7/2019, 23:00:25] [openHAB2-Complete] Finished loading 1 accessories from configuration [6/7/2019, 23:00:25] [openHAB2-Complete] --- [6/7/2019, 23:00:25] [openHAB2-Complete] Initializing platform accessory 'Schreib tischlampe'... [6/7/2019, 23:00:25] Loading 0 accessories...

steilerDev commented 5 years ago

That seems interesting...couple of questions:

  1. What's the timing on the issue? Does that happen immidiately or after some time?
  2. Which versions (node, npm, homebridge, openHAB) are you using?
  3. After the issue occurs, can you open the home app on your iOS/Mac, then go into openhab or to your accessory directly and change the value (e.g. turn it on/off) and see if the still opened home.app changes the value corectly?

Thanks,

Frank

Naruk-TUBK commented 5 years ago
  1. Yes ist happens immediately. At the end i have a log with more length. There you can see the timing of the error
  2. node = 12.4.0, npm = 6.9.0, homebridge = 0.4.50, openhab = 2.5.0~S1587-1
  3. Yes it is possible to connect to the bridge and toggle lights for example. Changing the light via the Home app is really responsive. If i change the light via openhab it takes some seconds for Home.app to recognize it

[6/11/2019, 20:23:10] [openHAB2-Complete] Loading and activating accessory type thermostat [6/11/2019, 20:23:10] [openHAB2-Complete] Loading and activating accessory type valve [6/11/2019, 20:23:10] [openHAB2-Complete] Loading and activating accessory type window [6/11/2019, 20:23:10] [openHAB2-Complete] Loading and activating accessory type windowcovering [6/11/2019, 20:23:10] [openHAB2-Complete] Waiting for openHAB host (http://192.168.178.20) to come online... [6/11/2019, 20:23:23] [openHAB2-Complete] openHAB host (http://192.168.178.20) is online, now syncing... [6/11/2019, 20:23:23] [openHAB2-Complete] Syncing all items & types from openHAB [6/11/2019, 20:23:23] [openHAB2-Complete] 'OpenHAB2 - Complete Edition' plugin loaded - Version 0.10.1 [6/11/2019, 20:23:23] [openHAB2-Complete] --- [6/11/2019, 20:23:23] [openHAB2-Complete] Loading accessories from configuration, this might take a while... [6/11/2019, 20:23:23] [openHAB2-Complete] Added accessory Schreib tischlampe (Type: light) [6/11/2019, 20:23:23] [openHAB2-Complete] Syncing all item values from openHAB [6/11/2019, 20:23:24] [openHAB2-Complete] Finished loading 1 accessories from configuration [6/11/2019, 20:23:24] [openHAB2-Complete] --- [6/11/2019, 20:23:24] [openHAB2-Complete] Initializing platform accessory 'Schreib tischlampe'... [6/11/2019, 20:23:24] Loading 0 accessories... Setup Payload: X-HM://002472WAGCHH1 Scan this code with your HomeKit app on your iOS device to pair with Homebridge:

Or enter this code with your HomeKit app on your iOS device to pair with Homebridge:

[6/11/2019, 20:23:24] Homebridge is running on port 51826. [6/11/2019, 20:23:24] [openHAB2-Complete] Subscription service closed, trying to reconnect in 1sec... [6/11/2019, 20:23:25] [openHAB2-Complete] Trying to reconnect subscription service... [6/11/2019, 20:23:25] [openHAB2-Complete] Subscription service closed, trying to reconnect in 1sec... [6/11/2019, 20:23:26] [openHAB2-Complete] Trying to reconnect subscription service... [6/11/2019, 20:23:26] [openHAB2-Complete] Subscription service closed, trying to reconnect in 1sec... [6/11/2019, 20:23:27] [openHAB2-Complete] Trying to reconnect subscription service... [6/11/2019, 20:23:27] [openHAB2-Complete] Subscription service closed, trying to reconnect in 1sec... [6/11/2019, 20:23:28] [openHAB2-Complete] Trying to reconnect subscription service... [6/11/2019, 20:23:28] [openHAB2-Complete] Subscription service closed, trying to reconnect in 1sec... [6/11/2019, 20:23:29] [openHAB2-Complete] Trying to reconnect subscription service... [6/11/2019, 20:23:29] [openHAB2-Complete] Subscription service closed, trying to reconnect in 1sec... [6/11/2019, 20:23:30] [openHAB2-Complete] Trying to reconnect subscription service... [6/11/2019, 20:23:30] [openHAB2-Complete] Subscription service closed, trying to reconnect in 1sec... [6/11/2019, 20:23:31] [openHAB2-Complete] Trying to reconnect subscription service... [6/11/2019, 20:23:31] [openHAB2-Complete] Subscription service closed, trying to reconnect in 1sec... [6/11/2019, 20:23:32] [openHAB2-Complete] Trying to reconnect subscription service... [6/11/2019, 20:23:32] [openHAB2-Complete] Subscription service closed, trying to reconnect in 1sec...

Naruk-TUBK commented 5 years ago

I resolved the problem by updating openhab to version 2.5.0~S1608-1. But still i think it would be nice to know what the root of the problem was.

steilerDev commented 5 years ago

I could be possible that the older OpenHab version, that you were using does not support the subscription functionality, that I incorporated, OpenHab changed its API over the versions, or there is an OpenHAB bug within this services on certain releases.

The subscription service of OpenHAB has long been a source of bugs and unstable behavior. Not sure what fixes it, however it is the most efficient way to solve the problem for keeping a synchronized state.

OsBenji commented 3 years ago

I recently updated my openhab2 from 2.5.10 to 2.5.11 and got this Error in my Homebridge. Everything works fine but this error every second is annoying.

joeberlin123 commented 3 years ago

Same here. The Problem startet with the update of my openhab2 from 2.5.10 to 2.5.11.