stefan-kaestle / openhab2-addons

Add-ons for openHAB 2.x
Eclipse Public License 2.0
16 stars 1 forks source link

Where to initially set IP, PW and Keystore #22

Closed tuxianerDE closed 4 years ago

tuxianerDE commented 4 years ago

Where is the configuration required for the initial connection between Addon and Bosch Smart Home controller?

The readme outlines, that the IP, PW and KeyStore File location needs to be set. However the UI remains empty when clicking on the binding and I dont see a config file - template - in the services folder in openhab.

From the readme I take this has to be in the thing file, however at least there is no reference to a password that needs to be entered.

kreack commented 4 years ago
  1. Copy the .jar file into your openHAB "addons" folder
  2. Restart openHAB or reload the bundle
  3. To check if it works: Go to PaperUI -> Configuration -> Things -> "+". You should see "Bosch Smart Home Binding" there.
  4. Add Thing 'Bosch Smart Home Controller'
  5. Input Thing 'Configuration Parameters' (IP & Key) ____Hopefully I got it right :-)

In my case no paring is possible :-( (see log): 020-08-05 23:26:09.074 [INFO ] [nding.boschshc.internal.BoschSslUtil] - Using existing keystore /var/lib/openhab2/etc/oss_openhab_binding_5788fbbf-c36d-4e53-96a4-5648e1c4d04e.jks 2020-08-05 23:26:09.078 [INFO ] [chshc.internal.BoschSHCBridgeHandler] - Starting Bosch SHC Bridge 2020-08-05 23:26:09.122 [WARN ] [chshc.internal.BoschSHCBridgeHandler] - Initializing Bosch SHC Bridge: 192.168.0.230 - HTTP client is: BoschHttpClient@169f2a3{STARTED} - version: 2020-04-05 2020-08-05 23:26:09.393 [hingStatusInfoChangedEvent] - 'boschshc:shc:852cbaaa' changed from INITIALIZING to UNKNOWN: Bitte drücken Sie den Knopf am Bosch Smart Home Controller zum automatischen Verbinden. 2020-08-05 23:26:09.557 [INFO ] [ng.boschshc.internal.BoschHttpClient] - Pairing needed, because access to Bosch SmartHomeController not possible. 2020-08-05 23:26:09.558 [INFO ] [ng.boschshc.internal.BoschHttpClient] - Starting pairing OpenHab Client with Bosch SmartHomeController! 2020-08-05 23:26:09.559 [INFO ] [ng.boschshc.internal.BoschHttpClient] - Please press the Bosch SHC button until LED starts blinking 2020-08-05 23:26:09.561 [INFO ] [ng.boschshc.internal.BoschHttpClient] - Pairing this Client 'oss_openhab_binding_5788fbbf-c36d-4e53-96a4-5648e1c4d04e' with SHC 192.168.0.230 using Cert MIIDhDCCAmygAwIBAgIGAXPAbLzmMA0GCSqGSIb3DQEBCwUAMIGCMUEwPwYDVQQDDDhvc3Nfb3BlbmhhYl9iaW5kaW5nXzU3ODhmYmJmLWMzNmQtNGU1My05NmE0LTU2NDhlMWM0ZDA0ZTEQMA4GA1UECgwHT3BlbkhBQjENMAsGA1UEBwwETm9uZTENMAsGA1UECAwETm9uZTENMAsGA1UEBhMETm9uZTAeFw0yMDA4MDUyMTAwMThaFw0zMDA4MDMyMTAwMThaMIGCMUEwPwYDVQQDDDhvc3Nfb3BlbmhhYl9iaW5kaW5nXzU3ODhmYmJmLWMzNmQtNGU1My05NmE0LTU2NDhlMWM0ZDA0ZTEQMA4GA1UECgwHT3BlbkhBQjENMAsGA1UEBwwETm9uZTENMAsGA1UECAwETm9uZTENMAsGA1UEBhMETm9uZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJZBmdtsp5OS64k798NexV6UCIkgzMCK8KAtr0I4bmnZjxtPPm2g92JrFWtivTTKP68GeejX7RXZfBcRe+UZxTk3GivNzDmkPNnHnqtq3Pfs5sQr+jyXR/00tOXYmt/MEzKPkUCXqfHCilcgI0sBeiLpuDZFG1FU4WlEirh8vfOq/PhLT3S0OEGrEH05NnnE4KgS9swmB79snMSb7vgU/rCaNww10GLWanK1D23TOaPakOj3g2/kk4nDLs4TPTsOXkhTpoj1ype+QpmbgutOaTt3cMa6Dmj/HfUgTpms71gCwBn7twYIyV5CGpONqc/Mexvj7wDfb9Xs2wcDLo270l0CAwEAATANBgkqhkiG9w0BAQsFAAOCAQEATFk869sEXuPLrMPSES1+p29wbhpH/P6oFKM3NlB6VTX7d6KLJCO4N+5iJbwAjlo6JLYnkhLJvilqWAAyZWaWPtv2EJxLtu5XW1+Bqc3/8hdmlGRZe5/TREEN1xL6K7UHyOMBrlnezivzAq6SFU9Ph+JT7APBbEZVCejkbDMnGzHNYraGEyz8Cezr5xiSPlFz02IJbkBouSONuy8CVZGwrMMPSp3b4V4+VS7Qb/ENOGN2vHwAdU8AbNkvLSgOjEFr6ug5zk7wVkfx0+3F3qheDmetiNSlMH6lLxSzDIMvUUqbbc2MQkaDhPBIyNcKOhtf8NXDTi/odL034XMgGUkSuA== 2020-08-05 23:26:10.204 [WARN ] [ng.boschshc.internal.BoschHttpClient] - Pairing failed, was the Bosch SHC button pressed? 2020-08-05 23:26:10.377 [INFO ] [ng.boschshc.internal.BoschHttpClient] - Last Pairing failed, starting retry number 1/12 in few seconds 2020-08-05 23:26:25.379 [INFO ] [ng.boschshc.internal.BoschHttpClient] - Starting pairing OpenHab Client with Bosch SmartHomeController! 2020-08-05 23:26:25.381 [INFO ] [ng.boschshc.internal.BoschHttpClient] - Please press the Bosch SHC button until LED starts blinking 2020-08-05 23:26:25.383 [INFO ] [ng.boschshc.internal.BoschHttpClient] - Pairing this Client 'oss_openhab_binding_5788fbbf-c36d-4e53-96a4-5648e1c4d04e' with SHC 192.168.0.230 using Cert MIIDhDCCAmygAwIBAgIGAXPAbLzmMA0GCSqGSIb3DQEBCwUAMIGCMUEwPwYDVQQDDDhvc3Nfb3BlbmhhYl9iaW5kaW5nXzU3ODhmYmJmLWMzNmQtNGU1My05NmE0LTU2NDhlMWM0ZDA0ZTEQMA4GA1UECgwHT3BlbkhBQjENMAsGA1UEBwwETm9uZTENMAsGA1UECAwETm9uZTENMAsGA1UEBhMETm9uZTAeFw0yMDA4MDUyMTAwMThaFw0zMDA4MDMyMTAwMThaMIGCMUEwPwYDVQQDDDhvc3Nfb3BlbmhhYl9iaW5kaW5nXzU3ODhmYmJmLWMzNmQtNGU1My05NmE0LTU2NDhlMWM0ZDA0ZTEQMA4GA1UECgwHT3BlbkhBQjENMAsGA1UEBwwETm9uZTENMAsGA1UECAwETm9uZTENMAsGA1UEBhMETm9uZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJZBmdtsp5OS64k798NexV6UCIkgzMCK8KAtr0I4bmnZjxtPPm2g92JrFWtivTTKP68GeejX7RXZfBcRe+UZxTk3GivNzDmkPNnHnqtq3Pfs5sQr+jyXR/00tOXYmt/MEzKPkUCXqfHCilcgI0sBeiLpuDZFG1FU4WlEirh8vfOq/PhLT3S0OEGrEH05NnnE4KgS9swmB79snMSb7vgU/rCaNww10GLWanK1D23TOaPakOj3g2/kk4nDLs4TPTsOXkhTpoj1ype+QpmbgutOaTt3cMa6Dmj/HfUgTpms71gCwBn7twYIyV5CGpONqc/Mexvj7wDfb9Xs2wcDLo270l0CAwEAATANBgkqhkiG9w0BAQsFAAOCAQEATFk869sEXuPLrMPSES1+p29wbhpH/P6oFKM3NlB6VTX7d6KLJCO4N+5iJbwAjlo6JLYnkhLJvilqWAAyZWaWPtv2EJxLtu5XW1+Bqc3/8hdmlGRZe5/TREEN1xL6K7UHyOMBrlnezivzAq6SFU9Ph+JT7APBbEZVCejkbDMnGzHNYraGEyz8Cezr5xiSPlFz02IJbkBouSONuy8CVZGwrMMPSp3b4V4+VS7Qb/ENOGN2vHwAdU8AbNkvLSgOjEFr6ug5zk7wVkfx0+3F3qheDmetiNSlMH6lLxSzDIMvUUqbbc2MQkaDhPBIyNcKOhtf8NXDTi/odL034XMgGUkSuA== 2020-08-05 23:26:25.903 [WARN ] [ng.boschshc.internal.BoschHttpClient] - Pairing failed, was the Bosch SHC button pressed? 2020-08-05 23:26:26.074 [INFO ] [ng.boschshc.internal.BoschHttpClient] - Last Pairing failed, starting retry number 2/12 in few seconds 2020-08-05 23:26:41.078 [INFO ] [ng.boschshc.internal.BoschHttpClient] - Starting pairing OpenHab Client with Bosch SmartHomeController! 2020-08-05 23:26:41.079 [INFO ] [ng.boschshc.internal.BoschHttpClient] - Please press the Bosch SHC button until LED starts blinking 2020-08-05 23:26:41.080 [INFO ] [ng.boschshc.internal.BoschHttpClient] - Pairing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EZVCejkbDMnGzHNYraGEyz8Cezr5xiSPlFz02IJbkBouSONuy8CVZGwrMMPSp3b4V4+VS7Qb/ENOGN2vHwAdU8AbNkvLSgOjEFr6ug5zk7wVkfx0+3F3qheDmetiNSlMH6lLxSzDIMvUUqbbc2MQkaDhPBIyNcKOhtf8NXDTi/odL034XMgGUkSuA== 2020-08-05 23:26:41.580 [WARN ] [ng.boschshc.internal.BoschHttpClient] - Pairing failed, was the Bosch SHC button pressed?

...............................

2020-08-05 23:29:00.984 [WARN ] [ng.boschshc.internal.BoschHttpClient] - Pairing failed, was the Bosch SHC button pressed? 2020-08-05 23:29:01.136 [INFO ] [ng.boschshc.internal.BoschHttpClient] - Last Pairing failed, starting retry number 12/12 in few seconds 2020-08-05 23:29:16.140 [hingStatusInfoChangedEvent] - 'boschshc:shc:852cbaaa' changed from UNKNOWN: Bitte drücken Sie den Knopf am Bosch Smart Home Controller zum automatischen Verbinden. to OFFLINE (CONFIGURATION_ERROR): Bitte drücken Sie den Knopf am Bosch Smart Home Controller zum automatischen Verbinden.

& Following message by BSH Controller Thing: Status: OFFLINE - CONFIGURATION_ERROR Bitte drücken Sie den Knopf am Bosch Smart Home Controller zum automatischen Verbinden.

Off course I pressed the paring button :-)

Any Idea what it could be?

Thanks & Regards, Sergo

GerdZanker commented 4 years ago

Hello @kreack, thank you for testing and the log.

Up to now I have only one question and clarification regarding

Input Thing 'Configuration Parameters' (IP & Key)

Input thing 'configuration parameter' must be set to your IP address and the "system password" of the Bosch smart home controller - the same password you used to connect your smartphone.

The same system password is also used for the .jks JavaKeyStore file in userdata/etc. Can you use a program like the "KeyStoreExplorer" to test if you can open the file and browse the content with your password? In case you saved the configuration with a wrong PW please remove the file ``userdata/etc/oss_openhabbinding.jks`` in your openhab installation and it will be created again.

kreack commented 4 years ago

Hi @GerdZanker ,

about IP & Key, I use the IP from BSH Controller and system password, which is printed on the controller (and is included in the connection barcode of the bush hardware). this should be right, because in case of wrong password the log give directly error like:

2020-08-06 21:58:13.407 [WARN ] [nding.boschshc.internal.BoschSslUtil] - Can not create or load keystore /var/lib/openhab2/etc/oss_openhab_binding_5788fbbf-c36d-4e53-96a4-5648e1c4d04e.jks. Check path, write access and JKS content. 2020-08-06 21:58:13.410 [ERROR] [st.core.internal.thing.ThingResource] - Exception during HTTP PUT request for update config at 'things/boschshc:shc:070d83a3/config' java.lang.IllegalStateException: java.io.IOException: Keystore was tampered with, or password was incorrect

Regarding JavaKeyStore jks file: userdata/etc/oss_openhabbinding.jks i could not find my key in this file After Deleting of userdata/etc/oss_openhabbinding*.jks and add the controller thing new, I receive the same result :-(

MANY THANKS for your support 👍

tuxianerDE commented 4 years ago

So, I. Managed to get it connected. I inserted the DNS name, password="" in the things file. Saved it went to my controller and pressed the button until it started blinking. After which I had a successful connect. I have configured already a light switch, Twinguard, two thermostats as thing and item. Can control the lights, door sensors follows next.

kreack commented 4 years ago

So, I. Managed to get it connected. I inserted the DNS name, password="" in the things file. Saved it went to my controller and pressed the button until it started blinking. After which I had a successful connect. I have configured already a light switch, Twinguard, two thermostats as thing and item. Can control the lights, door sensors follows next.

that sounds great 👍

kreack commented 4 years ago

after reconfiguration of BSH binding its looks like connected 👍 Many thanks @GerdZanker