Binding request: Viessmann (API/ViCare - not vitotronic)

Hi @rogrun,
great binding. I am experimenting a few days and it’s awesome.
Currently there is one issue which I cannot solve. When using the setSchedule for heatingcircuit I get a bad request error (details see below). I traced the logs and found following:

20:28:00.065 [TRACE] [g.viessmann.internal.api.ViessmannApi] - API: Post request json is {"newSchedule":" {"mon":[{"start":" .....

I guess the quotas are not correct and the payload itself do not need to be send in quotas.
It should be changed to

'{"newSchedule": {"mon":[{"start":" .....

Or am I wrong? If so, what else could be the problem?

I join marbon87 and would like to invite you to a virtual beer. :beers:
Thanks…

complete trace:

20:28:00.063 [INFO ] [openhab.event.ItemCommandEvent       ] - Item 'ViessmannDevice_HeatingscheduleCircuit0' received command  {"mon":[{"start":"06:00","end":"10:00","mode":"normal","position":0},{"start":"16:00","end":"21:30","mode":"normal","position":1}],"tue":[{"start":"06:00","end":"10:00","mode":"normal","position":0},{"start":"16:00","end":"21:30","mode":"normal","position":1}],"wed":[{"start":"06:00","end":"10:00","mode":"normal","position":0},{"start":"16:00","end":"21:30","mode":"normal","position":1}],"thu":[{"start":"06:00","end":"10:00","mode":"normal","position":0},{"start":"16:00","end":"21:30","mode":"normal","position":1}],"fri":[{"start":"06:00","end":"10:00","mode":"normal","position":0},{"start":"16:00","end":"21:30","mode":"normal","position":1}],"sat":[{"start":"06:00","end":"10:00","mode":"normal","position":0},{"start":"20:00","end":"21:30","mode":"normal","position":1}],"sun":[{"start":"06:00","end":"10:00","mode":"normal","position":0},{"start":"16:00","end":"21:30","mode":"normal","position":1}]}
20:28:00.064 [INFO ] [openhab.event.ItemStatePredictedEvent] - Item 'ViessmannDevice_HeatingscheduleCircuit0' predicted to become  {"mon":[{"start":"06:00","end":"10:00","mode":"normal","position":0},{"start":"16:00","end":"21:30","mode":"normal","position":1}],"tue":[{"start":"06:00","end":"10:00","mode":"normal","position":0},{"start":"16:00","end":"21:30","mode":"normal","position":1}],"wed":[{"start":"06:00","end":"10:00","mode":"normal","position":0},{"start":"16:00","end":"21:30","mode":"normal","position":1}],"thu":[{"start":"06:00","end":"10:00","mode":"normal","position":0},{"start":"16:00","end":"21:30","mode":"normal","position":1}],"fri":[{"start":"06:00","end":"10:00","mode":"normal","position":0},{"start":"16:00","end":"21:30","mode":"normal","position":1}],"sat":[{"start":"06:00","end":"10:00","mode":"normal","position":0},{"start":"20:00","end":"21:30","mode":"normal","position":1}],"sun":[{"start":"06:00","end":"10:00","mode":"normal","position":0},{"start":"16:00","end":"21:30","mode":"normal","position":1}]}
20:28:00.064 [TRACE] [ssmann.internal.handler.DeviceHandler] - ChannelUID: {setScheduleUri=https://api.viessmann.com/iot/v1/equipment/installations/xxxx/gateways/xxxxx/devices/0/features/heating.circuits.0.heating.schedule/commands/setSchedule, setScheduleParams=newSchedule, feature=heating.circuits.0.heating.schedule, command=setSchedule}
20:28:00.065 [TRACE] [ssmann.internal.handler.DeviceHandler] - Received StringType Command for Channel org.openhab.core.thing.binding.builder.ChannelBuilder$ChannelImpl@7937cdeb
20:28:00.065 [TRACE] [g.viessmann.internal.api.ViessmannApi] - API: Post request json is '{"newSchedule":" {"mon":[{"start":"06:00","end":"10:00","mode":"normal","position":0},{"start":"16:00","end":"21:30","mode":"normal","position":1}],"tue":[{"start":"06:00","end":"10:00","mode":"normal","position":0},{"start":"16:00","end":"21:30","mode":"normal","position":1}],"wed":[{"start":"06:00","end":"10:00","mode":"normal","position":0},{"start":"16:00","end":"21:30","mode":"normal","position":1}],"thu":[{"start":"06:00","end":"10:00","mode":"normal","position":0},{"start":"16:00","end":"21:30","mode":"normal","position":1}],"fri":[{"start":"06:00","end":"10:00","mode":"normal","position":0},{"start":"16:00","end":"21:30","mode":"normal","position":1}],"sat":[{"start":"06:00","end":"10:00","mode":"normal","position":0},{"start":"20:00","end":"21:30","mode":"normal","position":1}],"sun":[{"start":"06:00","end":"10:00","mode":"normal","position":0},{"start":"16:00","end":"21:30","mode":"normal","position":1}]}"}'
20:28:00.065 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'ViessmannDevice_HeatingscheduleCircuit0' changed from {"mon":[{"start":"06:00","end":"10:00","mode":"normal","position":0},{"start":"16:00","end":"21:30","mode":"normal","position":1}],"tue":[{"start":"06:00","end":"10:00","mode":"normal","position":0},{"start":"16:00","end":"21:30","mode":"normal","position":1}],"wed":[{"start":"06:00","end":"10:00","mode":"normal","position":0},{"start":"16:00","end":"21:30","mode":"normal","position":1}],"thu":[{"start":"06:00","end":"10:00","mode":"normal","position":0},{"start":"16:00","end":"21:30","mode":"normal","position":1}],"fri":[{"start":"06:00","end":"10:00","mode":"normal","position":0},{"start":"16:00","end":"21:30","mode":"normal","position":1}],"sat":[{"start":"06:00","end":"10:00","mode":"normal","position":0},{"start":"20:00","end":"21:30","mode":"normal","position":1}],"sun":[{"start":"06:00","end":"10:00","mode":"normal","position":0},{"start":"16:00","end":"21:30","mode":"normal","position":1}]} to  {"mon":[{"start":"06:00","end":"10:00","mode":"normal","position":0},{"start":"16:00","end":"21:30","mode":"normal","position":1}],"tue":[{"start":"06:00","end":"10:00","mode":"normal","position":0},{"start":"16:00","end":"21:30","mode":"normal","position":1}],"wed":[{"start":"06:00","end":"10:00","mode":"normal","position":0},{"start":"16:00","end":"21:30","mode":"normal","position":1}],"thu":[{"start":"06:00","end":"10:00","mode":"normal","position":0},{"start":"16:00","end":"21:30","mode":"normal","position":1}],"fri":[{"start":"06:00","end":"10:00","mode":"normal","position":0},{"start":"16:00","end":"21:30","mode":"normal","position":1}],"sat":[{"start":"06:00","end":"10:00","mode":"normal","position":0},{"start":"20:00","end":"21:30","mode":"normal","position":1}],"sun":[{"start":"06:00","end":"10:00","mode":"normal","position":0},{"start":"16:00","end":"21:30","mode":"normal","position":1}]}
20:28:00.069 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'ViessmannConnectBridge_CountAPICalls' changed from 76 to 77
20:28:00.417 [TRACE] [g.viessmann.internal.api.ViessmannApi] - API: Response took 351 msec: {"viErrorId":"req-db53ba0442284b1aa25b09484fc2ff5e","statusCode":400,"errorType":"BAD_REQUEST","message":"Request has wrong structure in URL or provided parameters","extendedPayload":{"reason":"Invalid request payload JSON format"}}
20:28:00.418 [WARN ] [g.viessmann.internal.api.ViessmannApi] - ViError: Request has wrong structure in URL or provided parameters | Reason: Invalid request payload JSON format

Hi @sledge2712

I’ll look around for this issue in the next few days. I’m a bit busy at the moment.

Best Ronny

Hi @sledge2712 ,

I fixed this issue. Please download the new version and put it into the addons folder.
Let me know if it works. So that I can publish this into the Smarthome/J Repo

https://lu-media.de/org.smarthomej.binding.viessmann-3.2.11-SNAPSHOT.jar

@sledge2712 and @marbon87 thanks for the beer :beer:

1 Like

Hi @rogrun ,
perfect…

2022-04-04 07:14:00.971 [TRACE] [smann.internal.handler.DeviceHandler] - ChannelUID: {setScheduleUri=https://api.viessmann.com/iot/v1/equipment/installations/xx/gateways/xxx/devices/0/features/heating.circuits.0.heating.schedule/commands/setSchedule, command=setSchedule, feature=heating.circuits.0.heating.schedule, setScheduleParams=newSchedule}
2022-04-04 07:14:00.971 [TRACE] [smann.internal.handler.DeviceHandler] - Received StringType Command for Channel org.openhab.core.thing.binding.builder.ChannelBuilder$ChannelImpl@1a5a8ac4
2022-04-04 07:14:00.971 [TRACE] [.viessmann.internal.api.ViessmannApi] - API: Post request json is '{"newSchedule":{"mon":[{"start":"05:00","end":"10:00","mode":"normal","position":0},{"start":"16:00","end":"21:30","mode":"normal","position":1}],"tue":[{"start":"06:00","end":"10:00","mode":"normal","position":0},{"start":"16:00","end":"21:30","mode":"normal","position":1}],"wed":[{"start":"06:00","end":"10:00","mode":"normal","position":0},{"start":"16:00","end":"21:30","mode":"normal","position":1}],"thu":[{"start":"06:00","end":"10:00","mode":"normal","position":0},{"start":"16:00","end":"21:30","mode":"normal","position":1}],"fri":[{"start":"06:00","end":"10:00","mode":"normal","position":0},{"start":"16:00","end":"21:30","mode":"normal","position":1}],"sat":[{"start":"06:00","end":"10:00","mode":"normal","position":0},{"start":"20:00","end":"21:30","mode":"normal","position":1}],"sun":[{"start":"06:00","end":"10:00","mode":"normal","position":0},{"start":"16:00","end":"21:30","mode":"normal","position":1}]}}'
2022-04-04 07:14:01.726 [TRACE] [.viessmann.internal.api.ViessmannApi] - API: Response took 754 msec: {"data":{"success":true,"reason":"COMMAND_EXECUTION_SUCCESS"}}

Thanks for this quick reply and fixing the issue.
Send me your paypal-adress so I can support the project a little bit…
Regards

@rogrun : question from a newcomer to hab : can I expect this great work to be « officialzed » at openhab portal level (vs loading from your web site ) ?
Thanks Community.

I’m on the 3.3 milestone version and do see this binding under " Other Addons".
Does that help?

Sorry but I do not find it (I still run 3.2).
What’s the precise name of the binding please ?

Thanks !

I think in this case you have to add the URL in the following settings menue: https://download.smarthomej.org/addons.json

How do I change the slope and shift of a circuit’ heating curve? I tried with a stepper widget but the value is reset after some time.

2022-05-14 20:16:59.481 [INFO ] [openhab.event.ItemCommandEvent ] - Item ‘ViessmannWarmepumpe_HeatingcurveCircuit0shift’ received command -1

2022-05-14 20:16:59.484 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item ‘ViessmannWarmepumpe_HeatingcurveCircuit0shift’ predicted to become -1

2022-05-14 20:16:59.500 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘ViessmannWarmepumpe_HeatingcurveCircuit0shift’ changed from -2 to -1

2022-05-14 20:17:57.498 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘ViessmannWarmepumpe_HeatingcurveCircuit0shift’ changed from -1 to -2