eQ-3 thermostat with OpenHAB Smart Home

Hello there,

I am new with OpenHab, first, my English is probably not the best, so sorry for that.
If this is a wrong topic here please delete it before I get a shitstorm :slight_smile:

I will try to explain my problem, I followed a tutorial to link my Bluetooth thermostat (its a very short tutorial)

I can connect the thermostat with my raspberry and open the JSONPath UI by using a link like
“http:RaspberryIpAddr/eq/php/eq3.php?mac=00:1A:22:0F:C4:DD&temperature=24.0&mode=manual”
and now the tricky part and my problem, I create the PHP page and all the other stuff like .items and the .cfg I also use the correct IP (cause in the browser the whole setup works) u can find the PHP page and the .items and .cfg at the link above (tutorial)

but if I am using it with OpenHAB on the basic app, the raspberry won’t connect to the thermostat or something like that, I think Openhab is doing right, cause in the logs I find:
"2019-12-15 00:38:49.656 [ome.event.ItemCommandEvent] - Item ‘thermostat_wz’ received command 10.5

2019-12-15 00:38:49.666 [vent.ItemStateChangedEvent] - thermostat_wz changed from 10 to 10.5

2019-12-15 00:39:45.163 [ome.event.ItemCommandEvent] - Item ‘thermostat_wz_mode’ received command OFF"

so OpenHab giving the State change but the thermostat doesn’t react to it ?!
But if I am doing the same link which is triggered with the PHP Page into my browser, the thermostat works ?!?!

I don’t understand it at all… I hope I can explain my problem and someone can help me :stuck_out_tongue:
and if there are some germans here who want to help, I can do the problem description way better in german :slight_smile:

Well, maybe consider to use one of the german forums :wink:
https://knx-user-forum.de/forum/supportforen/openhab (official, but less employed)

https://openhabforum.de/ (not official but many active users)

Did you read the comment below the tutorial?

I don’t know why everyone wants to use the PHP script… just follow this https://github.com/Heckie75/eQ-3-radiator-thermostat and you can control it via executecommand. Works like a charm

Danke Udo, ich habe mich bereits dort registriert :slight_smile:

@NoneWhereTo
Cause i want a “good” userinterface, so that my girlfriend can operate with it too.
Or am i wrong ?

Greetings

That’s what OH is supposed to do :slight_smile: I’m just talking about the mechanism to operate the thermostat. To set the temp etc is done via the OH interface

oh well, then i need to learn a lot more :slight_smile:

i will try today to create an exec :slight_smile:
I hope it will be successful

ok now i know, why all are using PHP :smiley:
I dont understand Java as much :smiley: :smiley: so i got my reason, i really try to but i dont get the syntax at the moment.

i am still trying to run the project.

i still think openhab doing wrong, cause the whole “comand” works

Number thermostat_wz "Thermostat Wohnzimmer [%.1f °C]"  { http="<[*:GET:http://192.168.178.35/eq/php/eq3.php?mac=00:1A:22:10:71:C8&temperature=25]>[thermostatWohnzimmer:60000:JSONPATH($.temperature)]" }

http.cfg
thermostatWohnzimmer.url=http://192.168.178.35/eq/php/eq3.php?mac=00:1A:22:10:71:C8{Authorization=Basic SECRET}
thermostatWohnzimmer.updateInterval=120000

in the log of openhab, there is no “refresh entry” to see.
I dont know, if openhab is sending a log entry after the code is getting refreshed.
but i think openhab is not sending the comand.

2019-12-22 14:13:37.159 [ome.event.ItemCommandEvent] - Item 'thermostat_wz' received command 20

2019-12-22 14:13:37.173 [vent.ItemStateChangedEvent] - thermostat_wz changed from 20.5 to 20

thats the only log entry i get, it looks “ok” for me but the thermostat doesnt react too it.
But the whole comand works, when i send it as “link” by the browser.

does no one can help ?

Hi Christian,

I would also very much reccomend the solution @NoneWhereTo has suggested, by using the shell script interface from Heckie75

I am using his script for the Playbulb candles and then control them through the Exec Binding

If you go this way as well, I’m sure many others and myself can help you with any issues that the Exec commands might throw at you.

Guys, openHAB is written in Java and will continue to be.
PHP, Exec etc. are just dirty workarounds and not desired as such from a technological perspective.
There’s the max binding available to control the thermostats, what’s wrong with using that ?

Are you saying the Max! binding is compatible with these eq-3 Bluetooth thermostats? I thought Max! only worked on the 868,3 MHz frequency.

Sorry I missed that it’s about BT. No that won’t work with the max binding. It’s a real edge case as BT is not really suited well for that kind of application.

That’s why I suggested Heckie75’s shell script to avoid PHP etc. It would also be possible with the Exec binding alone using gatttool commands, but Heckie75’s shell scripts really make things a lot smoother. As far as I can see this direction is the only ‘easy’ solution for such bluetooth devices as the eq-3 thermostats and Playbulb Candles.

u may have a example for me how to use the exec binding ?
i dont get a idea how to start or how the syntax works.

only worked with C oder “Arduino C”
Openhab is completely new for me… :slight_smile:

Greetings

Have you already installed Heckie75’s shell script interface (via git clone, preferably into the /opt/ directory on your Pi), and are the sample commands working as described on his page?

I’m currently travelling for the next few days, so here is just as a simple quick starter …

Thing definition in a thing file
exec.things

Thing exec:command:zimmername_heizung [command="/opt/eQ-3-radiator-thermostat/eq3.exp 00:11:22:33:44:55 %2$s", interval=0, autorun=true]

in an item file an item definition

String Zimmername_Heizung_Aruments { channel=“exec:command:zimmername_heizung:input” }

Then this item can be used in rules to send a SetTemperature

Zimmername_Heizung_Aruments.sendCommand(“temp 22.5”)

obviously with the hard coded temperature above being a variable value taken from a setpoint or slider input.

or to active/deactivate the boost mode

Zimmername_Heizung_Aruments.sendCommand(“boost”)

Zimmername_Heizung_Aruments.sendCommand(“boost off”)

Once you have familiarised youself with this concept, the info on the Exec Binding page, with additional options like output etc. should show you what other possibilities there are for however you want to control your thermostats.

thank u for that ! :slight_smile:

please don’t hate me :stuck_out_tongue:
I tried a bit by myself and I think i am at a point where google doesnt help me anymore

what have i done…

i created a default.things file with

exec:command:zimmername_heizung [command="/eQ-3-radiator-thermostat/eq3.exp 00:1A:22:0A:91:28 %2$s", interval=0, autorun=true]

also i created the default.items:

String Zimmername_Heizung_Aruments { channel=“exec:command:zimmername_heizung:input” }

If i understand it correctly, with the “things” i create the thermostat (basic command to control it"
and with the %2$s i can place arguments to it which is filled by the .items file correct ? (input)

so that means, when i replace the .items “zimmername_heizung” with temp 22.5
it would be change the .things temporary into something like this:

exec:command:zimmername_heizung [command="/eQ-3-radiator-thermostat/eq3.exp 00:1A:22:0A:91:28 temp 22.5", interval=0, autorun=true]

correct ?

With this setup, I try since yesterday to control one Thermostat without beeing successfull.
My Problem is that i doesnt understand it correctly i think…

Also, the .rules is a bit to much for me at the moment, this is completly new for me.

And the biggest problem for me is, that i cant see until which point the code is running or on which point it doesnt work.
Also i dont understand, how can i trigger the commands ?!
How can i now at which point the command is sended ?
And when its sended can i see that ?!

I really try to get it run only for one thermostat that i can understand the whole code :smiley:

Maybe someone can help me again :stuck_out_tongue:

Thank u guys for your time and patience.

Still traveling, so briefish again.

First of all:

Have you already installed Heckie75’s shell script interface (via git clone, preferably into the /opt/ directory on your Pi), and are the sample commands working as described on his page?

Also he describes that pairing with the thermostat might be needed on his page. has that been done and are the command line commands working properly?

If you haven’t done this and if the commands don’t work for you in the command line as described on Heckie75’s page then none of the following will work either.

The file NEEDS to be called exec.things to correctly define things for the EXEC Binding!

The path you give here is only /eQ-3-radiator-thermostat/eq3.exp …

Is that where you have installed (git cloned) everything, instead of into the opt directory? Not the optimal solution, but should work as well if it also works correctly in this directory by using direct command line commands.

.items files can be named arbitrarily, so default.items will work, or you could use something more descriptive like heater.items

Sort of correct, the item doesn’t get ‘filled’ in the items description but the variable %2$s gets ‘filled’ when sending a command to the item as described in my posting above with

Zimmername_Heizung_Aruments.sendCommand(“temp 22.5”)

This needs to be done in a rule - best to look up the rules document page for very simple rule syntax to start with.

So if your installation Heckie75’s shell script is working correctly directly, and if you have amended the path correctly to your installation location in the thing description, and if you have correctly renamed the thing file to exec.things, you should be a good deal closer to it working.

From what you wrote I also gather that you understand the concept of the thing definition more now with the variable, so in the future you might want to define more than one thing (different things do need to be named differently ;), with one already having ‘temp’ hard coded into it and you only using a variable for the actual temperature.

1 Like

Hey,

thanks for your time while traveling

Yes, the Heckie Script works perfectly. I cloned it, maybe not in the correct path but it works
I also control my thermostat with it.

The path is okay I think, I will change it later :stuck_out_tongue:
But for the moment it works correctly.

back to exec :slight_smile:

So I renamed the file into exec.things

I created a simple rule (hopefully)

rule “test”
when
System started
then
Zimmername_Heizung_Arguments.sendCommand(‘temp 23.5’)
end

Should that work !? cause… it doesn’t :stuck_out_tongue:
can i use (‘22’) or (“22”) ?

also at openhab:8080 -> paperui have under the point “things” the exec:command:zimmername_heizung
this is correct I think
Must i link an item under the “input” channel? cause openhab shows me no item instead of we created an item ?!

Under Items, I can manually add a string but I don’t know which values to add Label Category parent groups… is this uninteresting for me?

Continuing the discussion from eQ-3 thermostat with OpenHAB Smart Home:

Okay, helps me a lot to fix the problem.
We moved the discussion privately cause my OH skills are very basics to that moment :slight_smile:

What had we done to fix the Problem?

first we set up the exec.things which needs to be named like this.

exec:command:zimmername_heizung [command="/eQ-3-radiator-thermostat/eq3.exp 00:1A:22:0A:91:28 %2$s", interval=0, autorun=true]

also fixed some issues with my default.items

String Zimmername_Heizung_Arguments “Thermostat” {channel=“exec:command:zimmername_heizung:input”}
Switch Zimmername_Heizung_Switch “Heizung An”

added a switch to trigger the command

and created the default.rules

rule “Switch Test”
when
Item Zimmername_Heizung_Switch received command
then
if(Zimmername_Heizung_Switch.state == ON) {
Zimmername_Heizung_Arguments.sendCommand(“temp 25”)
}
end

after this setup works for me, we added a “little” update to the .rules

rule “Switch Test”
when
Item Zimmername_Heizung_Switch received command
then
if (receivedCommand == ON) {
Zimmername_Heizung_Arguments.sendCommand(“temp 25”)
} else if (receivedCommand == OFF) {
Zimmername_Heizung_Arguments.sendCommand(“temp 5”)
}
end

.sitemap

sitemap default label=“Thermostat”
{
Switch item=Zimmername_Heizung_Switch
Setpoint item=Zimmername_Heizung_SetTemp minValue=5 maxValue=30.0 step=0.5
}

with this rule, we say the thermostat to get 2 states ON = 25C OFF= 5C
After i “understand” this setup, I will try to add some more thermostats and more functions like Boost ON / OFF

Also i want to say thanks for all that help ! :slight_smile: