Creating my own OTGW firmware for the NodoShop version

This Forum is about the Opentherm gateway (OTGW) from Schelte

Moderator: hvxl

rvdbreemen
Starting Member
Starting Member
Posts: 45
Joined: Sun Jan 19, 2020 2:04 pm

Re: Creating my own OTGW firmware for the NodoShop version

Post by rvdbreemen »

hvxl wrote:I loaded the binary images (using `esptool.py --baud 921600 write_flash 0 OTGW-firmware.ino.bin 0x200000 OTGW-firmware.spiffs.bin`, none of that cumbersome messing with a GUI).
Just realized that that only works if you have esptool.py installed. So I will put in the documentation, for people that like to do that using a CLI. Great tip!
hvxl
Senior Member
Senior Member
Posts: 1965
Joined: Sat Jun 05, 2010 11:59 am
Contact:

Re: Creating my own OTGW firmware for the NodoShop version

Post by hvxl »

You can also download the older esptool from https://github.com/igrr/esptool-ck/releases. Then the command is:
  • esptool -cd nodemcu -cb 921600 -cf OTGW-firmware.ino.bin -ca 0x200000 -cf OTGW-firmware.spiffs.bin
I use 921600 baud, because at 115200 baud it takes ages. Especially because this tool downloads the whole 2MB SPIFFS. The python tool compresses that to 24848 bytes. So esptool takes over a minute to flash the device, while esptool.py does it in less than 20 seconds (both at 921600 baud).
Schelte
hvxl
Senior Member
Senior Member
Posts: 1965
Joined: Sat Jun 05, 2010 11:59 am
Contact:

Re: Creating my own OTGW firmware for the NodoShop version

Post by hvxl »

rvdbreemen wrote:The deperication of SPIFF is recent, you are so right that I need to implement LittleFS. It is on my bucketlist, but for now SPIFF does the job without a problem.
Converting to LittleFS is normally just a matter of replacing '#include <FS.h>' by '#include <LittleFS.h>' and a global replace of 'SPIFFS' into 'LittleFS'.
Schelte
rvdbreemen
Starting Member
Starting Member
Posts: 45
Joined: Sun Jan 19, 2020 2:04 pm

Re: Creating my own OTGW firmware for the NodoShop version

Post by rvdbreemen »

hvxl wrote:
rvdbreemen wrote:The deperication of SPIFF is recent, you are so right that I need to implement LittleFS. It is on my bucketlist, but for now SPIFF does the job without a problem.
Converting to LittleFS is normally just a matter of replacing '#include <FS.h>' by '#include <LittleFS.h>' and a global replace of 'SPIFFS' into 'LittleFS'.
Checking now what the impact is ;-) Thanks for the tip, just had not looked into this.
rvdbreemen
Starting Member
Starting Member
Posts: 45
Joined: Sun Jan 19, 2020 2:04 pm

Re: Creating my own OTGW firmware for the NodoShop version

Post by rvdbreemen »

hvxl wrote:You can also download the older esptool from https://github.com/igrr/esptool-ck/releases. Then the command is:
  • esptool -cd nodemcu -cb 921600 -cf OTGW-firmware.ino.bin -ca 0x200000 -cf OTGW-firmware.spiffs.bin
I use 921600 baud, because at 115200 baud it takes ages. Especially because this tool downloads the whole 2MB SPIFFS. The python tool compresses that to 24848 bytes. So esptool takes over a minute to flash the device, while esptool.py does it in less than 20 seconds (both at 921600 baud).
That's even better, I added it to the documentation, here.
mlommers
Starting Member
Starting Member
Posts: 16
Joined: Mon Jul 12, 2010 12:52 pm

Re: Creating my own OTGW firmware for the NodoShop version

Post by mlommers »

hvxl wrote:
mlommers wrote:When the OTGW is connected no other devices are supported to connect next to the OTGW.
Did you try, or is your conclusion based on the Nodo shop documentation again? I don't see a reason why it wouldn't be possible to connect temperature sensors in addition to an OTGW.
I did try, but didn't get OTGW data untill i removed the DS18B20 devices...maybe I did something wrong or it is another coincident configuration i missed at the same time. but after removing the other devices I got OTGW data in otmonitor
Templar
Member
Member
Posts: 178
Joined: Fri Mar 18, 2011 8:49 pm
Location: Netherlands

Re: Creating my own OTGW firmware for the NodoShop version

Post by Templar »

rvdbreemen wrote: .................. This got me thinking it should be possible to create OTGW firmware running on the NodeMcu 8266 hardware running on this gateway......
Hi rvdbreemen,

I've got a slightly differend hardware setup. The classic OTGW hardware with the Recom DC/DC convertor mod. And instead of the MAX232 IC, I connected a ESP8266-12E VCC=5V. On it I run the ESP-LINK: Wifi-Serial Bridge w/REST&MQTT V2.2.3. To use your Nodemcu firmware the only thing I need to do is altering these PIN definitions in the OTGW-Core.ino file? It has been 4 years ago I set this up..

Code: Select all

#define PIN_I2C_SDA 4
#define PIN_I2C_SCL 5
hvxl
Senior Member
Senior Member
Posts: 1965
Joined: Sat Jun 05, 2010 11:59 am
Contact:

Re: Creating my own OTGW firmware for the NodoShop version

Post by hvxl »

Another suggestion triggered by this topic: An option to send the appropriate SC command to the gateway every minute.
Schelte
rvdbreemen
Starting Member
Starting Member
Posts: 45
Joined: Sun Jan 19, 2020 2:04 pm

Re: Creating my own OTGW firmware for the NodoShop version

Post by rvdbreemen »

hvxl wrote:Another suggestion triggered by this topic: An option to send the appropriate SC command to the gateway every minute.
After I have a reliable PIC upgrade this is on my list of things to add to the firmware. Controlling the OTGW with advanced commands, like setting lock using the SC command. Or sending a time based setting at different moments in the day.

But first let’s make sure the PIC upgrade is 100% safe.
bartlemoose
Starting Member
Starting Member
Posts: 13
Joined: Thu Dec 17, 2020 10:44 pm

Re: Creating my own OTGW firmware for the NodoShop version

Post by bartlemoose »

Updated to 0.7.5, cheers :)
rvdbreemen
Starting Member
Starting Member
Posts: 45
Joined: Sun Jan 19, 2020 2:04 pm

Re: Creating my own OTGW firmware for the NodoShop version

Post by rvdbreemen »

Just released the next release of this OTGW firmware for the Nodoshop version, version 0.7.5.
Longer in development, but worth it. Still a large backlog of improvements to come.

This release features:
  • reliable and direct flash the otgw pic firmware version 5.0 from the ESP chip. The upgrade code was developed by Bron Schelte and now integrated in in my release.
  • breaking change: moving over to the LittleFS filesystem (reflashing needed)
  • toggle to turn off MQTT message integration
  • multiple bugfixes, in for example: settings page did not always save data
and much more... Read the README to find out more: https://github.com/rvdbreemen/OTGW-firmware
Please enjoy the latest release, if you find anything, just put an issue in at github, add code to grow the features, or add new ideas, or do a pull request to the codebase, documentation, wiki pages, ....

Kind regards,
Robert
franz
Starting Member
Starting Member
Posts: 6
Joined: Sun Feb 14, 2021 12:44 pm

Re: Creating my own OTGW firmware for the NodoShop version

Post by franz »

Hej Robert,

first - thanks for your work. Yesterday I soldered together and installed my Nodoshop OTGW and it worked flawlessly!

Now - I can read MQTT messages, but I cant figure how to send commands.

topic MQTT/command with one of the serial commands as payload , e.g. "TT=16" ?

Thanks,
Franz
rvdbreemen
Starting Member
Starting Member
Posts: 45
Joined: Sun Jan 19, 2020 2:04 pm

Re: Creating my own OTGW firmware for the NodoShop version

Post by rvdbreemen »

franz wrote: topic MQTT/command with one of the serial commands as payload , e.g. "TT=16" ?
The OTGW/command topic was broken for a few releases. It’s been fixed in v0.7.7. You should try that version to make it work.

Robert
franz
Starting Member
Starting Member
Posts: 6
Joined: Sun Feb 14, 2021 12:44 pm

Re: Creating my own OTGW firmware for the NodoShop version

Post by franz »

Hej,

thanks for the reply. I have 0.7.8+702 (25-02-2021) now. I tried the api first, no success. The website shows:
OTGW firmware

[/api/v1/otgw/command/TT=10] is not a valid
Is that how it is supposed to work? Haven't tried MQTT yet again.

Thanks,
Franz
franz
Starting Member
Starting Member
Posts: 6
Joined: Sun Feb 14, 2021 12:44 pm

Re: Creating my own OTGW firmware for the NodoShop version

Post by franz »

Hi again,

I have now tried to send a command by MQTT and succeeded. Thank you.

I still cant get the command API to work, I tried as below and always get the (incomplete) error message as per my previous post.

/api/v1/otgw/command/"OT=20"
/api/v1/otgw/command/OT20
/api/v1/otgw/command/{OT=20}

Maybe I am just blind?
Post Reply

Return to “Opentherm Gateway Forum”