Page 1 of 1

How can I set max boiler temp from LUA?

Posted: Monday 06 March 2023 17:08
by manjh
I have been using the OTWG plugin for a long time.
Over the past year, I have been fine tuning some settings in the boiler to optimize it.
The max boiler temperature is an important variable: I brought it down from 80'C to about 50, but during the cold weather period this proved to be too optimistic. So I increased it to 60'C, and it now performs OK.
The changes were all done manually on the control panel of the Remeha Calenta boiler.

I was wondering if it is possible to change the boiler setting from a LUA script. This would make it possible to set the value based on the outside temperature, for instance.
Can anyone give me a hint, perhaps even a script example of how to inject a command?

Re: How can I set max boiler temp from LUA?

Posted: Monday 06 March 2023 17:57
by willemd
Looking at the OTGW specification here:
http://otgw.tclcode.com/firmware.html#configuration

you probably have to give a "SH=xx" command or a "CS=xx" command where xx is the desired temperature.
I am not sure which one to use and the responsibility is all yours ....(is it to set a maximum or is it to switch the heating on? will it stop automatically? is it safe?)

Anyway, in domoticz (dzvents, not lua) you can use something like this to send a command to the Opentherm Gateway:

Code: Select all

domoticz.openURL('http://127.0.0.1:8080/json.htm?type=command&param=sendopenthermcommand&idx=8&cmnd=TC=16')

The 8 in idx=8 is the idx number of the Opentherm gateway in the hardware tab, so you need to adapt it to your setting.
The TC=16 is the command I use to set the thermostat setpoint to 16 so that needs to be replaced by your command.

Re: How can I set max boiler temp from LUA?

Posted: Monday 06 March 2023 18:03
by willemd
and, for testing, you can send manual commands from the command box in the hardware setup of the OTGW.

Re: How can I set max boiler temp from LUA?

Posted: Monday 06 March 2023 21:46
by manjh
Looking at the document with the commands, I would think SH is the one. But when I try the command via the test command field in the OTGW hardware line, any value higher than 60 is refused with response BV ("Bad Value"). So, realistically, this cannot be the max boiler temperature. I am quite sure it can be 80 or 90, since this is usually the default in new boilers...

Re: How can I set max boiler temp from LUA?

Posted: Tuesday 07 March 2023 10:14
by willemd
In your first post you mentioned that you did set the maximum to 60 and now you are asking it to go over the maximum? Could that be the cause of the error message?

Re: How can I set max boiler temp from LUA?

Posted: Tuesday 07 March 2023 12:25
by BartSr
Imho you should use blockly together with a dummy thermostat device.
just a few items to use. But also dzVents is very easy using command:
according Wiki :Thermostat set point
- setPoint: Number.
- updateSetPoint(setPoint):Function. Supports command options.

-Bart

Re: How can I set max boiler temp from LUA?

Posted: Tuesday 07 March 2023 12:54
by manjh
willemd wrote: Tuesday 07 March 2023 10:14 In your first post you mentioned that you did set the maximum to 60 and now you are asking it to go over the maximum? Could that be the cause of the error message?
Correct, I did want to adjust the maximum boiler water temperature to (or below) 60 'C.
But my problem is the fact that it is impossible to set it anything higher: this may indicate that I am playing with the wrong command! The max boiler temp should be able to be set to 80 or 90.

Re: How can I set max boiler temp from LUA?

Posted: Tuesday 07 March 2023 12:57
by manjh
BartSr wrote: Tuesday 07 March 2023 12:25 Imho you should use blockly together with a dummy thermostat device.
just a few items to use. But also dzVents is very easy using command:
according Wiki :Thermostat set point
- setPoint: Number.
- updateSetPoint(setPoint):Function. Supports command options.

-Bart
I am not trying to set the thermostat set point, but the maximum boiler water temperature ("ketelwater temp").
By setting this to a lower value, it makes the boiler send water into the system that is not so hot. Since I have under-floor heating, it makes no sense to send 85'C water into the system, since the floor thermostat will reduce it to 35'C anyway.
Decreasing the boiler temp will also decrease loss of energy in the pipes.

Re: How can I set max boiler temp from LUA?

Posted: Tuesday 07 March 2023 15:13
by willemd
manjh wrote: Tuesday 07 March 2023 12:54
willemd wrote: Tuesday 07 March 2023 10:14 In your first post you mentioned that you did set the maximum to 60 and now you are asking it to go over the maximum? Could that be the cause of the error message?
Correct, I did want to adjust the maximum boiler water temperature to (or below) 60 'C.
But my problem is the fact that it is impossible to set it anything higher: this may indicate that I am playing with the wrong command! The max boiler temp should be able to be set to 80 or 90.
What I mean is: on the boiler itself, via the control panel, you have set the maximum manually to 60 and now you give it a command via OTGW to go higher.

Easy to test: change the manual setting to 90 on the boiler and then send the same OTGW command again. Same error?

Re: How can I set max boiler temp from LUA?

Posted: Tuesday 07 March 2023 15:54
by manjh
willemd wrote: Tuesday 07 March 2023 15:13
manjh wrote: Tuesday 07 March 2023 12:54
willemd wrote: Tuesday 07 March 2023 10:14 In your first post you mentioned that you did set the maximum to 60 and now you are asking it to go over the maximum? Could that be the cause of the error message?
Correct, I did want to adjust the maximum boiler water temperature to (or below) 60 'C.
But my problem is the fact that it is impossible to set it anything higher: this may indicate that I am playing with the wrong command! The max boiler temp should be able to be set to 80 or 90.
What I mean is: on the boiler itself, via the control panel, you have set the maximum manually to 60 and now you give it a command via OTGW to go higher.

Easy to test: change the manual setting to 90 on the boiler and then send the same OTGW command again. Same error?
I had already thought of that, but it did not change behaviour. It still throws an error on anything higher than 60.

Re: How can I set max boiler temp from LUA?

Posted: Tuesday 07 March 2023 16:26
by willemd
Maybe you find some more expertise at the OTGW forum:
https://www.domoticaforum.eu/viewforum.php?f=75

have a look at this thread:
https://www.domoticaforum.eu/viewtopic. ... 6bc9a74d59

Re: How can I set max boiler temp from LUA?

Posted: Tuesday 07 March 2023 20:35
by manjh
willemd wrote: Tuesday 07 March 2023 16:26 Maybe you find some more expertise at the OTGW forum:
https://www.domoticaforum.eu/viewforum.php?f=75

have a look at this thread:
https://www.domoticaforum.eu/viewtopic. ... 6bc9a74d59
OK, that helps. The discussion in that thread shows that this is not really straightforward. I wasn't doing anything wrong.
I will think about this some more, and then decide if I want to go any further with this, or stick to the manual change of the max temp every once in a while...

Re: How can I set max boiler temp from LUA?

Posted: Tuesday 07 March 2023 20:38
by BartSr
manjh wrote: Tuesday 07 March 2023 12:57
BartSr wrote: Tuesday 07 March 2023 12:25 Imho you should use blockly together with a dummy thermostat device.
just a few items to use. But also dzVents is very easy using command:
according Wiki :Thermostat set point
- setPoint: Number.
- updateSetPoint(setPoint):Function. Supports command options.

-Bart
I am not trying to set the thermostat set point, but the maximum boiler water temperature ("ketelwater temp").
By setting this to a lower value, it makes the boiler send water into the system that is not so hot. Since I have under-floor heating, it makes no sense to send 85'C water into the system, since the floor thermostat will reduce it to 35'C anyway.
Decreasing the boiler temp will also decrease loss of energy in the pipes.
Sorry, misread your question. Meanwhile, I just moved to dzVents, I would 'upgrade' your scripts to dzVents. Easier and more powerfull.
-Bart