BoschSmartHome / bosch-shc-api-docs

Bosch Smart Home Controller Local REST API
Other
208 stars 44 forks source link

Network error when using the "Bosch Smart Home Local API" #42

Closed iskopa closed 3 years ago

iskopa commented 3 years ago

Hello,

I get the following error when using the function "GET /devices --> List all available Devices" of the "Bosch Smart Home Local API": "https://apidocs.bosch-smarthome.com/local/#/Devices/get_devices"

TypeError: NetworkError when attempting to fetch resource.

I am using the IP address of my home controller (192.168.111.20) as "shcIp" and API version = 1.0

Could you please help on this? Is there further documentation/examples of this API?

Thank you and regards

hxmelab commented 3 years ago

Hi iskopa,

did you used the 'Try it out' function of the OpenAPI description? Afaik to get this running, you have to do the following steps:

  1. Create a certificate/key pair as .pem and .p12
  2. Post the .pem to your SHC
  3. Import the .p12 in your browser
  4. Activate CORS

Now you should be able to use the Bosch apidocs.

Hope that helps!

kossikater commented 2 years ago

Hi there, I'm facing the same issue. But unfortunately, the solution is not sufficient for me to follow since I'm no expert here. Some more guidance would be hifghly appreciated since I'd like to fetch data from my SMC with Python to create a nice Dashboard. Many thanks!

tschamm commented 2 years ago

A python binding for SHC can be found here: https://github.com/tschamm/boschshcpy