Page 2 of 3

Re: Opentherm gateway + esp8266 weekend project

Posted: Sunday 13 January 2019 14:00
by B7en9
Should be ok. The address and port are the same address that you put in you’re browser when you are using domoticz.
yes
Second check, are the idx numbers of you’re virtual sensors the same as the idx numbers that you have to put in the esp Otha config?
Yes, think even if they are wrong the ESP should send it out.

Re: Opentherm gateway + esp8266 weekend project

Posted: Sunday 13 January 2019 14:12
by Domotibart
I did a quick test and it is correct: even if the domoticz server is down or the idx is incorrect you should see something in the esp logging.

Re: Opentherm gateway + esp8266 weekend project

Posted: Sunday 13 January 2019 14:15
by B7en9
How does your hardware settings look like?

Re: Opentherm gateway + esp8266 weekend project

Posted: Sunday 13 January 2019 14:19
by Domotibart
I only changed the GPIO-0 becouse it resets the opentherm gateway at reboot. No other settings than default

Re: Opentherm gateway + esp8266 weekend project

Posted: Sunday 13 January 2019 14:28
by Domotibart
I think I might have found something. For some strange reason you have to enable rules. Don’t now why becouse I do not use any rules. If I disable them nothing works

Re: Opentherm gateway + esp8266 weekend project

Posted: Sunday 13 January 2019 14:53
by B7en9
747813: EVENT: GET /json.htm?type=command¶m=udevice&idx=51&svalue=58.80
752291: WD : Uptime 13 ConnectFailures 0 FreeMem 19528
772858: EVENT: GET /json.htm?type=command¶m=udevice&idx=51&svalue=59.15
782291: WD : Uptime 13 ConnectFailures 0 FreeMem 19488
782882: EVENT: GET /json.htm?type=command¶m=udevice&idx=51&svalue=59.30
812290: WD : Uptime 14 ConnectFailures 0 FreeMem 19512
812874: EVENT: GET /json.htm?type=command¶m=udevice&idx=51&svalue=59.48
817880: EVENT: GET /json.htm?type=command¶m=udevice&idx=51&svalue=59.50
832905: EVENT: GET /json.htm?type=command¶m=udevice&idx=51&svalue=59.62
837917: EVENT: GET /json.htm?type=command¶m=udevice&idx=51&svalue=59.70
842291: WD : Uptime 14 ConnectFailures 0 FreeMem 19416
848827: EVENT: GET /json.htm?type=command¶m=udevice&idx=48&svalue=19.36
872291: WD : Uptime 15 ConnectFailures 0 FreeMem 19416
883026: EVENT: GET /json.htm?type=command¶m=udevice&idx=51&svalue=60.20
902291: WD : Uptime 15 ConnectFailures 0 FreeMem 19384
912998: EVENT: GET /json.htm?type=command¶m=udevice&idx=51&svalue=60.40
932291: WD : Uptime 16 ConnectFailures 0 FreeMem 19048
953017: EVENT: GET /json.htm?type=command¶m=udevice&idx=51&svalue=60.82
962291: WD : Uptime 16 ConnectFailures 0 FreeMem 19384
964931: EVENT: GET /json.htm?type=command¶m=setsetpoint&idx=49&setpoint=20.50
969936: EVENT: GET /json.htm?type=command¶m=udevice&idx=48&svalue=19.37

Yes :D :D

Indeed the script, and changed the RX timeout. the 5 seconds is really important.

Manny manny thanks!

So let me know how I can help you make this even better.

can you also set the temperature for domoticz? That will be great

Re: Opentherm gateway + esp8266 weekend project

Posted: Sunday 13 January 2019 15:33
by Domotibart
That was the biggest headace for me but i finally figured it out.
Just make a virtual Setpoint device and make u lua script to send the setpoint temperature to the esp.
I beleive this can also be done with python and DzVents watever you like.
i actually made two scripts, one for the tempsetpoint and the second one for sending the outide temperature to Opentherm. Any domiticz device which displays the outside temperature is ok. Its important to put the sensorname in the script (see capitals)

I figured it out for LUA. Just put this script in the event editor from domoticz.

if devicechanged['[THEEXACTNAMEOFTHESETPOINTDEVICE'] then
setPointValue = tonumber(otherdevices_svalues['THEEXACTNAMEOFTHESETPOINTDEVICE'])
data = ' curl http://THE IPADRESS OF YOUR ESP/control?cmd=serialsend%20TT=" .. (setPointValue)..''
os.execute(data)
end

if devicechanged['THEEXACTNAMEOFTHEOUTSIDETEMDEVICE'] then
setPointValue = tonumber(otherdevices_svalues['Zwembad - THEEXACTNAMEOFTHETEMPDEVICE'])
data = ' curl http://THE IPADRESS OF YOUR ESP/control?cmd=serialsend%20OT=" .. (setPointValue)..''
os.execute(data)
end

Re: Opentherm gateway + esp8266 weekend project

Posted: Saturday 19 January 2019 9:20
by Domotibart
I just did some extra programming and made a new bin file.
Most important changes;
added some extra sensors
removed the rules option (you now do not need to enable rules)
cleaned up the code a bit
Th following sensors are available;
room temp
room set point
DHW temperature (hot water)
Boiler water temperature
flame status
water pressure
return water temperature
Domestic hot water mode (hot water active)
Domestic hot water enable (hot water mode)
Central heating mode

For me these are more than enough sensors, maybe i am going to use the DHW set point and the Max CH set point as well.
If there are any suggestions for improvement feel free to comment!

Re: Opentherm gateway + esp8266 weekend project

Posted: Sunday 20 January 2019 9:13
by B7en9
This looks great!, where can I download the BIN file? Or did you update the file in the previous link

Thanks again for your work.

Re: Opentherm gateway + esp8266 weekend project

Posted: Sunday 20 January 2019 12:51
by Domotibart
Nice to hear that you like te solution. I am using it for a week now without any problems.
I updated the file in the link that I gave before.
I finally can change my temperature remote and also the graphs are looking nice without the zero values that I had before.

Re: Opentherm gateway + esp8266 weekend project

Posted: Thursday 31 January 2019 9:12
by Ewijk
Initialy it looked promising but after a minute i get ser2n: serial buffer full! Messages. I use the nodo board version and used the last binary. So at first I got good messages that I could paedo to domoticz but the I ran out of serial buffer. Anybody got a clue?

Re: Opentherm gateway + esp8266 weekend project

Posted: Thursday 31 January 2019 12:51
by joostnl
I bought everything from nodo (gateway and esp) and used the recommend firmware from nodo guide on their website and everything is working flawless. Did you guys followed the official manual, or are you experimenting on your own?

Re: Opentherm gateway + esp8266 weekend project

Posted: Thursday 31 January 2019 21:39
by Domotibart
I do not know the nodo board. The firmware is made for the wemos D1 4mb 8266.
I have had some buffer full errors when I use the logging in the esp. setting the weblog level on info is enough info to see everything is working.
Even better to turn logging off. What i do is just let it do it’s thing with domoticz. To see if everything is working I use the otmonitor software to see if the serial communication is working as it should.

Re: Opentherm gateway + esp8266 weekend project

Posted: Sunday 24 February 2019 15:35
by MaikelK
Hi Bart,

What's the link to the OTGW you bought? Maybe it's good to share this to get the best results?

And are you also pushing this plugin to the ESPEasy forum to get it implemented? That would be nice as a real plugin.

Re: Opentherm gateway + esp8266 weekend project

Posted: Tuesday 05 March 2019 13:13
by Domotibart
Hi Maikel,

here's the link to the gateway i bought; https://www.kiwi-electronics.nl/opentherm-gateway-kit. Its the standard gateway. I bought a standard wemos D1 esp to get it connected by wifi.
The plugin i made was a desperate action te get the OTGW working without any connection losses. Ive been using the plugin for several weeks now and it has been working without any issues since then.
I havent got the time to push the plugin to the forum. Im not sure if this plugin is in line with the philosophy of the espeasy platform.

Re: Opentherm gateway + esp8266 weekend project

Posted: Friday 08 March 2019 11:52
by Naqua
Hi domotibart, thanx for the plugin and your effort to make it possible to have a flawless OTGW connection.
I struggled with this also but now its perfect.

Would it be possible to share your modified .ino file with me so i can optimise further and compile with future versions of espeasy?
That would be much appreciated, thanks..

Re: Opentherm gateway + esp8266 weekend project

Posted: Sunday 10 March 2019 15:08
by Domotibart
Hi Naqua,

heres a link to the ino file. I am a noob with programming so there should be enough left to optimise. Great to hear that this plugin is useful to you.

https://drive.google.com/file/d/1wG4zKO ... sp=sharing

Re: Opentherm gateway + esp8266 weekend project

Posted: Tuesday 02 July 2019 20:32
by Domotibart
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

Re: Opentherm gateway + esp8266 weekend project

Posted: Saturday 26 October 2019 8:56
by Carmad87
Hi Domotibart, can you post the .ino file?
I've bought a Opentherm adapter by Ihor Melnik and i want to interface it with EspEasy.
Thanks.

Re: Opentherm gateway + esp8266 weekend project

Posted: Tuesday 12 November 2019 19:26
by Domotibart
Hi Carma,

I posted a link to the ino file in my previous post. I beleive it is still working.