Opentherm gateway and script integration into Homeseer

Forum over Homeseer scripts (DUTCH forum)

Moderators: TANE, Ruud

Opentherm gateway and script integration into Homeseer

Postby blb » Wed Aug 24, 2011 11:25 pm

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.jpg
OTGW Devices 02e
OTGW Devices.jpg (236.95 KiB) Viewed 27159 times


The Events:
OTGW Events.jpg
OTGW Events 02e
OTGW Events.jpg (119.93 KiB) Viewed 27159 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 462 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 386 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 Sun Nov 03, 2013 11:36 pm, edited 9 times in total.
Bernard
blb
Member
Member
 
Posts: 140
Joined: November 2010

Re: Opentherm gateway and script integration into Homeseer

Postby phoenixb » Thu Aug 25, 2011 2:31 pm

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,
__________________
phoenixb
Member
Member
 
Posts: 498
Joined: July 2009
Location: Netherlands

Re: Opentherm gateway and script integration into Homeseer

Postby blb » Thu Aug 25, 2011 3:04 pm

I used an experiment PCB board for it. Mine looks almost the same as http://tclcode.com/opentherm/otgw.png
Bernard
blb
Member
Member
 
Posts: 140
Joined: November 2010

Re: Opentherm gateway and script integration into Homeseer

Postby wwolkers » Fri Sep 09, 2011 2:57 pm

Looks nice!
I'll see if I have some time soon to build this, and see if it works with non-Remeha units :)
wwolkers
Member
Member
 
Posts: 273
Joined: September 2008
Location: Netherlands

Re: Opentherm gateway and script integration into Homeseer

Postby fabian » Tue Nov 08, 2011 12:53 am

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 :)
fabian
Member
Member
 
Posts: 110
Joined: December 2010
Location: NL, Zuidhorn

Re: Opentherm gateway and script integration into Homeseer

Postby phoenixb » Tue Nov 08, 2011 8:30 am

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

"offtopic": yep, ben ook had wat vrije tijd over :wink:
__________________
phoenixb
Member
Member
 
Posts: 498
Joined: July 2009
Location: Netherlands

Re: Opentherm gateway and script integration into Homeseer

Postby fabian » Tue Nov 08, 2011 9:41 am

Not if you do it right the first time.
fabian
Member
Member
 
Posts: 110
Joined: December 2010
Location: NL, Zuidhorn

Re: Opentherm gateway and script integration into Homeseer

Postby blb » Tue Nov 08, 2011 10:57 am

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
blb
Member
Member
 
Posts: 140
Joined: November 2010

Re: Opentherm gateway and script integration into Homeseer

Postby Bwired » Tue Nov 08, 2011 11:39 am

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
User avatar
Bwired
Administrator
Administrator
 
Posts: 5308
Joined: March 2006
Location: Netherlands

Re: Opentherm gateway and script integration into Homeseer

Postby fabian » Tue Nov 08, 2011 12:04 pm

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.
fabian
Member
Member
 
Posts: 110
Joined: December 2010
Location: NL, Zuidhorn

Re: Opentherm gateway and script integration into Homeseer

Postby blb » Tue Nov 08, 2011 12:24 pm

I'll try to post the current version this evening to give you a first impression :)
Bernard
blb
Member
Member
 
Posts: 140
Joined: November 2010

Re: Opentherm gateway and script integration into Homeseer

Postby phoenixb » Tue Nov 08, 2011 3:30 pm

@ 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?
__________________
phoenixb
Member
Member
 
Posts: 498
Joined: July 2009
Location: Netherlands

Re: Opentherm gateway and script integration into Homeseer

Postby blb » Tue Nov 08, 2011 4:31 pm

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
blb
Member
Member
 
Posts: 140
Joined: November 2010

Re: Opentherm gateway and script integration into Homeseer

Postby phoenixb » Tue Nov 08, 2011 4:39 pm

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.
__________________
phoenixb
Member
Member
 
Posts: 498
Joined: July 2009
Location: Netherlands

Re: Opentherm gateway and script integration into Homeseer

Postby blb » Tue Nov 08, 2011 5:44 pm

according http://home.xmsnet.nl/openthermprotocol/ the OT Gateway should work with the iSense thermostat
Bernard
blb
Member
Member
 
Posts: 140
Joined: November 2010

Next

Return to Homeseer Scripts Forum

Who is online

Users browsing this forum: No registered users and 1 guest