-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not able to connect / connection failed #42
Comments
Perhaps a stupid question but you didn't mention it.... you did press the button on the controller and the LEDs started to blink? You might see a bit more in the log after enabling logging for the component in configuration.yaml:
Not 100% sure about the name for the logger, boschshcpy does show some output on my test system, don't get much from the custom component Armin |
Hi @armin-gh It's a valid question. But yes - I tried several ways (hold press while HA is running, hold press and reboot HA etc.). Didn't make any difference. I pasted the config to Again, if I choose e.g. another (wrong) IP address, errors appear in the logs.
Update: My fault - forgot that the ssh connection is via tmux -> not searchable via browser. Now I opened the log file directly. I'm getting output e.g.: DEBUG (MainThread) [homeassistant.components.zeroconf] Discovered new device Bosch SHC [XX-XX-XX-XX-XX-XX]._http._tcp.local. ZeroconfServiceInfo(host='X.X.X.X', port=8443, hostname='shc107ef4.local.', type='_http._tcp.local.', name='Bosch SHC [XX-XX-XX-XX-XX-XX]._http._tcp.local.', properties={'_raw': {}}, _warning_logged=False)
.... The MAC address is correct. Still I'm not able to set it up. |
There are several more log entries. zeroconf seems to discover the service:
There are many DNSIncoming/DNSOutgoing logs per second, but I guess it's not important:
|
First seconds of the log filtered by keyword "bosch" https://gist.github.com/shllg/5086dd5305f3e928e15abeb81911a9d6 "bosch_shc" component is loaded but nevery logs anything. Homekit integration recognizes the Bosch controller but (as supposed to be) does not add it since it's already added to Homekit. zeroconf discovers the SHC. |
And the LEDs on the controller still blinked when you entered the Hostname/IP and pressed the "Abschicken"-Button? Because otherwise the controller won't accept the new client. not sure if it is related, a while ago I had a discussion over in the Home Assistant Community related to the Synology-Integration. It did not recognize the integration because of an orphaned entry for the device in "core.config_entries" in the .storage folder you also might want to post your problem in Configuration Section of the Home Assistant Community. Armin |
Nope, won't stop blinking.
I checked every file in the storage folder. Found some references which were based on a FritzBox linking service. Removing those entries did not fix the issue. |
Anything in the core.config_entries with a "unique_id" matching the MAC of your Bosch-Controller? Otherwise I'm lost here... sorry |
Thanks for reporting. I double-checked creating a connection with a clean HA config in my test setup. Works without any issue ... My logger configuration:
The log should report this, when the password is wrong:
The core config_entry should look somewhat like here:
|
Can you post information on HA system health? see Configuration -> Configuration -> Info. If you are using docker, please make sure to add |
No -.-
I'm very grateful for your efforts! @armin-gh
@tschamm Thank you for your reply. Which password are you referring to? I changed the logger config and tried again - without success. It always fails at the "asking for Host" part. Again - entering the right IP does not produce any logs. Entering a wrong address (to test if logging works) will log
Well I'm running the the HAOS. It's a very basic and customized Linux as far as I can see. I need to look how they spin up docker and if it would be overwritten when updating. Need to do some research for that. |
Can you test the following on a machine with python3.9 and boschshcpy installed? You can do this directly from your home assistant command line
This should result in a json result including a |
I installed everything to run your test code above: apk add libffi-dev gcc python3-dev musl-dev
python3.9 -m ensurepip --upgrade
pip3.9 install boschshcpy cryptography Afterwards, your code returned JSON including
|
Ok I provided wrong information - sorry about that. Didn't know how the ssh addon works. Seems like it spins up a dedicated container with shared folder structure. It seems not to be the actual HA container. That's why importing default HA py resources won't work too and the installation steps above are required. At least we know, that the boschshcpy call works from inside the environment. |
Logged in into the machine and container directly. The code works in |
That at least sounds good. Can you check what happens if you try to configure the component using a wrong password? |
How can I provide the information via config? Didn't find it in the readme. At the UI, I won't get to that point. |
Are you using the custom component? |
😅 well as stated above, I never get to that point. It always fails after entering the host (result is the screen on my original message). I tried the included version but also checked out the repo and symlinked the custom_components/bosch_shc into the config folder. Both do not work. |
I tried to find out a bit more - am not very profound with Python - so it takes a while. The error message (
try:
self.info = info = await self._get_info(host)
except SHCConnectionError as err:
errors["base"] = "cannot_connect"
Inside |
That's odd. What version of the SHC controller are you using? Something like 10.4.2284-22213 or -22214?
If you have an older version installed, I suggest to update the SHC controller. If this won't work, I need to write a workaround for devices not providing an ip address. |
The controller version is A strange thing is, that inside the SHC app, "IP address of the Smart Home Controller" is empty always. The SHC gets a fixed IP from the DHCP. The system works properly - with Homekit too. Resetting the controller did not solve anything. The {
"apiVersions": [
"2.6"
],
"softwareUpdateState": {
"@type": "softwareUpdateState",
"swUpdateState": "NO_UPDATE_AVAILABLE",
"swUpdateLastResult": "UPDATE_SUCCESS",
"swUpdateAvailableVersion": "",
"swInstalledVersion": "10.4.2284-22213",
"swActivationDate": {
"@type": "softwareActivationDate",
"timeout": 604800000
},
"automaticUpdatesEnabled": true
},
"macAddress": "xx-xx-xx-xx-xx-xx",
"claimed": true,
"country": "DEU",
"tacVersion": "DEU-12",
"clientIds": [
"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
],
"featureToggles": {
"app-store-rating.ios": true,
"protect-plus.fuchsia": true,
"homekit-twinguardvoc": false,
"psm.pc.pairing": true,
"smart-light.pairing": true,
"homekit-bwth": false,
"wls.pairing": true,
"shading.advance.menu": true,
"analytics.toggle.bronze": true,
"outdoor-siren.pairing.ebony": true,
"smlo.release": true,
"app-store-rating.android": true,
"homekit-plugcompact": false,
"cloud.tokenvalidation": true
},
"connectivityVersions": [
{
"name": "claiming",
"minVersion": 1,
"maxVersion": 1
},
{
"name": "noncePairing",
"minVersion": 1,
"maxVersion": 1
},
{
"name": "buttonPairing",
"minVersion": 1,
"maxVersion": 1
}
]
} As different examples on the net show, there should be the |
Thanks for confirming that. I have never experienced this, I will see if I can provide a fix for this before Christmas. Maybe it would be worth opening a ticket in the Bosch API repo. Would be interesting what caused this. |
As stated in the bosch-shc-api-docs project, the field is only omitted, if the controller cannot determine it's own IP address (which is strange since communications work). I created a ticket directly at the Bosch support page. |
While you wait for a response from Bosch-Support... anything special you are using as DHCP-Server? Armin |
I just pushed a new pre-release 0.4.22 which you can install via HACS, which fixes a missing IP address in the public information. @shllg Can you test the pre-release and provide a short hint, if this works for you? |
Sorry for the late reply. Vodafone kicked us out of the internet for multiple days -.- @tschamm I'm so grateful - thank you very much! It is working. With the new code, the zeroconf worked. Just needed to enter the password and all devices are connected! @armin-gh No special DHCP. I don't expect any response from Bosch soon... But yes, it's pretty odd. MACs are correct. Everything is detected. But the controller does not recognize it's own IP. No problem with Ikea or Philips. So I guess it's a Bosch related issue. I need to thank you again for the awesome support. Especially since everybody got enough to do before and over Christmas. |
Hi there,
at first I want to thank for the work being done to make this integration possible. Unfortunately, I'm not able to make the integration work. After several hours trying, I'd like to ask for some support here.
Specs:
Neither auto detection nor manual setup of SHC work.
I tried:
config/custom_components
No matter what, I'm not able to connect to the SHC.
The logs don't show any issues (or at least I did not find anything). For testing purposes, I entered some other IP or host domain. In those cases, HA raises an
HTTPSConnectionPool
error (Failed to get public information from SHC controller: HTTPSConnectionPool(host='X.X.X.X.', port=8446): Max retries exceeded with url: /smarthome/public/information....
).It does not show those errors when entering the actual SHC address.
Are there other ways to get more information/logs?
The text was updated successfully, but these errors were encountered: