I am able to send a message using a http get-node, so I know I have the correct token. When I try sending a message with the Telegram Sender-node, nothing happens (it does not even output an error to a debug node).
But I get two errors everytime it polls:
Unknown error. Trying again.
and "EFATAL: Error: connect ENOENT /(MY_TOKEN)/getUpdates"
When I type node -v in terminal it says v8.11.1 and when I type nodejs -v it says v8.14.0.
Node-red is version v0.19.5.
I am running Ubuntu 18.04.1 LTS (GNU/Linux 4.15.0-42-generic x86_64).
The Telegram Send node gets the following msg object (injected with a timestamp as payload):
Also there is something wrong with your nodejs installation. node and nodejs should be the same thing. How did you install nodejs?
What does apt policy nodejs show?
[Edit] Also which node and which nodejs
I would get rid of the manually installed one, I am sure it will be ok with later versions.
On Ubuntu you can use the Pi install script to install/update node-red and that will give you a consistent set of tools to work with, and you can use it again if you want to upgrade. If you were going to do that though, get rid of the local one first. https://nodered.org/docs/hardware/raspberrypi
OK thanks But the reason I installed the older version in the first place was because of that very problem. So my question/errors still remain…
What else might cause that?
EDIT:
On my Mac I have v8.11.0, maybe it's that simple. How do I downgrade successfully to that version on Ubuntu? I have gotten rid of the local one. (In the link you provided, I did not find any way to downgrade, but maybe I missed it?).
You don't need to downgrade, that isn't the issue. I'm using v8.13.0 on one Pi, 8.14.0 on another and v8.12.0 on my Windows 10 PC. All 3 devices run Node-RED and all 3 have different Telegram bots running on them successfully.
Do make sure that you only have each bot running on 1 device however. You cannot run the same bot connection on two different devices or indeed two different instances of Node-RED.
I'm not aware of any dependencies that it needs but you could check the docs for the node. I certainly don't ever remember any dependencies. But then I've been using Telegram bots for quite a long time now. Though thinking about it, I only recently set up a telegram bot on my Windows dev PC which is fairly new - don't think I'd done it on this PC previously and I put a new install of Node-RED on it when I got it. I'm sure there were no dependencies. However, I always install build essentials and I'd always recommend getting your platform build tools installed before doing much with Node.JS.
OK. I did not install anything else on my Mac either, but I figured that there maybe is some piece that does not come with Ubuntu that I'm missing? I have unfortunately already installed build essential and everything is up-to-date. Not quite sure what the platform build tools for my platform is though? Kind of new to this, if you have any links that would be appreciated.
Stop Node-RED if it is running, rename your userDir folder, npm uninstall -g node-red (and anything else you have installed globally). Then remove both copies of node and nvm. A reboot at this stage would probably be sensible.
Next, install node v8 latest using the instructions on the node website. Make sure it is working correctly.
Now install node-red according to the instructions. Make sure that is working correctly. Then install the telegram node, configure and try it out.
I have the same problem and spent a lot time to find a solution. But with no success:
On my first installation, running Node Red v1.2.9 the node-red-contrib-telegrambot is working fine as expected.
On my new System (Intel NUC + Debian) I installed Node Red using the script for Raspberry Pi. Node Red is running as a service and the only thing running on that system.
If I try sending a message there is happening absolute nothing, even no message on both outputs of the sender node.
I would be really happy if someone has an idea!