BoschSmartHome / bosch-shc-api-docs

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

GET PUT {{shc_api}}/devices/{{device_id}}/services/RoomClimateControl/state #114

Closed ilja-stas closed 3 days ago

ilja-stas commented 4 days ago

Hi Bosch-folks,

{{shc_api}}/devices/{{device_id}}/services/RoomClimateControl/state that is not working for me. I have Bosch Smart Home Radiator Thermostat II. It's also not working from Postman. I can get the current temperature. But I cannot read and set the desired temperature. I get: Response Body: {"@type":"JsonRestExceptionResponseEntity","errorCode":"ENTITY_NOT_FOUND","statusCode":404}

Everything else is working but if call avalaible services with {shc_api}/smarthome/devices/{device_id}/services I also don't see this service.

Is there a bug or I'm doing something wrong?

hxmelab commented 4 days ago

Hi Ilja,

It seems you might be trying to control the temperature using the individual thermostat device instead of the RoomClimateControl virtual device.

The RoomClimateControl is designed to manage the overall temperature of the room. If you have multiple thermostats in the same room, using RoomClimateControl will allow you to set the desired temperature for all of them at once.

Hence, try setting the temperature through the RoomClimateControl service.

Hope that helps.

sebastianharder commented 3 days ago

The deviceId of the virtual RoomClimateControl looks like this: roomClimateControl_hz_1

ilja-stas commented 3 days ago

Thanks that worked finally. But it's not intuitive. I got the deviceId viaurl = f"{shc_api}/smarthome/devices": Response:

 "@type": "device",
        "rootDeviceId": "64-da-a0-40-d9-7e",
        "id": "roomClimateControl_hz_3",
        "deviceServiceIds": [
            "ThermostatSupportedControlMode",
            "TemperatureLevelConfiguration",
            "RoomClimateControl",
            "TemperatureLevel"
        ],
        "manufacturer": "BOSCH",
        "roomId": "hz_3",
        "deviceModel": "ROOM_CLIMATE_CONTROL",
        "serial": "roomClimateControl_hz_3",
        "iconId": "icon_room_bathroom_rcc",
        "name": "-RoomClimateControl-",
        "status": "AVAILABLE",
        "childDeviceIds": [
            "hdm:ZigBee:30exxxxxx289fa"
        ],
        "supportedProfiles": [],
        "installationTimestamp": 0
    }

get and put is working that via:

device_id = "roomClimateControl_hz_3" 
url = f"{shc_api}/smarthome/devices/{device_id}/services/RoomClimateControl/state"