Page 3 of 3

Re: Opentherm gateway + esp8266 weekend project

Posted: Wednesday 13 May 2020 14:37
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

Re: Opentherm gateway + esp8266 weekend project

Posted: Tuesday 16 June 2020 14:38
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.

Re: Opentherm gateway + esp8266 weekend project

Posted: Monday 30 November 2020 22:28
by Ernstp
@ Carmad87

Is your Opentherm adapter by Ihor Melnik working?

I wanted to build one to.

Tnx

Re: Opentherm gateway + esp8266 weekend project

Posted: Sunday 21 March 2021 14:05
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"

Re: Opentherm gateway + esp8266 weekend project

Posted: Tuesday 02 November 2021 14:42
by antonlamers
Do you support mqtt?

Anton

Re: Opentherm gateway + esp8266 weekend project

Posted: Thursday 19 January 2023 7:43
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?

Re: Opentherm gateway + esp8266 weekend project

Posted: Wednesday 15 February 2023 14:09
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.

Re: Opentherm gateway + esp8266 weekend project

Posted: Wednesday 08 May 2024 9:36
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