Creating my own OTGW firmware for the NodoShop version

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

Moderator: hvxl

Re: Creating my own OTGW firmware for the NodoShop version

Postby rvdbreemen » Tue Jan 12, 2021 8:24 pm

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!
rvdbreemen
Starting Member
Starting Member
 
Posts: 16
Joined: January 2020

Re: Creating my own OTGW firmware for the NodoShop version

Postby hvxl » Tue Jan 12, 2021 9:29 pm

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: 1425
Joined: June 2010

Re: Creating my own OTGW firmware for the NodoShop version

Postby hvxl » Tue Jan 12, 2021 9:34 pm

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
hvxl
Senior Member
Senior Member
 
Posts: 1425
Joined: June 2010

Re: Creating my own OTGW firmware for the NodoShop version

Postby rvdbreemen » Tue Jan 12, 2021 10:31 pm

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: 16
Joined: January 2020

Re: Creating my own OTGW firmware for the NodoShop version

Postby rvdbreemen » Tue Jan 12, 2021 10:35 pm

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.
rvdbreemen
Starting Member
Starting Member
 
Posts: 16
Joined: January 2020

Re: Creating my own OTGW firmware for the NodoShop version

Postby mlommers » Thu Jan 14, 2021 9:52 am

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
mlommers
Starting Member
Starting Member
 
Posts: 16
Joined: July 2010

Re: Creating my own OTGW firmware for the NodoShop version

Postby Templar » Sat Jan 16, 2021 3:27 pm

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
Templar
Member
Member
 
Posts: 171
Joined: March 2011
Location: Netherlands

Re: Creating my own OTGW firmware for the NodoShop version

Postby hvxl » Tue Jan 19, 2021 9:24 pm

Another suggestion triggered by this topic: An option to send the appropriate SC command to the gateway every minute.
Schelte
hvxl
Senior Member
Senior Member
 
Posts: 1425
Joined: June 2010

Previous

Return to Opentherm Gateway Forum

Who is online

Users browsing this forum: rvdbreemen and 1 guest