Opentherm gateway and script integration into Homeseer

Forum over Homeseer scripts (DUTCH forum)

Moderators: TANE, Ruud

Post Reply
blb
Member
Member
Posts: 145
Joined: Fri Nov 19, 2010 2:01 pm

Opentherm gateway and script integration into Homeseer

Post by blb »

Hi all,

I have, also based on information found on this forum, integrated my Central Heating system into Homeseer.

I have build the opentherm gateway as described on http://tclcode.com/opentherm/.
It turned out the timing of my Remeha Celcia 20 Room Thermostat was not 100% according Opentherm specification, but due to the great support of the developer (hvxl on this forum) of the gateway this issue is solved. He also added the option to the gateway to give the status of all opentherm messages on request, which made it easy to integrate the gateway into Homeseer. All information about the gateway, including the schematic, part list, print layout , firmware, all possibilities and an optional monitoring program can be found on the mentioned website and is now also discussed on this forum, see here

Integration is done into Homseer with a lot of virtual devices and a script. I run this script every 1,5 minutes to update the status of my Central Heating system into Homeseer and I can control the setpoint for the room temperature via Homeseer as well.

The Devices (Devices not supported by my Boiler / Room Thermostat are hidden):
OTGW Devices 02e
OTGW Devices 02e
OTGW Devices.jpg (236.95 KiB) Viewed 40349 times
The Events:
OTGW Events 02e
OTGW Events 02e
OTGW Events.jpg (119.93 KiB) Viewed 40349 times
My programming skills are not great, so the code is not the most efficient, but it is functional.

Updates:
20131103: Version 02l of the script (attached). Changes mainly to be used with the Alpha/Beta Firmware Versions of the Opentherm Gateway. Please use this new version 02l ONLY with Alpha/Beta Firmware 4.0a10 or higher and NOT with the standard Firmware (3.4):
adapted for OTGW firmware version 4.0a10; PR reply changed from only result to "PR: A=x"; reply PS=1 command striped new due to PS in Reply
adapted for OTGW firmware version 4.0a7; GW command changed from G to M, result G or M
adapted for OTGW firmware version 4.0a6; IT and PR=T command not needed & not supported anymore
FIXED: corrected opening serial port, port was not open before first message send
added 2nd TempTemperature, the first one with buttons (Thanks Again Rutger!), the second one with the Listbox;
changed "devices" section in .ini file to "Temperatures"
added default Day and Night temperatures in .ini file;
added SerialControlInScript parameter in .ini file to control open/close in script (value TRUE) or in e.g. startup script (value FALSE), so additional setup required!!.
included also the .gif files uses in the script.
HS_OT_Gateway 02l.zip
Version 02l of the script, included .gif files
(142.56 KiB) Downloaded 1072 times
20130101: Version 02g of the script (attached). Changes:
FIXED: Creation of OTGW devices is now also possible via TELNET connection.
HS_OT_Gateway 02g.zip
Version 02g of the script
(7.45 KiB) Downloaded 896 times
20121209: Version 02e of the script. Changes:
NEW: added create virtual device for temporary temperature control as 7th OTGW Device with Listbox (thanks Rutger);
FIXED: Telnet control (moved communication to Function SendMessage);
several clean up actions in the script (e.g. repaces spaces by tabs); debugOTGW settings more consistent;
improved execution speed by replacing waitsec(1) with waitMS(200).
corrected hscontrol to work with temperatures in tenths of decrees and corrected PR=O response;
minor layout improvements PR presentations;

20111206: Version 02 of the script. This version can communicate with the OT Gateway via Telnet or Serial port.
New: Communication via COM port or Telnet (based on setting in config file;
New: additional device(s) for the OT gateway itself;
New: all devices will be created when the scripts runs for the first time;
Change: renamed config file to hssi_BLB_OT_monitor.ini (hssi stands for HomeSeerScrIpt);
Change: all parameters, house codes and settings in the config file, no hardcoding anymore in the script itself.

20111109: Version 01 of the script. This version is communicating with the OT Gateway via Telnet.
Last edited by blb on Mon Nov 04, 2013 12:36 am, edited 9 times in total.
Bernard
phoenixb
Advanced Member
Advanced Member
Posts: 512
Joined: Thu Jul 23, 2009 1:00 pm
Location: Netherlands

Re: Opentherm gateway and script integration into Homeseer

Post by phoenixb »

Hello,

Do you have use a experiment pcb board for made this print or have you build it from the layout from the site?
I like to hear it.
Regards,
__________________
blb
Member
Member
Posts: 145
Joined: Fri Nov 19, 2010 2:01 pm

Re: Opentherm gateway and script integration into Homeseer

Post by blb »

I used an experiment PCB board for it. Mine looks almost the same as http://tclcode.com/opentherm/otgw.png
Bernard
wwolkers
Member
Member
Posts: 273
Joined: Tue Sep 23, 2008 10:10 am
Location: Netherlands
Contact:

Re: Opentherm gateway and script integration into Homeseer

Post by wwolkers »

Looks nice!
I'll see if I have some time soon to build this, and see if it works with non-Remeha units :)
fabian
Member
Member
Posts: 110
Joined: Sun Dec 12, 2010 11:25 am
Location: NL, Zuidhorn

Re: Opentherm gateway and script integration into Homeseer

Post by fabian »

After 3 full sets of parts and a lot of support from the developer, i've finaly managed to build a working gateway. :D
blb wrote:My programming skills are not great, so the code is not the most efficient and there is hard coded device numbers in the script, but it is 100% functional. f interested, I can share it with you.
Very interested !

*offtopic* Hey Dieuwert-Jebbe, jij ook hier :)
phoenixb
Advanced Member
Advanced Member
Posts: 512
Joined: Thu Jul 23, 2009 1:00 pm
Location: Netherlands

Re: Opentherm gateway and script integration into Homeseer

Post by phoenixb »

And do you have need total 3 complete sets to builld one?

"offtopic": yep, ben ook had wat vrije tijd over :wink:
__________________
fabian
Member
Member
Posts: 110
Joined: Sun Dec 12, 2010 11:25 am
Location: NL, Zuidhorn

Re: Opentherm gateway and script integration into Homeseer

Post by fabian »

Not if you do it right the first time.
blb
Member
Member
Posts: 145
Joined: Fri Nov 19, 2010 2:01 pm

Re: Opentherm gateway and script integration into Homeseer

Post by blb »

Great you have a working gateway! I did get great support from the developer as well. Will he release a new firmware version or where your problems more hardware related?

In the mean time I'm working on a new version of my Homeseer script. If I have that version finalized, I'll post it in the starting topic.
The main difference is the current version communicates via Telnet (gateway was connected to an other PC), the new version communicates direct via COM port.
I'm planning to add also the gateway itself as a device to have the settings of the gateway reported in Homeseer as well, but if that takes too much time I'll leave that for the next update....
Bernard
Bwired
Administrator
Administrator
Posts: 4704
Joined: Sat Mar 25, 2006 1:07 am
Location: Netherlands
Contact:

Re: Opentherm gateway and script integration into Homeseer

Post by Bwired »

Great gateway, this does all you need to handle the hvac!
Now i really need to get rid of my bloody nefit, its not that old, but i think i will replace it soon
http://www.bwired.nl Online Home, Domotica, Home Automation. Weblog. http://blog.bwired.nl
fabian
Member
Member
Posts: 110
Joined: Sun Dec 12, 2010 11:25 am
Location: NL, Zuidhorn

Re: Opentherm gateway and script integration into Homeseer

Post by fabian »

blb wrote:Great you have a working gateway! I did get great support from the developer as well. Will he release a new firmware version or where your problems more hardware related?

In the mean time I'm working on a new version of my Homeseer script. If I have that version finalized, I'll post it in the starting topic.
The main difference is the current version communicates via Telnet (gateway was connected to an other PC), the new version communicates direct via COM port.
I'm planning to add also the gateway itself as a device to have the settings of the gateway reported in Homeseer as well, but if that takes too much time I'll leave that for the next update....
Can't wait ;)

Still not sure why the first two prints dodn't work. The second print did burn two PIC's and to MAX232's. Comparing the second and third print, they look identical.

I'm thinking of designing a custom PCB and have it patterned. Still don't trust it on perf board.
blb
Member
Member
Posts: 145
Joined: Fri Nov 19, 2010 2:01 pm

Re: Opentherm gateway and script integration into Homeseer

Post by blb »

I'll try to post the current version this evening to give you a first impression :)
Bernard
phoenixb
Advanced Member
Advanced Member
Posts: 512
Joined: Thu Jul 23, 2009 1:00 pm
Location: Netherlands

Re: Opentherm gateway and script integration into Homeseer

Post by phoenixb »

@ Bernard, question about you Z60 device, is this a manual output from this PCB ot is this a extern device that is made the NO contact on you thermostate?
__________________
blb
Member
Member
Posts: 145
Joined: Fri Nov 19, 2010 2:01 pm

Re: Opentherm gateway and script integration into Homeseer

Post by blb »

the Z60 device is a virtual device to control the temporary temperature setting via the OT gateway. I have created an event which is triggered by a change of Z60. Via this event the script will run with the 2 parameters : 'TR' and 'Z60'; BLB_OT_monitor 01.vb("Main","TR|Z60"). The first parameter is the command which will be sent to the OT gateway, in this case a temporary temperature command for Remeha Celcia 20 according tclcode.com/opentherm/firmware.html#con ... figuration. The script will read the value of Z60 and send this value. if Z60 changes to 17, the command TR=17 will be send to the OT gateway.
Bernard
phoenixb
Advanced Member
Advanced Member
Posts: 512
Joined: Thu Jul 23, 2009 1:00 pm
Location: Netherlands

Re: Opentherm gateway and script integration into Homeseer

Post by phoenixb »

Is it also possible to use this OT Gateway in combination with the iSense thermostate?
Otherwise i think u must build the same to test it, because i have now a gateway that convert a 0-10Vdc signal to a modulation % on opentherm but this is not really a nice solution.
__________________
blb
Member
Member
Posts: 145
Joined: Fri Nov 19, 2010 2:01 pm

Re: Opentherm gateway and script integration into Homeseer

Post by blb »

according http://home.xmsnet.nl/openthermprotocol/ the OT Gateway should work with the iSense thermostat
Bernard
Post Reply

Return to “Homeseer Scripts Forum”