Giter Site home page Giter Site logo

immergas_opentherm_library's Introduction

SWUbanner

OpenTherm Arduino/ESP8266/ESP32 Library

This library provides implementation of OpenTherm protocol.

OpenTherm Library is based on OpenTherm protocol specification v2.2 and works with all OpenTherm compatible boilers. Library can be easily installed into Arduino IDE and compiled for Arduino, ESP8266 and other similar controllers.

OpenTherm protocol requires simple low voltage twowire connection to boiler, but voltage levels (7..15V) still much higher than Arduino/ESP8266 levels, which requires OpenTherm Adapter.

This version of library uses interrupts to achieve better stability and synchronization with boiler.

Using OpenTherm Library you will be able:

  • control your boiler remotely (get status, switch on/off heating/water heating, set water temperature and much more)
  • make custom thermostat

Configuration and Usage:

#include <OpenTherm.h>

You have to choose 2 controller GPIO pins which will be used for communication and connected to OpenTherm Adapter. Controller(Arduino/ESP8266) input pin should support interrupts. Controller output pin should be connected to OpenTherm Adapter input pin and vise versa.

const int inPin = 2;
const int outPin = 3;

Define OpenTherm class instance using constructor which accepts as arguments pin numbers:

OpenTherm ot(inPin, outPin);

Define interrupts handler function for specified above instance:

void handleInterrupt() {
	ot.handleInterrupt();
}

Use begin function to initialize OpenTherm instance, specify interrupts handler function as argument

void setup()
{
    ot.begin(handleInterrupt);
}

According to OpenTherm Protocol specification master (controller) must communicate at least every 1 sec. So lets make some requests in loop function:

void loop()
{	
    //Set/Get Boiler Status
    ot.setBoilerStatus(enableCentralHeating, enableHotWater, enableCooling);
    //Set Boiler Temperature to 64 degrees C
    ot.setBoilerTemperature(64);
    //Get Boiler Temperature
    float temperature = ot.getBoilerTemperature();
    delay(1000);
}

In details OpenTherm Library described here.

OpenTherm Adapter Schematic

opentherm adapter schmetic

Arduino UNO Connection

opentherm adapter arduino

License

Copyright (c) 2018 Ihor Melnyk. Licensed under the MIT license.

immergas_opentherm_library's People

Contributors

chupaka avatar deff001 avatar dwrobel avatar ihormelnyk avatar pxe-la avatar vkornev-work avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.