Controme Smart-Heat

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?

Hi Community

After long time of troubleshooting I found the problem(s).

  1. Change the Item from Number:Temperature to Number only @hmerk Thanks to Hans!

  2. The thing file created with the tool from @BoBiene had a error inside. There was two times password=password= I change it to password=

The challenge was the multiple errors…

3 Likes

Hi @mdnx, @zwinsch & @Mats,

I’m planning to implement a binding for controme.

Is anybody of you interested in supporting?

1 Like

Yes, I would support you.

1 Like

@zwinsch as you already did a deep-dive into the mystery of the controme-universe: do you know the logic behind the mac-addresses / id types of the sensors? In the get-temps i only have the id and description and want to identify if it is a temprature or a humidity value…

Great initiative @bo Biene.
I would support, rather in testing etc, as my programming capabilities and capacities are limited.

1 Like

@mdnx / @flame4ever you can start to take a look at the initial version Controme Binding - Add-ons / Bindings - openHAB Community supporting currently reading of the sensors and the room items.

I am also be interested in the controme binding and could offer help or testing.

I have a “little” Problem with my setup. I used your script - which works great - and load the file into openhab (via the files, not via the import). I can see all items and the controme thing. The problem is, that not alle items shows the values. And which items are showing the values, is changing after every reboot.
As an example, yesterday evening aver updating OH and rebooting, the oudside temperature and some room temperatures not getting values. And after rebooting todays morning, the outside temperature is there, but some other values are gone which are available yesterday. I am talinkg from the values, not from the items. The items are “online” (Sorry for my bad english) but not getting values.

And the second problem is, that the values for humidity are not shown as humidty - even if i change from to in the files…

Has someone an idea whats going wrong ?