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 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).
Creating my own OTGW firmware for the NodoShop version
Moderator: hvxl
-
- Starting Member
- Posts: 45
- Joined: Sun Jan 19, 2020 2:04 pm
Re: Creating my own OTGW firmware for the NodoShop version
Re: Creating my own OTGW firmware for the NodoShop version
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
Schelte
Re: Creating my own OTGW firmware for the NodoShop version
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'.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.
Schelte
-
- Starting Member
- Posts: 45
- Joined: Sun Jan 19, 2020 2:04 pm
Re: Creating my own OTGW firmware for the NodoShop version
Checking now what the impact ishvxl wrote: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'.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.

-
- Starting Member
- Posts: 45
- Joined: Sun Jan 19, 2020 2:04 pm
Re: Creating my own OTGW firmware for the NodoShop version
That's even better, I added it to the documentation, here.hvxl wrote:You can also download the older esptool from https://github.com/igrr/esptool-ck/releases. Then the command is: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).
- esptool -cd nodemcu -cb 921600 -cf OTGW-firmware.ino.bin -ca 0x200000 -cf OTGW-firmware.spiffs.bin
Re: Creating my own OTGW firmware for the NodoShop version
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 otmonitorhvxl wrote: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.mlommers wrote:When the OTGW is connected no other devices are supported to connect next to the OTGW.
Re: Creating my own OTGW firmware for the NodoShop version
Hi rvdbreemen,rvdbreemen wrote: .................. This got me thinking it should be possible to create OTGW firmware running on the NodeMcu 8266 hardware running on this gateway......
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
Re: Creating my own OTGW firmware for the NodoShop version
Another suggestion triggered by this topic: An option to send the appropriate SC command to the gateway every minute.
Schelte
-
- Starting Member
- Posts: 45
- Joined: Sun Jan 19, 2020 2:04 pm
Re: Creating my own OTGW firmware for the NodoShop version
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.hvxl wrote:Another suggestion triggered by this topic: An option to send the appropriate SC command to the gateway every minute.
But first let’s make sure the PIC upgrade is 100% safe.
-
- Starting Member
- Posts: 15
- Joined: Thu Dec 17, 2020 10:44 pm
Re: Creating my own OTGW firmware for the NodoShop version
Updated to 0.7.5, cheers 

-
- Starting Member
- Posts: 45
- Joined: Sun Jan 19, 2020 2:04 pm
Re: Creating my own OTGW firmware for the NodoShop version
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:
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
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
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
Re: Creating my own OTGW firmware for the NodoShop version
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
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
-
- Starting Member
- Posts: 45
- Joined: Sun Jan 19, 2020 2:04 pm
Re: Creating my own OTGW firmware for the NodoShop version
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.franz wrote: topic MQTT/command with one of the serial commands as payload , e.g. "TT=16" ?
Robert
Re: Creating my own OTGW firmware for the NodoShop version
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:
Thanks,
Franz
thanks for the reply. I have 0.7.8+702 (25-02-2021) now. I tried the api first, no success. The website shows:
Is that how it is supposed to work? Haven't tried MQTT yet again.OTGW firmware
[/api/v1/otgw/command/TT=10] is not a valid
Thanks,
Franz
Re: Creating my own OTGW firmware for the NodoShop version
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?
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?