Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including pimatic-otgw with all npm packages installed. Try it out:

var pimaticOtgw = require("pimatic-otgw")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

pimatic-otgw v0.0.2

Pimatic plugin for the Opentherm gateway (http://otgw.tclcode.com/)

pimatic-otgw

Pimatic plugin for the Opentherm gateway (http://otgw.tclcode.com/)

This plugin will connect to the OTMonitor Relay port.

In theory this plugin can also connect to the ethernet version of the gatway (UNTESTED!)

Configuration of OT Monitor

Download the Opentherm Monitor from: http://otgw.tclcode.com/download.html#utilities

For Raspberry take Linux-armhf as system.

Setup OT monitor to start with the relay server enabled AND relay OT messages to on. This can be done with the following command:

./otmonitor-ahf --daemon -f /opt/otmonitor/otmonitor.conf"

contents of /opt/otmonitor/otmonitor.conf: (you can choose your own loaction ofcourse)

web {
  enable true
  port 8080
  nopass true
}
connection {
  device /dev/ttyUSB1
  type serial
  enable true
}
server {
  enable true
  port 7686
  relay true
}

To autostart ot-monitor on boot on the raspberry pi you can use this file: https://gist.github.com/Fjuxx/8effac5e0d8338e07265#file-otmonitor-ahf

It assumes ot-monitor is placed in /opt/otmonitor/

place that file in /etc/init.d/

Then execute:

sudo update-rc.d otmonitor-ahf defaults

Configuration of Pimatic

You can load the plugin by editing your config.json to include (host = OTmonitor IP port=Relay Port (default:7686)):

{ 
   "plugin": "otgw",
   "host": "192.168.X.X",
   "port": 7686
}

There are currently 2 devices for this plugin:

Main thermostat (Temperature sensor from the Opentherm gateway):

{
 "id": "RoomTemp",
 "class": "OTGWMainThermostat",
 "name": "Room Temp"
}

Heating thermostat:

{
  "id": "HeatingThermostat",
  "class": "OTGWHeatingThermostat",
  "name": "Heating Thermostat",
  "comfyTemp": 21.0,
  "ecoTemp": 16.5,
  "guiShowModeControl" : true,
  "guiShowPresetControl" : true,
  "guiShowTemperatueInput" : true
}
RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free