I want to share how I managed to controll the UVR1611 with the CMI via HomeAssistant. Not only read the sensors (temperature, heating pump on/off) but also controlling the heating pump / the heating circuits. I am now even able to controll the heating weather dependent and don’t need to manually turn things on and off for saving a lot of heating costs. I think other models, which can be controlled via the CMI are also possible, but I can’t confirm that.
Step 1: CMI Online Portal
Make sure you are logged in via the CMI Online portal as the expert user for reading the sensor values and controlling the switches. Make sure to get access via the lan-ip-adress, not the online webadress.
Step 2: Get the UVR1611 sensor values to HomeAssistant
There are 2 possibilities for that:
Variant 1: (the new and way more simple and the recommended one)
Get the Custom Home Assistant integration to read data from a C.M.I.
When I tried to get the CMI to my HomeAssistant, there wasn’t this integration so I had to use a workaround with variant 2, but I would definitly recommend variant 1, because its way more simple.
Variant 2: (the old one and not the recommended one)
In my configuration.yaml I set:
rest:
- authentication: basic
username: "****"
password: "****"
scan_interval: 30
resource: http://****:****@192.168.0.11/INCLUDE/api.cgi?jsonnode=3&jsonparam=I,O,Na,Nd
sensor:
- name: "cmi_og_3"
value_template: '{{ value_json.cmi_og_3 }}'
json_attributes:
- "Header"
- "Data"
- "Status"
Then in my templates.yaml I set:
- sensor:
- name: "CMI OG 3 Status"
state: '{{ states.sensor.cmi_og_3.attributes["Status"] }}'
- sensor:
- name: "CMI OG Vorlauftemperatur Heizkreis Süden"
state: '{{ states.sensor.cmi_og_3.attributes["Data"]["Inputs"][0]["Value"]["Value"] }}'
- sensor:
- name: "CMI OG Vorlauftemperatur Heizkreis Norden"
state: '{{ states.sensor.cmi_og_3.attributes["Data"]["Inputs"][1]["Value"]["Value"] }}'
- sensor:
- name: "CMI OG Rücklauftemperatur Heizkreis"
state: '{{ states.sensor.cmi_og_3.attributes["Data"]["Inputs"][3]["Value"]["Value"] }}'
- sensor:
- name: "CMI OG Temperatur Aussen"
state: '{{ states.sensor.cmi_og_3.attributes["Data"]["Inputs"][4]["Value"]["Value"] }}'
- sensor:
- name: "CMI OG Temperatur Innen"
state: '{{ states.sensor.cmi_og_3.attributes["Data"]["Inputs"][5]["Value"]["Value"] }}'
Again, that’s now unnecessarily because there is the custom integration for that, but I just wanted to share it here how I had done this without the integration.
Step 3: Rename the values to the correct term.
Just compare the values from the CMI with the new values from the imported ones in HomeAssistant and give them clear names.
That’s how it should look like in HA then:
So now we are able to READ the CMI values, but not controlling it. It took me ages to find a solution to controll the CMI via HomeAssistant. Finally I randomly read that comment from emign in the issues section from a different topic:
So you are able to controll the CMI via HTTP GET request and I knew you can do something like this without problems with NodeRed.
Step 4: Controll the CMI via HTTP GET requests in NodeRed in HA
In NodeRed there is the Node “http request”.
Now we need to figure out which http adress switches for example the heating circuit to normal / abgesenkt / standby / zeit/auto .
Go to your CMI Online Portal (via local ip adress), then to your “Knoten” and then to “Funktionsübersicht”. Now activate the developer tools in Chrome.
You can see this:
Now we want to controll the heating circuit 1. So we press the double arrow button and now we can see on the right side all the things we need for the http adress:
The http adress should look like this: http://username:password@ipadress/menupage.cgi?page=0301580E&changeadr=039003301D&changeto=1
Get the menupage number, the changeadr number and the changeto number from the developer tool section.
We took this adress so the changeto number is 1 > so with that adress it will change the heatingt circuit to “Standby”. Now we put this inside the http request node in NodeRed and rename it.
Now we do this exact same thing with all the heating circuits and also for the heating pump:
Step 5: Creating and using input_booleans for controlling
Maybe there is a better method to make the switches but it works for me.
First you create all these helpers in HomeAssistant, one specific helper for one specific http request:
Second in NodeRed you need to setup the nodes so if you switch on the input_boolean for Heating pump On, the other input_booleans for the heating pump switches should turn off.
And now you can make a nice looking dashboard as a control center and start controlling your CMI.
Optional Step 6: Make your heating weather dependent
I’m still trying to figure out good ways to make the weather forecase more reliable, but this is what I got so far:
I’m using the Forecast Solar integration. Now I have my fictional Photovoltaik system. This gives me an estimated amount of kWh of fictional production and now I know how much approximately sun there will be the next day.
So I dont want to activate the heating pump today when the sun is shining the whole next day.
In NodeRed I created some nodes with conditions and in the end it looks like this:
Its definitly not perfect and I still trying to figure out the most effective way, but so far it works fine.
All in all I hope I could help someone! I’m not a developer, I’m just trying to get my whole Home smart as a hobby, so I think there is a better way for sure to controll the UVR1611 via Home Assistant but for me it works like a charm.