Hi,
I have been using the "sender" node from: "node-red-controb-telegrambot" in my home assistant.
Many moons ago, I followed the documentation from: https://flows.nodered.org/node/node-red-contrib-telegrambot to set it up and it has served me very will for a long time
Every time movement was detected, home-assistant took a picture, saved it to a file, and then the "sender" node from: "node-red-controb-telegrambot" posted that picture to my telegram channel.
Until last week.... I did some updates and must have broken it.
Here, below, is the output from a Debug Node before the message enters the "sender" node.
IMPORTANT:
if I change the payload.type from photo to message, then I receive a (text) message in telegram, so the connectivity seems OK. But with photo or document, I get nothing. Also I don't get an error message in the Node-red UI. (I'd be interested in any pointers to potential debug logs)
Also the file "/config/www/cam_captures/camera.westcam1_20240105_161813.jpg" does exist. On the filesystem, it is actually under /usr/share/hassio/homeassistant/www/cam_captures/camera.westcam1_20240105_161813.jpg but it has always worked like this. I assume it is a chroot re-mapping for home-assistant.
Not sure if it is important:
My issues (a domino effect) started by a volume running out space, but now there is more than enough free space on that harddrive
UPDATE:
Node-red is logging in the plugin section of Home-Assistant invalid file HTTP URL specified: URL host is empty
Unhandled rejection Error: ETELEGRAM: 400 Bad Request: invalid file HTTP URL specified: URL host is empty
at /config/node_modules/node-telegram-bot-api/src/telegram.js:284:15
at tryCatcher (/config/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/config/node_modules/bluebird/js/release/promise.js:547:31)
at Promise._settlePromise (/config/node_modules/bluebird/js/release/promise.js:604:18)
at Promise._settlePromise0 (/config/node_modules/bluebird/js/release/promise.js:649:10)
at Promise._settlePromises (/config/node_modules/bluebird/js/release/promise.js:729:18)
at _drainQueueStep (/config/node_modules/bluebird/js/release/async.js:93:12)
at _drainQueue (/config/node_modules/bluebird/js/release/async.js:86:9)
at Async._drainQueues (/config/node_modules/bluebird/js/release/async.js:102:5)
at Immediate.Async.drainQueues [as _onImmediate] (/config/node_modules/bluebird/js/release/async.js:15:14)
at processImmediate (node:internal/timers:476:21)
Not sure why it mentions HTTP URL
Also, Node-red is running in a container and I don't know the mapping to the root of that volume.
I tried a offsets,
But it worked in the past
Thank you for testing @dynamicdave
I finally restored an old Home Assistant backup and things are working again.
I upgraded HA core and several other things and the "sender" node from: "node-red-controb-telegrambot" in my Node-Red in my HA is still working..
BUT: root cause
I kept my Node-Red Nodered on 14.2.2. I assume that it was the upgrade of Node-Red from 14.2.2 to 16.0.2 that broke the sender node of node-red-contrib-telegrambot v 8.4.0 package.
I'm running out of time now, and I will have to address the issue later
I have a crontab that makes a Backup of my HA every Sunday evening and pushes it to my Dropbox. I want this backup to happen before I experiment any further
Just note this version means nothing to us.
The current version of Node RED is 3.1.3 - HA seems to handle their own versioning with Node RED.
As said by @dynamicdave most here do not use HA or container platforms.
So if this error is being caused by some layer in your setup, you will need to seek guidance from said community.
With that said ETELEGRAM: 400 Bad Request doesn't appear that it would be caused by the layers involved, maybe telegram has updated their API, and the node you are using has not been patched
NR Version:
interesting... so, the version number may be the version of the HA integration middleware for NR.
I restarted NR and found the real NR version in the log
Welcome to Node-RED
===================
6 Jan 17:26:11 - [info] Node-RED version: v3.0.2
6 Jan 17:26:11 - [info] Node.js version: v18.16.0
6 Jan 17:26:11 - [info] Linux 6.1.21-v8+ arm LE
6 Jan 17:26:14 - [info] Loading palette nodes
This Community
Good feedback about this community, thank you.
If I need more help I will go to the HA forums
One last thing about the error:
Unhandled rejection Error: ETELEGRAM: 400 Bad Request: invalid file HTTP URL specified: URL host is empty
In my setup of NR v3.0.2, this node accepts a filepath, but after the upgrade it seems to expect an HTTP URL... or at least the error message seems to suggest that
Things may have changed either in NR or in the HA integration
More things to discover later..
/chris