BoschSmartHome / bosch-shc-api-docs

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

iOS Widget open doors/windows #17

Closed JB1985 closed 4 years ago

JB1985 commented 4 years ago

Hello,

is it possible to read the information from the ios widget "Open doors/windows" with the API?

If yes, how?

IMG_5648

philbuettner commented 4 years ago

Hi JB,

the widget is computing the status by

  1. requesting all Door/Window-Contact services with https://192.168.0.10:8444/smarthome/devices/{deviceId}/services/ShutterContact

  2. and evaluating if the value is set to "OPEN"

Hope that helps! Phil

JB1985 commented 4 years ago

OK thanks. I thought there would be a fixed scenario as than to check all individually.

philbuettner commented 4 years ago

Well, you could get all services at once with: https://192.168.0.10:8444/smarthome/services

And then check each service for the serviceId "ShutterContact" with value set to "OPEN". But yes, you need to check each service individually.

philbuettner commented 4 years ago

Hi JB1985,

we added an API function to the Postman Collection v0.5. Now you are able to GET open door and window states of all related devices at once with the following request: {{shc_api}}/doors-windows/openwindows

Happy testing, Phil