updating firmware via otmonitor

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

Moderator: hvxl

updating firmware via otmonitor

Postby bartlemoose » Tue Jan 12, 2021 6:02 pm

I've recently got a nodoshop opentherm gateway running with nodemcu wifi.

I'm trying to update the firmware to 4.2.8.2 (from 4.2.7) using otmonitor (4.4.1) but it repeatedly fails, I get a variety of errors.

On hitting "Program" sometimes it sits there for a while saying "Switching to self-programming mode" after a while then saying "Could not switch gateway to self-programming mode".

Sometimes it will say "Firmware update failed - 0 errors".

I've seen it also say "Manually reset the device", which I've done via powering the gateway off, leaving for a few seconds then back on. Also trying shorting the RESET jumper on the gateway.

Nothing I try seems to work. I have read that on boot up the device should be in self-programming mode for 1 minuter but I've tried rebooting it then immediately attempting a firmware push but that doesn't seem to work either.

Does anyone know if I'm doing anything wrong, are there some clear repeatable steps I can follow to push firmware via wifi?
bartlemoose
Starting Member
Starting Member
 
Posts: 11
Joined: December 2020

Re: updating firmware via otmonitor

Postby hvxl » Tue Jan 12, 2021 8:37 pm

This should work without the need for any manual action. If it doesn't, then I suspect there is a communication problem. Maybe the OTGW is too far from your WiFi access point? Are you able to communicate with it normally, without any delays or missing data?
Schelte
hvxl
Senior Member
Senior Member
 
Posts: 1422
Joined: June 2010

Re: updating firmware via otmonitor

Postby bartlemoose » Tue Jan 12, 2021 8:50 pm

hvxl wrote:This should work without the need for any manual action. If it doesn't, then I suspect there is a communication problem. Maybe the OTGW is too far from your WiFi access point? Are you able to communicate with it normally, without any delays or missing data?


Hmm that shouldn't be the case but it is possible.

I have wifi mesh throughout the house so it should be a strong signal where it is, when I bound it initially a different mesh station was close by, not the one it's near to right now.
bartlemoose
Starting Member
Starting Member
 
Posts: 11
Joined: December 2020

Re: updating firmware via otmonitor

Postby bartlemoose » Tue Jan 12, 2021 8:55 pm

Sorry still under moderation, can't edit the above.

But yes I do see drop outs, Home Assistant is seems really sketchy with the data it's pulling, often "unknown" and will show data sometimes, I wondered if my issues weren't related to "Fix spontaneous reset in monitor mode" fixed in 4.2.8 though. It could be the nodemcu using the older EasyESP R147 (as recommended in the guides) doesn't work too well with mesh.
bartlemoose
Starting Member
Starting Member
 
Posts: 11
Joined: December 2020

Re: updating firmware via otmonitor

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

I don't recommend upgrading unless you have a reliable connection. Communication errors could cause the upgrade to fail. It can then be difficult to recover.
Schelte
hvxl
Senior Member
Senior Member
 
Posts: 1422
Joined: June 2010

Re: updating firmware via otmonitor

Postby bartlemoose » Tue Jan 12, 2021 9:40 pm

On the face of it I don't think it's a bad wifi ignal. The wifi-mesh app shows it's connected to the nearest mesh node and signal strength is high.

I've unplugged the gateway from the boiler and brought it up stairs (mesh app shows it's moved to the correct node).

Tried uploading firmware again over wifi same results.

So I just tried with a TTL-USB device, connected the wires as the bottom image, moved the jumpers over :

Image

And even with the cable same results, so cannot switch to self-programming mode, please manually reset the gateway, I pull power and replug and nothing happens from there (I assume it should automatically push it).

Pulled nodeMCU, retried, same.

Feel like I'm missing something really obvious to be honest, I don't do a great deal with electronics.
bartlemoose
Starting Member
Starting Member
 
Posts: 11
Joined: December 2020

Re: updating firmware via otmonitor

Postby hvxl » Tue Jan 12, 2021 10:52 pm

That should definitely just work, even without pulling the power. Can you activate logging in OTmonitor and then issue the following two commands: 'PR=A', 'GW=R'? Then provide the log to me. You can just zip it up and attach it to a message here.
Schelte
hvxl
Senior Member
Senior Member
 
Posts: 1422
Joined: June 2010

Re: updating firmware via otmonitor

Postby bartlemoose » Tue Jan 12, 2021 11:09 pm

hvxl wrote:That should definitely just work, even without pulling the power. Can you activate logging in OTmonitor and then issue the following two commands: 'PR=A', 'GW=R'? Then provide the log to me. You can just zip it up and attach it to a message here.


Hmm there's very little in the log file.

otdata.txt has one line :

Code: Select all
;;;;;;;;;;;;;;;20210112;21:45:00


otlog.txt has 3 lines :

Code: Select all
21:44:37.416456  Command: PR=M
21:44:56.732274  Command: PR=A
21:45:02.277197  Command: GW=R


This was how it was initially, it didn't seem to do anything and I thought I was configuring it wrong till I connected it to a boiler, currently have it just sitting next to my computer here not connected to any opentherm device, just usb ttl to the pin headers + a 24v psu connected too.

It's starting to feel like the device won't work unless it's connected to a boiler and/or thermostat, would this be the case? Trouble is my boiler is downstairs and my computer upstairs, if it does need a device connecting I suppose I could try to run some wire downstairs to get it connected to both the boiler and the computer here.
bartlemoose
Starting Member
Starting Member
 
Posts: 11
Joined: December 2020

Re: updating firmware via otmonitor

Postby hvxl » Wed Jan 13, 2021 12:35 am

There's no response from the OTGW and no messages at all. That's not good. Without a boiler or thermostat attached you should still get R00000000 messages. Possibly the firmware has been partially upgraded and is now corrupt. That's probably why you are unable to flash it.

You can try to reload the firmware by starting the firmware upgrade. Then when OTmonitor asks to manually reset the OpenTherm Gateway, very briefly short the RST jumper - The one next to the PIC, not the RST/GND pins close to the NodeMCU. If it doesn't start downloading, try again. Make sure not to reset it again if the download does start.

If you can't get it to work, please make another log (not a data log) while you do a couple of PIC resets by shorting the RST jumper. This time please provide the zipped log as I asked. I am looking for data that may not come across when copy/pasting. I should then be able to tell if there is still a chance the PIC can be revived without a PIC programmer.
Schelte
hvxl
Senior Member
Senior Member
 
Posts: 1422
Joined: June 2010

Re: updating firmware via otmonitor

Postby bartlemoose » Wed Jan 13, 2021 8:35 pm

bartlemoose wrote:Feel like I'm missing something really obvious to be honest, I don't do a great deal with electronics.


Yes. So this :

Image

I had TX/RX mixed, I read that image as "this is the TX pin/cable" so obviously that's where I should connect RX right from the other side right? Nope, it's the TX cable from the other side so actually RX.

Switching these I was then able to flash new firmware via the USB/TTL.

I still can't flash via otmonitor and wifi nodemcu though. I get "could not switch to self-programming mode" or "Firmware update failed - 0 errors". Unit is next to my wifi here so I don't think it's signal.

I also have the ethernet module.

Testing each :

  • USB-TTL - On connect the log tab shows R00000000 messages, firmware flashes fine
  • Ethernet - On connect the log tab shows R00000000 messages, firmware flashes fine
  • NodeMCU - On connect the log tab shows R00000000 messages, firmware won't flash failing as above

I'm using R147 EasyESP as recommended, maybe this is just flakey, or maybe my ESP is faulty.

The remote firmware update is super useful, it would be nice to use wifi, running a cable down to the boiler would be possible but a bit of a pain.

Piccy, ethernet module currently connected, wifi module sitting next to it :

Image
bartlemoose
Starting Member
Starting Member
 
Posts: 11
Joined: December 2020

Re: updating firmware via otmonitor

Postby hvxl » Wed Jan 13, 2021 9:19 pm

Maybe the ESPEasy firmware was not configured correctly. I have tested upgrading the OTGW firmware with ESPEasy R147 and can confirm that it works.

You can also try the NodeMCU firmware created by another user on the forum. That doesn't require any configuration, other than your WiFi network.
Schelte
hvxl
Senior Member
Senior Member
 
Posts: 1422
Joined: June 2010

Re: updating firmware via otmonitor

Postby bartlemoose » Wed Jan 13, 2021 10:35 pm

hvxl wrote:Maybe the ESPEasy firmware was not configured correctly. I have tested upgrading the OTGW firmware with ESPEasy R147 and can confirm that it works.

You can also try the NodeMCU firmware created by another user on the forum. That doesn't require any configuration, other than your WiFi network.

Ok cheers for the guidance.

I've ordered a couple more NodeMCU V2s, I'll try redoing them, perhaps try with that other firmware too.
bartlemoose
Starting Member
Starting Member
 
Posts: 11
Joined: December 2020

Re: updating firmware via otmonitor

Postby tjfs » Fri Jan 15, 2021 5:08 pm

I had a similar problem, it turned out I'd forgotten to set the logging levels to 0 (see Nodo manual) which meant the firmware upload was being interrupted.
tjfs
Starting Member
Starting Member
 
Posts: 16
Joined: December 2020

Re: updating firmware via otmonitor

Postby bartlemoose » Fri Jan 15, 2021 7:13 pm

tjfs wrote:I had a similar problem, it turned out I'd forgotten to set the logging levels to 0 (see Nodo manual) which meant the firmware upload was being interrupted.


Cheers, this was definitely set for me.

I've switched to the alternative firmware mentioned above which seems to be working.

In hindsight I suspect it maybe when I configured the nodeMCU, on the interface you must select a reporting mode which defaults to Domotica. I'm using Home Assistant so it wasn't clear which I'd pick, I also remember reading on the opentherm gateway that I don't want a "standalone" so avoided picking that on the nodeMCU menu and left it on Domotica.

I can imagine a scenario where, if the ip the gateway is reporting to doesn't exist you're going to have a lot of timeouts while it's trying to push data, and it may be the case that this is blocking processing somewhat as it waits for a response, causing the issues I encountered. This is a theory anyway, I haven't tested if it's actually the case.

In hindsight I should probably have picked standalone, standalone on that menu is entirely different to a standalone gateway.

I've spent quite a lot of time trying to figure all this out, reading/translating docs in different languages, plugging, unplugging, flashing, there's lots to configure and it's a lot to take in if you're not up on electronics and similar. I have a setup working using rvdbreemen's custom firmware now and it seems to be doing what it should so I'll stick with that for the time being.
bartlemoose
Starting Member
Starting Member
 
Posts: 11
Joined: December 2020


Return to Opentherm Gateway Forum

Who is online

Users browsing this forum: No registered users and 1 guest