Coder Social home page Coder Social logo

bbqkees / nefit-buderus-ems-bus-arduino-domoticz Goto Github PK

View Code? Open in Web Editor NEW
88.0 31.0 26.0 2.32 MB

Readout of EMS protocol datagrams and transfer of data to Domoticz via Arduino

License: MIT License

C++ 100.00%
ems domoticz arduino thermostat nefit ems-bus http-get rc20 rc35 ethernet

nefit-buderus-ems-bus-arduino-domoticz's Introduction

Nefit-Buderus-EMS-bus-Arduino-Domoticz

Readout of Nefit/Buderus (Logamatic) EMS (=Energy Management System) interface Protocol by Arduino and transfer of data via HTTP GET requests to Domoticz home automation software (or to other systems).

There are also other names for 'EMS' or additions to EMS called EMS+, EMS2, Heatronic and Heatronic 3 but for most of those you need to do additional reverse engineering.

Although the code in this repository works fine for the most part, I suggest you have a look at the ESP code from Proddy. It has support for lots of boilers and thermostats out of the box, it's well maintained and features are added all the time.
I have written a plugin for Domoticz and EMS-ESP supports Home Assistant natively.

I'm also transferring most documentation to my dedicated wiki repository EMS-Wiki.

You can purchase a complete and tested interface board here.

Goal:

Readout the Nefit/Buderus EMS interface of a Nefit Trendline gas boiler (gas condensing central heating boiler).

Transfer of data via ethernet to Domoticz home automation software.

What does it do?

The main sketch reads the EMS interface data and depending on the format decodes the data and puts it in variables. You can then send the values via HTTP GET requests to Domoticz or do whatever you want with it. Usage is not limited to Domoticz, you can extract the decoding part for other purposes.
There are also a few other sketches here to help you read and write to the EMS bus.

Furthermore there are some schematics here to help you build the converter circuit.
(Or buy a complete converter board here.)

Boiler support

Reading the EMS bus: Should support all boilers using the EMS databus. This includes most Bosch boiler brands like Nefit, Buderus, Worcester, and some Junkers. But also f.i. Sieger.
Datagrams containing status updates are periodically sent out by the boiler with source ID 0x08. You only need to listen in. No data requests are needed for most boilers (But some only send the status automatically at boot).
However, several types of data are only send when the specific device on the bus is polled. For this you need to write to the bus.

Writing to the EMS bus: To change the temperature and other settings you need to write to the thermostat on the bus. This needs to be a EMS thermostat. Depending on the thermostat on your wall you need to send specific commands. Most of these are already reverse-engineered. Some are not. Below the list of thermostats which should work fine.

Nefit and Bosch boiler types with EMS bus

This list below is incomplete and no longer maintained. Check the full compatibility list here.

  • Nefit 9000i
  • Nefit TopLine
  • Nefit TrendLine
  • Nefit ProLine (only the non-NxT!)
  • Nefit SmartLine
  • Nefit BaseLine
  • Bosch Compact
  • Nefit EcomLine Elite (Just the Elite, older sub types often have the old iRT bus!)
  • Sieger BK 15

Nefit and Bosch boiler types with -NO- EMS bus

The following boilers have no EMS bus and are thus not supported:

  • Older Nefit EcomLine models like the VR24V, HR(C), Economy, HRC23VT (iRT protocol).
  • Nefit ProLine NxT (OpenTherm protocol)
  • Bosch HRC / HRC Top / HRS Top
  • Bosch HRCII / HRSII
  • Nefit Turbo
  • Bosch Condens 3000W / 6000W

Thermostats with EMS bus

For the most specific info have a look at the EMS thermostat documentation page.

Short info:
EMS bus thermostats: RC20 (source ID 0x17), likely also RC30 and RC35 (both ID 0x10).
Depending on under which brand name these thermostats are sold they might have a different type name.

Some of the thermostats below are multi-protocol!
This means that although the thermostat will support the EMS protocol, they also support the older iRT protocol.
So if you have an old non-ems boiler like the Nefit Ecomline, you cannot use the code and the schematic in this repository.

EMS code Buderus type Nefit type Image
0x17 RC10? Moduline 100
0x17 RC20 Moduline 200
0x10/0x17 RC30 Moduline 300
0x10 RC35 Moduline 400

The RC30 is equal to the Nefit Moduline 300 and the RC35 is equal to the Moduline 400.
The RC20 is likely equal to the Nefit Moduleline 200.
Although the hardware is identical (if you open up a ModuLine 400 it says 'RC35' on the PCB), the firmware may be a bit different. It appears there are slight differences in frametypes. However, as more people are using theses sketches this will be resolved over time.
Furthermore in principle all EMS bus thermostats can be supported. So this also includes the Nefit Easy and the new line of ModuLine series 1000, 2000, 3000 etc. For a new thermostat you need to log the data on the bus when you set the temperature on the thermostat and go through the log to find the correct messages.
If you have a newer Nefit/Bosch/Buderus EMS thermostat and you would like to help I can give a hand. You can contact me via the Domoticz forum.

Non-compatible thermostats

Buderus type Nefit type Image
iRT30 ModuLine 30

If you have an older thermostat looking like the one above, your boiler is NOT compatible with the EMS bus.

If your thermostat does not work, and you really want to change the temperature you might want to buy a supported model.
This Github page of Danidata has a very similar approach that works with the RC35.

You do NOT need to have an EMS compatible thermostat or a thermostat on the bus at all if you only want to read out the common status messages from the boiler!
Status updates regarding many parameters of the boiler are sent to the bus every 10 seconds.
I f.i. have an on/off thermostat zone control. So I do not have a Nefit thermostat at all. By connecting the EMS bus circuit to the service jack, I can still capture those status updates.
It is only if you want to read or write thermostat settings you need an EMS bus thermostat.

Hardware:

  • EMS interface circuit (See Documentation or PBC-files folder).
  • Arduino Mega 2560 Rev3 + Arduino Ethernet Shield with Wiznet w5100
  • Raspberry Pi, PC or other device running Domoticz

The EMS bus interface can be converted to TTL level by means of a simple circuit. The TTL-converted signal can then be connected to one of the the Arduino UARTs. See the Documentation folder.

The sketches here use the Arduino Mega 2560 and the Wiznet 5100 ethernet shield. You can also use another Arduino like the Uno but that one only has one hardware serial port.

Serial1 is used for the EMS module. Serial(0) is used to debug the output to PC. EMS serial works with 9700 Baudrate and 8N1. You need a modified Serial library for the Arduino. It's included in the project.

The modified Serial library and thus the entire sketch will only work on Arduino (compatible) boards that have an Atmel AVR (ATmega) microcontroller on board like the Uno and Mega. ATSAMxx (ARM) type Arduino's are not supported. Neither are the ESP8266, ESP32 etc.
For the ESP8266 'Proddy' has written fully working code: https://github.com/proddy/EMS-ESP-Boiler

Arduino Mega pinout:

  • Serial on pins 0 (RX) and 1 (TX),
  • Serial1 on pins 19 (RX) and 18 (TX),
  • Serial2 on pins 17 (RX) and 16 (TX),
  • Serial3 on pins 15 (RX) and 14 (TX). You can choose any of the Serial ports on the Mega, the current sketch uses Serial1 but you can change that.

Arduino non-Mega: You cannot use Serial1, so you need to use Serial(0), which does not allow for combined debugging via serial.

Where did you find all the information about the bus?

It should be noted that the reverse-engineering of the EMS bus protocol was a major effort that involved many people. Most of it all started a few years ago on the mikrocontroller.net forum. Below two topics that hold all the original information:
http://www.mikrocontroller.net/topic/309075
http://www.mikrocontroller.net/topic/141831
At a later stage all information got nicely bundled at: https://emswiki.thefischer.net/doku.php?id=start

In the end I combined code acquired from 'Jvdmeer' from the Nodo forum with methods to interface with Domoticz and published it here with lots of additional documentation for all to use.

How about MQTT instead of HTTP GET requests?

That is on my list (maybe). For now it works exactly like my other Github project 'Vbus-Arduino-Domoticz'.

How about serial output instead of HTTP GET requests?

If you use a Mega, this is very easy to accomplish. Just check f.i. 'this website'. It will not work easily with an Uno, because you would need to use the software serial for reading the bus, this would also need modification to its library. But a Mega 2560 Rev3 is only a few Euro/Dollar on Ebay or Aliexpress anyway.

Additional credits

Sketch is based on the EMS sketches from 'Jvdmeer' from the Nodo forum.

Which license applies here?

The MIT License. This means that you can do whatever you want with my code! No need to ask me. It is always nice however to publish your version to Github to help others.

Legal Notices

'Worcester, Bosch Group', 'Buderus' and 'Nefit' are brands of Bosch Thermotechnology.

All other trademarks are the property of their respective owners.

nefit-buderus-ems-bus-arduino-domoticz's People

Contributors

bbqkees avatar nsine-zz avatar olifant1990 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nefit-buderus-ems-bus-arduino-domoticz's Issues

what changes are made in the serial library

Hi,

i have made a working code to upload data to my domoticz server via my Arduino Uno Wifi edition.
But when i put that code in your code it doesn't upload my data anymore, the only change you made is an alternate serial library, but how has it changed and why does it not work with my UNO Wifi???

EBUS or EMS?

Hello!
I have old Junkers atmospheric boiler (ZWC28-1MF2K) and stumbled in docs about using E/BUS devices (thermostats etc.), so the question is:
Does EMS is the same as EBUS older Junkers (Bosch) used?
Also I have started upgrade my heating system (step by step), and have 2 MM100 controllers (for floor/radiators heating accordingly) that are 100% EMS devices, was thinking about creating virtual thermostats from sensors I have in my house -- is it possible?

Heating ON

Can I turn ON/OFF heating my boiler Bosch Condens 2500W via EMS ?
I don`t have any EMS thermostat...

What do I connect to vref?

In the schematics vref is named. But what should I connect it to?
And do you have some better pictures of your breadboard setup or a parts list from Farnell or something?

How can I write values?

I have a Buderus GB125 oil heating and have the EMS Bus interface board and the WEMOS. I can telnet to the WEMOS and see all data like expected.

What I want to do
I would like to change the temperatures on my Buderus GB125 and set the night / day status

What I tried
I telnet to wemos and saw that the 2 commands should do the trick:
thermostat mod 0
thermostat temp 23
=> I would now expect that my RC35 switches to night mode and temp changes to 23°
=> But nothing is changed in the RC35

Hints needed
Does it not work with RC35? Can somebody say it?
Do I have to create a telegram ? How Can I send it?
https://emswiki.thefischer.net/doku.php?id=wiki:ems:telegramme

Many thanks for some hints to be able to change settings.

Not an issue, just a question....

Hi bbqkees,

Do you know how much current can be pulled from the EMS front service jack connector?
I'm planning to make a pcb with an ESP8266 module to push the data to a MQTT broker.
I want to convert the 12V to 3.3V, if enough current is available then an external power source won't be needed.

Best regards,
Edjeed

Ps. Sorry for abusing the issue page, didn't know where to ask else...
I am not able to measure myself, don't have a Nefit yet (but will be having one soon)

Link to schema is dead.

Hi there. I like your project and like to use parts of it for myself. I clicked the link for the breadboard schema in your documentation but it seams to be (re)moved. Do you by any chance still have the schema yourself?

Lost connection and capacitor C1 very hot

After letting it work for some time, connection to EMS-Bus is lost and one capacitor is getting very hot. It's C1 on the pcb. I disconnected the board asap from the service connector jack, Connecting it again for only 2 swconds it's hoz again. I think a part on the pcb is damaged. I'm really frustrated that it only worked for a very short time. What could be happened to cause this?

Connection lost with Wemos

Dear Kees,

I received your board + Wemos last week and got everything up and running relatively quickly using Domoticz/MQTT. I could see all data coming in, but after a while, usually a couple of hours, nothing was being sent until the Wemos was power cycled. After consulting with Proddy, he suggested to flash the board with his latest version of the sw to make sure that wasn't an issue. I did that, but now all I can get out of the board is this:

ets Jan 8 2013,rst cause:2, boot mode:(3,6)

load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
vbb28d4a3
~ld

So, now my question to you is: How did you flash the Wemos firmware? What tools and settings did you use?

Thanks for your help

Ron

Schematic for new EMS Bus Wi-Fi Gateway?

Hi.

Can or will you provide the current schematic of the EMS Bus Wi-Fi Gateway wich includes the Wemos D1 Mini and the buck power regulator?

The Background is that I have to create my own PCB that will fit inside a already mounted cabinet.

Rx Tx label

Is it possible that the rx & tx label on the v0.9 board is switched?
I have to connect the rx pin from the ems module to the rx pin on the arduino mega to get the whole thing working.

Not function interface

Hello, I got an interface a few days agao, but it doesn't work. I tried a WEMOS D1 Mini and a PI 3b+. My heating system is with a Loagamax Plus GB172-14. I've also written 2 emails to you, but didn*t get any answer. EMS-ESP shows always that EMS-Bus is not connected. I tried the Rx resistor setting with the yellow jumper and the connection over jack or terminal. Would be nice to get some help to solve the problem. Bus voltage is 16v and it's the only thing I can measure with my multimeter. I don't have an ozciloscope. Thank you Klaus

ems_failiure_2 jpg
ems_failiure_3 jpg
ems_failiure

support for ESP8266

Hi bbqkees,

I am trying to compile program for Wemos D mini board, but it end with 'nefitSerial' was not declared in this scope.
Could you point me out what need to be change in NefitSerial.h library to support ESP8266 boards?

Bosch EasyControl Adapter

I'm new to this, and I cannot get on the domoticz forum because a cookie policy I need to accept that isn't visible to me. But there is an adapter for older thermostats that has EMS on the thermostat side and connects to the older heating system. (I assume the protocol of interest on that side is called iRT)

This makes my Buderus logamax U122 compatible with the Bosch EasyControl CT200, which according to the documentation, is using EMS.

So that might extent the usability of this project to more heating systems.

conflict_with_netifserial_and_sd

Ik wil de nefitserial SD library samen in een sketch toepassen. echter ontstaat tijdens compilatie een 'conflict'met HardwareSerial0.cpp. Daar een beginnende Arduino en C hobbyist ben, heb ik geen idee hoe ik dit oplossen kan.

conflict_with_netifserial_and_sd.zip

**Archiving built core (caching) in: C:\Users\Jacoba01\AppData\Local\Temp\arduino_cache_130884\core\core_arduino_avr_megaADK_5638c217b04eda8279099c4937887265.a
HardwareSerial0.cpp.o (symbol from plugin): In function `Serial':

(.text+0x0): multiple definition of `__vector_25'

libraries\Nefitserial\NefitSerial.cpp.o (symbol from plugin):(.text+0x0): first defined here

c:/program files/arduino/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ld.exe: Disabling relaxation: it will not work with multiple definitions

collect2.exe: error: ld returned 1 exit status

exit status 1
Fout bij het compileren voor board Arduino Mega ADK**

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.