Opentherm gateway + esp8266 weekend project

For OpenTherm-gateway related questions in Domoticz

Moderator: leecollings

azonneveld
Posts: 153
Joined: Wednesday 02 October 2019 7:37
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands
Contact:

Re: Opentherm gateway + esp8266 weekend project

Post by azonneveld »

Domotibart wrote: Tuesday 02 July 2019 20:32 It has been a while since the last update. I did a little tweak on the firmware. All temperatures in domotica have one digit after the comma so i removed the second digit from the opentherm gateway. I also made a new firmware based on the last ESP8266 firmware (2019 6 30)
Heres the link https://drive.google.com/file/d/1QuDcLy ... sp=sharing
I loaded the firmware to a nodemcu. But what numbers do I need to enter for the IDXs?
What happens when I leave them all at 0?

Image
rpi4 - zigbee2mqtt - roborock - espeasy - rfxcom - homewizard p1 - otgw - homebridge - surveillance station - egardia - goodwe - open weather map - wol - BBQ detection - rsync backup
Domotibart
Posts: 38
Joined: Tuesday 06 December 2016 18:53
Target OS: NAS (Synology & others)
Domoticz version: V3.8153
Location: holland
Contact:

Re: Opentherm gateway + esp8266 weekend project

Post by Domotibart »

The IDX numbers are the numbers off the switch you want to see in domoticz. So if you want to have the room temperature from your CV, you add a virtual temperature sensor in domoticz. This sensor has a IDX number. Put this number at IDXroomtemp. The nodemcu wil monitor the output from the openthermgateway and as soon as the value from the room temperature is send from the opentherm gateway the nodemcu wil send the value to your domoticz server.
only add a idx number for the sensors you want to see in domoticz.
Synology DS214play - esp8266 Opentherm Gateway - esp8266 somfyremote - esp8266 poolcontrol - esp8266 energyreader - zwave - Philips hue
Ernstp
Posts: 3
Joined: Sunday 22 November 2020 12:46
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Opentherm gateway + esp8266 weekend project

Post by Ernstp »

@ Carmad87

Is your Opentherm adapter by Ihor Melnik working?

I wanted to build one to.

Tnx
Alfa
Posts: 1
Joined: Sunday 21 March 2021 13:20
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Opentherm gateway + esp8266 weekend project

Post by Alfa »

Will the modified Plugin 020: Ser2Net work with the latest version of Espeasy?
I want to try connecting the Wavin AHC9000 to domoticz.
Next would be Vailant gas boiler with "ebusd"
antonlamers
Posts: 14
Joined: Wednesday 08 March 2017 14:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Location: NL
Contact:

Re: Opentherm gateway + esp8266 weekend project

Post by antonlamers »

Do you support mqtt?

Anton
Greating,
Anton
Version: 2023.2
Build Hash: 19efd039c
Compile Date: 2023-07-21 17:23:44
dzVents Version: 3.1.8
Python Version: 3.9.2 (default, Feb 28 2021, 17:03:44) [GCC 10.2.1 20210110]
kniazio
Posts: 198
Joined: Thursday 06 October 2016 8:14
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.7243
Contact:

Re: Opentherm gateway + esp8266 weekend project

Post by kniazio »

Domotibart wrote: Sunday 02 December 2018 21:40 I have been using the OTGW in domoticz for 2 years now. The first year by USB connection. To get more flexibility i added a esp8266 to connect the OTGW via LAN.
Unfortunately i never got this to work flawless. In the beginning i could not even connect domoticz to the esp8266. For some reason the otmonitor tool worked at once without any problems.
After experimenting with some different firmware for the esp8266 i got it working. At this time use the latest espeasy firmware. But ..... stil i get a lot of errors. It works at startup but after a few hours i reguelarly get zero valuesto eventualy lose the connection. Setting the room temperature from domoticz never worked.
So why does everything work perfect with the otmonitor software and does not in domoticz. I beleive the big difference is that domoticz uses PS=1 to control OTGW and otmonitor does not.
So here my weekend project was born. Let domoticz do the same as otmonitor does. This is how;
The plan is that the ESP is going to parse all the opentherm codes and put the all the sensor data in its dummy sensors. The ESPeasy firmware takes care of sending all the data to Domoticz. Bonus with this method is that i can use domoticz and otmonitor at the same time.
1- First step is to change the ser2net ino from the easyesp firmware. I added some code to parse the opentherm data and create events in the ESP8266. I had never done this so this took some time with trial and error.
2 - Second step make some rules in espeasy to add the parsed data in the corresponding dummy sensors. This is a standard procedure and was easy to do.
3 - Third step was to create virtual sensors in domoticz so that the esp8266 transfers the data to domoticz.
4 - fouth step was to make a virtual setpoint device in domoticz and send the new temperature setpoint to the esp8266 so that the esp8266 can send a serial command to the OTGW setting a temporary temperature. This was the most challenging part becouse i had to make a lua script in domoticz so send a command to the esp8266.
Its now sunday and i have got three values in domoticz; room temperature, room setpoint , boiler temperature and a setpoint temperature thermostat.
It is working for a few hours but it look promising, its the first time that i can set a the therostat from domoticz!
I will put the codes from the ser2net.ino , the lua script, and the esp rules in my next post maybe someone who has more coding skills can optimize them. If not, for me it is a nice workaround to get opentherm working without any errors in domoticz.
Can you share the Rules & Lua code?
Domotibart
Posts: 38
Joined: Tuesday 06 December 2016 18:53
Target OS: NAS (Synology & others)
Domoticz version: V3.8153
Location: holland
Contact:

Re: Opentherm gateway + esp8266 weekend project

Post by Domotibart »

Hi Kniazio,

There are no seperate rules needed in the esp anymore. A made a device entry in the ESP firmware. the name of the device is Communication - OTGW
When selected you can add all the corresponding domoticz IDX ID's where the parsed data has to go to.
The LUA script in domoticz to change the room temperature is quite simple;
commandArray = {}
if devicechanged['thermostaat'] then
setPointValueT = tonumber(otherdevices_svalues['thermostaat'])
commandArray[1] = {['OpenURL']="http://192.168.1.54/control?cmd=serials ... ointValueT..""}
end
return commandArray


thermostaat is the name of the virtual setpoint device and of course 192.168.1.54 is my ESP's IP adres.
Synology DS214play - esp8266 Opentherm Gateway - esp8266 somfyremote - esp8266 poolcontrol - esp8266 energyreader - zwave - Philips hue
Loekie63
Posts: 9
Joined: Thursday 28 January 2021 9:13
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Opentherm gateway + esp8266 weekend project

Post by Loekie63 »

Hi, nice project and I am very interested.
Could you please share the electronic connection schema between the OTG and esp8266?
Kind regards Loek
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests