Viessmann Component


#9

Hey guys,

Have been testing it during a week now and it works perfectly.
In the coming days I will upload it to github and share it with you.

Have a nice new year!
Will get back to you soon!


#10

Perfect timing for me -I was just debating with myself if I should try to code a Viessmann-integration myself when I saw your post here. Much appreciated if you can publish what you’ve done so far!


#11

Hi all,

finally found some time to document it a little bit and as promised, here you go: https://github.com/geertmeersman/homeassistant

If you would have questions, just shoot.


#12

The script works quite well but I would prefer a fully integrated custom component for home assistant.
I started writing a component today and it seems to work (at least for the boiler temperature which I am currently creating a sensor for).

I’ll share it as soon as it has reached a useable state.


#13

@oischinger could you please put your code (in whatever state that is, even broken) in a Gist or a GitHub repo?

I’d like to create a custom component but if you already have a boilerplate working, I’d rather start from there and then work it up from there.

I just need the initial boilerplate and then I can take care of the rest.

Thank you.


#14

I just uploaded the current state to https://github.com/oischinger/ha_vicare
It’ll give you some sensors but no control yet.

Also the component has to be made async and ideally the code for accessing the vicare web services needs to be separated into a plain python library.

@geertmeersman : i took over quite some code from you. I hope you don’t mind.

By the way: some of the sensors don’t return any data for me. I’ll have to dig deeper why that is.

Regards, Hans


#15

Hi Hans,

for sure I don’t mind :slight_smile: Happy I could contribute a bit

Geert


#16

@oischinger ,

regarding the sensors that don’t return any data, which ones do you refer to?
I made a script to run through all sensors, and to check which ones did return anything for my installation. The Viessmann API contains quite a list, but depending on the installation it will, or won’t return data…

Geert


#17

thanks @oischinger and @geertmeersman for kicking this off… I’m sure we’ll come up with something functional in the end :smiley:

btw, @geertmeersman what’s up with the client_id and client_secret? I’m not sure where they are take from :confused:

@oischinger I think that the path taken by @geertmeersman of creating a “climate” component was better… any specific reason to go with the sensor component over the climate one?


#19

@eldios the client_id and client_secret come from the initial french forum post, it’s coming from the guy that analysed the communication flow for the protocol.
In fact is is identifying an android/ios application. It is not that important, since you still need to provide your vicare username/password. So in my opinion, no security risk involved here


#20

@eldios I also believe a climate component makes a lot of sense especially when programming the heater.

But a lot of data from vicare is just not covered by the climate component and additional sensors might make sense. Since I was mostly interested in monitoring I started with the sensors.


#21

@geertmeersman I am getting no data for e.g. the consumption sensors (gas and power). heating.gas.consumption.heating just returns nothing.
This is weird because I can retrieve the data with the old vitotrol plus app.


#22

A lot happening here.
I read the first post and didn’t realize that other people were working in //.
I wrote a python library:


Most of the functions are there but not all API endpoints work with my installation. It’s interesting to notice that the “Comfort temperature” and the “holiday schedule” are still in the API. I didn’t try the holiday feature yet but you can configure a comfort temperature and activate/deactivate it.

It’s already on PyPi. I’ll start writing a module in the coming days. I don’t really want to go trough MQTT and now I have my lib ready so…

Also, in the case of my installation I would need a climate and a water heater component.

@oischinger not all sensors are present.
The easiest way to check using https://www.getpostman.com
You easily browse the API and list the endpoints active for your installation.


#23

@somos Your library is exactly what would be needed for a “proper” home assistant component and it greatly simplifies the code and worked right away.
I updated the custom component to use PyViCare instead of directly calling the vicare API:

@eldios Are you already working on a climate component or should I start writing something?


#24

@oischinger thanks for the feedback
I think you should start writing a Viessmann platform with 3 components:

  • Climate for the heating
  • Water heating
  • Sensor for the external and room temperature
    But I’m not a HA expert yet.
    I was planning to write the component but you already started something so happy to contribute if you want.

#25

Nope I only had time to do some quick tests, so please go on and continue on your repo.

I also think it’s a good idea yo keep your repo as a reference and send you patches and PRs to try to centralize efforts.

At least that’s what I’ll do :slight_smile:


#26

As an experiment I created a climate component and it turned out to be quite simple to create such a component.
Now here comes the “but”:
My Viessmann heater is for the whole house. It doesn’t even have a room sensor and I can’t really show a meaningful “current temperature” by any data from the ViCare API (Maybe it would make more sense to use some Zigbee temperature sensor from my living room?)

In the end one wouldn’t be able to do more than

  • set the target temperature
  • set the modes

Seems like the climate component has lots of features for AC devices which just make no sense for us. I was hoping for some support for programming start/stop schedules and so on.

Anyway I will experiment a little more with the climate component and see what we can achieve.


#27

@oischinger I’ll take your copy from your repo and also test it out.

In my case I have a Nest thermostat in the living room so I can couple the room temperature taken by that and plan the heating schedule from the heaters accordingly… I guess…

Anyway the more we have, the merrier :smiley:

@somos opened a PR and an issues on your repo. :slight_smile:


#28

Here’s my take on a climate component:

See this commit on GitHub

  • The on/off changes the mode between dhwAndHeating and standby.
  • The current temperature is the room sensors temperature if available or else the boiler temperature
  • The target temperature is always the temperature for the current program (this means that in reduced you cannot set the temperature for normal)
  • You can select all programs reported by getPrograms in the dropdown. Not all of them work and you cannot turn off e.g. “comfort” once you enabled it. We really need to think about what options we want in that dropdown and will maybe have to create our own logic for turning on/off stuff
  • Holiday mode toggle turns on holiday program or switches back to normal. This does however not work since I couldn’t figure out how to program the holiday start/end dates

I don’t really like the outcome. It works but the user experience is not really great. Mostly because the climate component of HA seems to be designed for AC devices and the Viessmann heater has totally different configuration parameters.

Personally I believe that creating a couple of sensors and switches plus some nice Lovelace config could work out much better.

What do you think?


#29

Yes, I have been trying to wrap my head around this as well and I don’t feel the climate component is optimal. My unit is a Vitocal 343G (a geothermal heat pump) so while controlling modes etc is probably the same as a gas heater, I would be interested to monitor some additional parameters that are specific to a heat pump setup (brine temperature, for example, to monitor how the well temperature changes over season, as well as COP -the coefficient of performance, or how efficient the energy extraction from the well is). I believe these parameters are available through ViCare but I havn’t been able to confirm it yet (I’m a manager since a few years back and the tie really restricts the blood flow to the brain so my coding skills isn’t what they used to be.Now you know why managers mostly behave like morons :slight_smile: ).