Opentherm gateway + esp8266 weekend project

For OpenTherm-gateway related questions in Domoticz

Moderator: leecollings

B7en9
Posts: 11
Joined: Tuesday 08 January 2019 20:40
Target OS: Windows
Domoticz version:
Contact:

Re: Opentherm gateway + esp8266 weekend project

Post 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.
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 »

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.
Synology DS214play - esp8266 Opentherm Gateway - esp8266 somfyremote - esp8266 poolcontrol - esp8266 energyreader - zwave - Philips hue
B7en9
Posts: 11
Joined: Tuesday 08 January 2019 20:40
Target OS: Windows
Domoticz version:
Contact:

Re: Opentherm gateway + esp8266 weekend project

Post by B7en9 »

How does your hardware settings look like?
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 »

I only changed the GPIO-0 becouse it resets the opentherm gateway at reboot. No other settings than default
Attachments
D9380F50-2684-4B07-9B07-D47B41EAC326.png
D9380F50-2684-4B07-9B07-D47B41EAC326.png (233.97 KiB) Viewed 4964 times
Synology DS214play - esp8266 Opentherm Gateway - esp8266 somfyremote - esp8266 poolcontrol - esp8266 energyreader - zwave - Philips hue
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 »

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
Synology DS214play - esp8266 Opentherm Gateway - esp8266 somfyremote - esp8266 poolcontrol - esp8266 energyreader - zwave - Philips hue
B7en9
Posts: 11
Joined: Tuesday 08 January 2019 20:40
Target OS: Windows
Domoticz version:
Contact:

Re: Opentherm gateway + esp8266 weekend project

Post 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
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 »

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
Synology DS214play - esp8266 Opentherm Gateway - esp8266 somfyremote - esp8266 poolcontrol - esp8266 energyreader - zwave - Philips hue
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 »

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!
Synology DS214play - esp8266 Opentherm Gateway - esp8266 somfyremote - esp8266 poolcontrol - esp8266 energyreader - zwave - Philips hue
B7en9
Posts: 11
Joined: Tuesday 08 January 2019 20:40
Target OS: Windows
Domoticz version:
Contact:

Re: Opentherm gateway + esp8266 weekend project

Post 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.
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 »

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.
Synology DS214play - esp8266 Opentherm Gateway - esp8266 somfyremote - esp8266 poolcontrol - esp8266 energyreader - zwave - Philips hue
Ewijk
Posts: 1
Joined: Thursday 31 January 2019 9:05
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Opentherm gateway + esp8266 weekend project

Post 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?
joostnl
Posts: 68
Joined: Wednesday 03 February 2016 19:22
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Opentherm gateway + esp8266 weekend project

Post 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?
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 »

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.
Synology DS214play - esp8266 Opentherm Gateway - esp8266 somfyremote - esp8266 poolcontrol - esp8266 energyreader - zwave - Philips hue
MaikelK
Posts: 41
Joined: Saturday 01 November 2014 13:51
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Opentherm gateway + esp8266 weekend project

Post 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.
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 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.
Synology DS214play - esp8266 Opentherm Gateway - esp8266 somfyremote - esp8266 poolcontrol - esp8266 energyreader - zwave - Philips hue
Naqua
Posts: 6
Joined: Thursday 11 August 2016 17:44
Target OS: -
Domoticz version:
Contact:

Re: Opentherm gateway + esp8266 weekend project

Post 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..
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 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
Last edited by Domotibart on Tuesday 12 November 2019 19:25, edited 1 time in total.
Synology DS214play - esp8266 Opentherm Gateway - esp8266 somfyremote - esp8266 poolcontrol - esp8266 energyreader - zwave - Philips hue
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 »

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
Synology DS214play - esp8266 Opentherm Gateway - esp8266 somfyremote - esp8266 poolcontrol - esp8266 energyreader - zwave - Philips hue
Carmad87
Posts: 1
Joined: Saturday 26 October 2019 8:52
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Opentherm gateway + esp8266 weekend project

Post 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.
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 Carma,

I posted a link to the ino file in my previous post. I beleive it is still working.
Synology DS214play - esp8266 Opentherm Gateway - esp8266 somfyremote - esp8266 poolcontrol - esp8266 energyreader - zwave - Philips hue
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest