Controme Smart-Heat

Hi @mdnx & @Mats,

i have now a version of the tool to use together with the new HTTP v2 binding from OH3:

Things changed with this version:

  • regarding the tool:
    • .NET 5
    • Docker support
  • regarding the autogenerated configuration
    • no rules any more
    • no proxy items
    • generation of http-thing-channels for:
      a. read the current temprature
      b. read and write the target temprature
      c. read the releay states
      d. read and write external sensors (temprature and humidity)
      e. read virtual sensors
      f. read return flow sensors
1 Like

Export works fine, but you need to install .NET5 first

Download .NEt5 runtime from

@BoBiene: Thank you very much for the quick support.

For the Setup of OH3 with Controme I need to learn some more.
Currently I only see the Thing Controme is online. What are the correct settings for the Controme HTTP binding?

i just found this tutorial and added the semantic tags to the item files:

btw. you can use the things file to populate the things and then use the “Add Items from Textual Definition” in dev tools area in the new Web-UI.

After that you can move the created Equipments to the correct group in your semantic model

1 Like

Hi @Mats,

I have just publish a new preview: Release 1.4 beta2 - Added semantic tags · BoBiene/ContromeToOpenHAB (github.com)

you can try this version with the additional item tags the groups should show up in the model.
But if you want to modify the items with the UI you should only place the things file in the config folder and import the items via dev tools and then the import “Add Items from Textual Definition”.

Note: i got an error during import if there was to many items to import. so i had to split the import in two parts

1 Like

Looks very nice!
Worked without any import problems for my house

Now I need to get the communication with my controme server running.

Fellows, I just figured out, that, in case you want to send a temperuature value of external sensor via API, the syntax of the HTTP Get request must be:

mini-server-ip/set/sensor-ID/temperatur/

with trailing backslash, and not, like documented by controme:

mini-server-ip/set/sensor-ID/temperatur

were “temperatur” needs to have the format [dd.dd] always.

BUT: not all numbers are excepted. The Miniserver only accepts a very strange assortment of numbers in the decimals .dd - which is neither rounding nor truncating the muiltiples of .0625 (1/16 degr per bit of the original Dallas DS…). If a value with any other value in the decimals is sent, the date of the last reading becomes actualised, but not the value of the reading.
These are the number controme listenes to:

.00, .06, .12, .19, .25, .31, .38, .44, .50, .56, .62, .69, .75, .81, .88, .94

with this algorithm you may calculate any float to controme accepted digits:

 float temp_coarse= floor(T*2)/2;     // T is true measured float temperature value
 float temp_fine= T-temp_coarse;
 float temp_controme= temp_coarse+ floor(2.0*temp_fine + floor(temp_fine*16) *6.25)/100;

if an other value is sent, the date of the last reading becomes actualised, but not the value of the reading.

Hi @zwinsch,

Thanks for your tip!

Have you already reported this to the Controme support team? Sounds more like a bug to me…

Hi @zwinsch,

i have translated your function to a JS Transform and integrated into the converter-tool:

Release 1.4 beta3 - fix for external temp sensors · BoBiene/ContromeToOpenHAB (github.com)

Hi @BoBiene,

yes, I did, but did not expect an answer. And: I got, what I did expect :wink:

Btw.:
have you recognized: there is no such data-base checking for ID numbers and licenses for Sensors. I did order licences for 4 external, own home brewed temperatures - but I can configure as many external temperatures and also hygros, as I whant, as Long as I use meanignfull IDs consistent to their scheme.
(temperatures start with 28 or 10, hygros with a 26).
The same applies to your own DS18b20, if you whant to add some to the onewire busses: find out ist serial ID, enter it to the configuration plug and go…

I love “open Systems” :wink:
as soon as you install your public key to /pi/.ssh (via editing the contents on the SD by a seccond Pi with Rasperian/Debian running) you can login later as Pi via SSH with no need of a Password.

This way I enabled the Pi to connect to my home-network via WiFi (there was no such option to find in the menues of the stable SW releas I am using) and to act as a WLAN to LAN Bridge - were I could plug the gateway in (no need of an extra router at the location of my Installation of Gateway and Homeserver without LAN Access)

it works great w/o probs. If you are interested, tell me and I will forward the links, with the Information that were enabling me to do all this.

cheers
Karsten

PS/edt:
have you realized? there is an other error (bug) inside the SmartHeat SW, the way the incomming data of the onewire DS temperature sensors is treated: its not only the neither truncating nor rounding of the n/16 values, also the 1/16, 6/16 and 14/16 decimals of each degree (i.e. .06, .38, .88 in the controme-scheme) are completely ignored - never read, if you look to the logging and/or live displays. But: you can set these values via the api for external sensors, and they are treatened/logged by the SW…

1 Like

Hello @BoBiene et. all.,

in Addition to the above, I had some more, strange but interesting findings (including one more severe error):

The method above to send temp. or hygr. data in the form dd.dd works (with the odd decimals in case of temp.) for 0.00…100.00 any number between >100.00 and < 125.00 returns a Error-page… but higher Numbers are accepted, and translated to out= Input/8. so this enables sending data with more precision (in Terms of Resolution) for values starting with +15.62 deg C

1.00 is 0.125deg, and as decimals, (only!) the same odd numbers from above are read (no others) resulting in a possible resolution of somehow 1/8*1/16 - which becomes rounded or truncated to 2 Digits behind the “.”
It works up to Input values 4095.00 … (resulting in 500 deg plus something). above the the Translation of the numbers becomes wired, strting with 0 again but incrementing in steps of 1 and somwhere becoming negative… (more on negative below!)

Similar is Hygrometer data treated. But this has no restrictions concerning the numbers in the decimals.
This leads to, enables you, to log Data (for whatever reason… maybe one likes to have other data in the logs… only tradeoff is: always displayed in Units %) within a value range from 15.62 to 500.00 (and some more) with effectively a resolution in 0.00125 steps!

Example: h_t_t_p://192.168.128.10/set/26_ff_ff_ff_ff_ff_ff_21/1600.01/
results in 200.00125% in the Sensor reading displayed

Carefully with negative values! (Outdoor temp. eg) they are not translated by 1/8 but taken as is, only here I found another BUG: they are always off by 1, and, even worse and certainly buggy, the decimals behind the column are added positively instead of subtracted (for temp. and hygr)
so
Data sent by get request: result displayed for sensor:
00.00, -00.00, are read as 0
-00.25 becomes +0.25
-00.50 becomes +0.5
-00.75 becomes +0.75
-01.00 becomes 0.0
-01.25 becomes -0.75
-01.50 becomes -0.5
-01.75 becomes -0.25
-02.00 becomes -1.0
-02.25 becomes -0.75
-02.50 becomes -0.5
-02.75 becomes -0.25
-03.00 becomes -2.0
-03.25 becomes -1.75
-03.50 becomes -1.5
-03.75 becomes -1.25
asf.

A very –Spock would have called it: “interesting” – algorithm.

Hi,
I have used the tool created @BoBiene to setup my integration with Controme. Reading values works fine. However when trying to set the temparature all I see is a warning in the openhab.log

2021-03-11 18:16:23.202 [WARN ] [p.internal.http.HttpResponseListener] - Requesting ‘http://contromeminiserver/set/json/v1/1/soll/5’ (method=‘POST’, content=‘org.eclipse.jetty.client.util.StringContentProvider@5cbedf’) failed: 403 Forbidden

As a beginner with OH 3 I was struggeling to increase the log level for the http binding to perform some trouble shooting.
I am pretty sure that a wrong password can be ruled out. I copied this from my Postman project where I can run the request without problems.

Any help for the troubleshooting is highly appreciated. Is there a way I can see the request created in the logs?

Hi @ordo,

welcome on board :wink:

Did you check the access right for the user you created inside controme?

Hi @BoBiene,

thanks for your response. As mentioned in my post, using Postman I can use the API with the same user. Means the access right is correct.
I meanwhile managed to get the TRACE level for the http binding activated. I see that in the REST call not just a number but the full string “25 °C” is sent as soll. With the poor quality of error messages from Controme this results in a 403.
See my request from the trace log below. I just could not figure out so far where in the configuration I did make the mistake.

[TRACE] [nding.http.internal.HttpThingHandler] - Sending to ‘http://contromeminiserver.fritz.box/set/json/v1/1/soll/3/’: Method = {POST}, Headers = {Accept-Encoding: gzip, User-Agent: Jetty/9.4.20.v20190813, Content-Type: application/x-www-form-urlencoded}, Content = {soll=25 °C&user=user@domain.mail&password=XYZ123}

What am I missing in the configuration?

sounds like this issue:

is this derived from an Item state? What type of Item - guessing maybe a Quantity type Number:Temperature? You can extract the numerical part of the state in a rule, I expect you can do that in a script too.

Hello,

i have the same problem as @ordo
Created the conf files with the latest tool of @BoBiene
I can read all values from controme but not change the setpoints.

2021-10-03 19:14:08.646 [WARN ] [p.internal.http.HttpResponseListener] - Requesting 'http://192.168.1.8/set/json/v1/1/soll/9/' (method='POST', content='org.eclipse.jetty.client.util.StringContentProvider@34c2fafd') failed: 403 Forbidden

Sitemap

			Setpoint 	item=Controme_Bad_setpoint 		      step=0.2 minValue=15 maxValue=26   

Item

Number:Temperature  Controme_Bad_setpoint               "Soll [% .1f °C]"                   <heating>        (gHeizung)                     {channel="http:url:Controme_D18C7BBA:Michi_Bad_setpoint" }

Thing

Thing http:url:Controme_D18C7BBA "Controme" [ baseURL="http://192.168.1.8/", refresh=30,commandMethod="POST", contentType="application/x-www-form-urlencoded" ] {
	Channels:
		Type number : Michi_Bad_setpoint "Bad soll" [stateExtension="get/json/v1/1/temps/", stateTransformation="JSONPATH:$..raeume[?(@.id==2)].solltemperatur", commandExtension="set/json/v1/1/soll/2/",commandTransformation="REGEX:s/(.+)/soll=$1&user=xxxxxxxxx&password=xxxxxxxxx/g" ] 
}

Hi, i think the user don’t have the right to access or UserName / Password is wrong

Change to Number !!!

Hello Hans,

i tried to delete the :Temperature but doesn’t help.

Number        Controme_Bad_setpoint               "Soll [% .1f °C]"                       <heating>        (gHeizung)                     {channel="http:url:Controme_D18C7BBA:Michi_Bad_setpoint" }

Hello BoBiene,

if i try with a wrong password i can’t read the setpoint value.
With correct password i can at least read the setpoint value but not write a new setpoint.
Knowing that, and because i checked again the correct password, i can exclude this part.

Access right:
I used Controme with OH2.x without problems.
Maybe Controme with an update had modified something?
How can i check the access rights?