OTGW, a modulating thermostat and fhem?

This Forum is about the Opentherm gateway (OTGW) from Schelte

Moderator: hvxl

Post Reply
joho500
Starting Member
Starting Member
Posts: 6
Joined: Fri Sep 19, 2014 11:16 am

OTGW, a modulating thermostat and fhem?

Post by joho500 »

Hello,

I want your advice on a setup I am working on. I am a beginner on this. Hope you can help.

I am redesigning my central heating system with a FHT thermostat and radiator valve in every room including the living room. I am using a Fhem server to schedule the temperature of the FHT thermostats. I want to move the Honeywell Modulation thermostat to the hall because the hall and bathroom will not have FHT thermostats.
Next, I want the heater to switch on when one or more of the FHT roomthermostats asks for heating. I can do that by Fhem with a FS20 switch connected to the heater but that functions as a on/off switch and I lose the modulating effect.

Can I use the Opentherm Gateway in this setup? I've browsed the website and this forum and understand that I can sent commands to the OTGW to set the temperature of the heater. But there I am lost... What do I need to set? How can I sent the commands? Fhem uses Perl. Can I use that?

Hope you can give me some hints.
Thanks.

Joost
hvxl
Senior Member
Senior Member
Posts: 1965
Joined: Sat Jun 05, 2010 11:59 am
Contact:

Re: OTGW, a modulating thermostat and fhem?

Post by hvxl »

There are basically two parameters you can play with to get your boiler to start heating:
  1. The control setpoint (otgw command CS) specifies a target temperature for the water in the central heating system.
  2. The maximum modulation level (otgw command MM) limits how fast it may try to get there.
In addition to these parameters it's also necessary to actually allow the boiler to start heating by setting the CHenable bit in the status message (MsgID 0). The gateway will automatically do that when you specify a control setpoint, but you can also control the bit using the CH command.

To get started I would suggest to set the setpoint of the thermostat itself low enough so it won't activate the heating. Set MM=100 and CS=0. Then when you decide it's time to switch on the heating, set CS=60 or so. Use higher values to quickly get to the desired room temperature or lower values for more gradual temperature changes. You would probably use higher values to actually raise the temperature in the house and lower values to maintain the desired temperature.

Once you have the basics working you can add different MM settings to the mix, if you want. The thing is, you specify a maximum modulation level, not an actual modulation level. So the boiler may use its own logic to use a lower modulation level. It probably does that based on the return water temperature.


I am not familiar with either FHEM or Perl, but you access the gateway via either a serial port or a TCP socket. I'm pretty sure that can quite easily be done in Perl.
Schelte
joho500
Starting Member
Starting Member
Posts: 6
Joined: Fri Sep 19, 2014 11:16 am

Re: OTGW, a modulating thermostat and fhem?

Post by joho500 »

Thank you, Schelte. This helps me a lot. I think I will purchase the gateway and try to set it up somewhere in the next couple of months. I'll report back when I have made some progress.

Cheers,
Joost
chino
Starting Member
Starting Member
Posts: 7
Joined: Sun Nov 23, 2014 6:15 pm

Re: OTGW, a modulating thermostat and fhem?

Post by chino »

Hi Joost,

I read your post and I'm doing (almost) exactly what you are also doing. At this moment I have 3 rooms with FHT thermostats, a raspberry pi that runs fhem, the opentherm gateway connected to the raspberry pi.

I have a little unix shell script that calculates the control temperature for the boiler and it calls a python script to actually send the command to the opentherm gateway. The shell script retrieves the thermostat setpoints by reading the logfiles created by fhem. This is the first experimental setup but my idea is to translate these scripts in perl so that I'll can integrate them directly in fhem.

If you are interested I can share my scripts with you. Let me know and in this case and I'll give you my email.

Regards,
Carlo
joho500
Starting Member
Starting Member
Posts: 6
Joined: Fri Sep 19, 2014 11:16 am

Re: OTGW, a modulating thermostat and fhem?

Post by joho500 »

Hi Carlo,

I've purchased the gateway but didn't have the time to find out how to code a module for fhem. I have some ideas but being a beginner on perl my progress is slow. I am very interested in your scripts. Perhaps they can point me in the right direction. I'll send you a PM with my e-mail. Hopefully I can share my progress in the next months (after the holidays probably :D ).

Cheers,
Joost
chino
Starting Member
Starting Member
Posts: 7
Joined: Sun Nov 23, 2014 6:15 pm

Re: OTGW, a modulating thermostat and fhem?

Post by chino »

Hallo Joost,

sorry for my late reply! I'm also a beginner in perl (actually this was the first time that I've coded something in perl ...!) and to be honest I don't know yet how to make a module for fhem. At the moment my script reads the setpoints for the radiators by reading the log files of fhem, then it calculates a water temperature setpoint for the boiler and sends the command via the opentherm gateway.

I'm uploading my script so if you want you can have a look. The script is doing well, I just still have a couple of minor issues. It is relatively good commented, just there are quite a lot of print commands left here and there after a wild debugging session :-), still have to clean up everything!

Hope it will help, if have any suggestions to improve it I would like to hear!

Regards,
Carlo
Attachments
heatcontrol.tar
(20 KiB) Downloaded 358 times
Post Reply

Return to “Opentherm Gateway Forum”