Firmware 4 & Node-RED HTTP Beef

Since doing the Firmware 4 update, some HTTP request code that has been working for multiple years have stopped working - flow pictured below. It is very simple and the purpose is to send out messages through a http POST request.

Since doing the Firmware 4 update I have noticed I get this error in the debug window

(will have to upload this in comments as I can’t add more than one photo)

Remedies I have tried so far include:

  • Disable > Enable Node-RED
  • Restart Node-RED
  • Re-Import my whole flow
  • Restart my Groov Epic PR1
  • Ping test to 1.1.1.1 - 25ms response time as is normal for our network
  • Copied the code onto my laptop running the same version of Node-RED and ran it - this worked as expected

So I can confidently say that the service has internet access and has been restarted - even multiple times.

I’m kind of running out of ideas here, and I can’t think of what would be next. Has anyone else run into a similar issue? The fact that the code ran fine on another instance tells me that something in the update has obviously changed the way Node-RED on Opto Device talks to the net.

The firewall settings of the device have not changed, but maybe do I need to open a specific port to allow that http request to go out?

Update: I have also just updated the Web Server Certificate just in case- this hasn’t yielded any success.


(BOT Token has been crossed out for privacy)

Welcome to the forums @ot1 !

This is a tricky one. I heavily use the Telegram API, not on groov, but I have some experience so I’ll set up a similar test on my own EPIC and see what I can make of it.


Curious about some details:
→ Have you been able to successfully send web requests with any other APIs? or are you just working with Telegram?
→ Are you using EPIC or RIO? And is it on the same network as the laptop you used?

1 Like

Thanks you reply Terry - Indeed I am running another API request for a Denkovi PLC and that has been working well, no changes there.

I am running a Groov EPIC, and indeed it is on the same network as the laptop.

I will keep trying to trouble shoot, thought I might have been in luck by updating the web server cert but nope.

EDT: uploading the Node-RED log produced in the groov manage window, which unfortunately doesn’t yield any other response

I have pinged api.telegram.org from the exec node on the Groov EPIC, it’s getting a response but with a huge latency spike

Pinging to www.google.com yields about 32ms

EDIT (again): I have just double checked, installed I have the same Node.js version however the Node-RED version I have installed on my laptop is 4.0.9 vs the 4.0.2 which was installed via Firmware 4. I can’t imagine there would be any major differences though, I will downgrade on my laptop to confirm
Update: Fortunately or Unfortunately the code is still working. I can confirm I am running the exact same version of Node.Js and Node-RED as the Groov EPIC.

Its interesting that debug says https://api where the Node-RED log says http request. I would think it all should be https…
I don’t want to read toooooo much into that as it might just be a generic error vs a real one.

As @torchard said, we use Telegram in Node-RED a TON, but to be fair, its this node we use 100%

There is a bit of setup to it (using botFather to get the room ID for starters), but its been rock solid for 6+ years. And it allows for some interactivity as well, which can be both fun and serious.
I’m guessing you don’t need the interactivity and just want to smash out a message and not have to fuss with Telegram chat groups.

One thing I’d try is to swap out api.telegram.org for the IP address.
You know the saying… Its DNS, its always DNS.

(Not dodging why it broke on the update - just letting you know we have options).

2 Likes

I have just spent a bit of time trying to implement thatm and unfortunately I have just had the exact same result. Not working on Groov EPIC, returning an ‘aggregate error’ message. Copy and pasted exact same code to my laptop, works perfectly (although I think I’ve now been convinced to swap to the telegram node rather than using the HTTP Request node).

Unhandled rejection RequestError: AggregateError

at new RequestError (/home/dev/.node-red/node_modules/request-promise-core/lib/errors.js:14:15)

at plumbing.callback (/home/dev/.node-red/node_modules/request-promise-core/lib/plumbing.js:87:29)

at Request.RP$callback [as _callback] (/home/dev/.node-red/node_modules/request-promise-core/lib/plumbing.js:46:31)

at self.callback (/home/dev/.node-red/node_modules/@cypress/request/request.js:183:22)

at Request.emit (node:events:518:28)

at Request.onRequestError (/home/dev/.node-red/node_modules/@cypress/request/request.js:869:8)

at ClientRequest.emit (node:events:518:28)

at TLSSocket.socketErrorListener (node:_http_client:500:9)

at TLSSocket.emit (node:events:518:28)

at emitErrorNT (node:internal/streams/destroy:169:8)

at emitErrorCloseNT (node:internal/streams/destroy:128:3)

at process.processTicksAndRejections (node:internal/process/task_queues:82:21)

This is the error that is showing in Node-RED log on Groov Manage. This gives a bit of a better direction as it looks like some files just went funky after the new update - which is strange because I have never SSH’d in to change anything with the node-red files manually.

Reading this makes me think its not the 4.0 firmware (I mean it is, but only because of some versions)…

Not a great solution, however I have just opted for the route of relaying all of my messages intended for telegram through MQTT to another device that has an MQTT IN node sending the message to telegram from there. The solutions that were suggested on that HA forum post seem hacky and I’d rather not edit anything in the back end of the Opto22 out of naive reluctancy.

thank you for sending that though Ben, nice to know I’m not alone and it has given me some light in the benefit of googling the problem in other forums too.

Thanks for your help.

2 Likes