I have newly installed node-red in Ubuntu 20 OS successfully. I have installed node-red-contrib-telegrambot package from npm too. But when I am simply importing "receiver" node of teelgram its keep giving error, details of node and error are as follows:
Node:
Errors:
In server logs: telegram" 18 Feb 12:05:26 - [warn] [telegram bot:hex_decimal id] Unknown error. Trying again.
In UI logs: ETELEGRAM: 404 Not Found
I have tried searching Online and in here forums but didn't get much on this one, my node-red project has NOTHING apart from this only node, any help/guidance is greatly appreciated.
What versions of nodejs and node-red did you install?
Does the Ubuntu have internet access?
Have you setup a bot and entered the API key?
Lastly, what do you mean by "when I am simply importing "receiver" node of teelgram its keep giving error"? Can you describe in steps what you do and where you see this error?
Thanks for your time here, following are the answers on your questions:
Yes, its an aws server and similar setup for me running fine for another aws server(inbound rules are added and port 1880 is opened to take traffic since I can hit link in browser).
Yes I have created a bot from "Bot father" and entered token provided by it into config, I didn't share it since I thought it could be a security issue etc.
I mean I am getting 2 errors, one ETELEGRAM: 404 Not Found on node-red UI side(after applying verbose logging option of telegram receiver) and another in server /var/syslogs is the location and error is: "telegram" 18 Feb 12:05:26 - [warn] [telegram bot:hex_decimal id] Unknown error. Trying again..
Kindly do let me know if any other information is required, cheers.
NOTE: There is nothing present in this project apart from this node and yet its giving this error, just adding this point here.
Telegram doesn't communicate to the telegram servers on port 1880. It goes out (from the node-red server) to https://api.telegram.org - does your setup permit https requests to go out of the node environment?
For your suggestion: try a HTTP Request node - see if you get a 200 response.
could you please do guide me how to do so?
For node version when I do a node -v I get v10.19.0 AND for node-red I get Node-RED version: v2.2.1 .
For steps, I installed node js first then npm followed by node-red-contrib-telegrambot, then I logged into 1880 port UI of node-js, gone to manage pallets and installed again to UI node-red-contrib-telegrambot.
once these done I dragged and dropped telegram's receiver node and once I given all details for bot. token etc and deployed it, it started giving errors.
Node-red v2+ has a minimum requirement of nodejs v12 (v10 is EOL)
For ubuntu, the recommendation is to use the installer script detailed in the node-red docs. You can still run the installer script & add --node14 to the end to force an upgrade.
So now the only option is I need to upgrade my node and npm also? Kindly confirm once and I could do the same, is it required to remove node, npm OR we can upgrade them itself? Thanks for your time and guidance here.
I have updated node's version to node -v v14.19.0 and node version is v2.2.1. When I again installed node-red-contrib-telegrambot and try putting simple receiver it gives me same errors
Could you please guide here, will be grateful to you.
You have simply created an endpoint and tested it from localhost. That doesn't test node --> telegram. You were supposed to try using the http request node to test connectivity from your node-red instance to the telegram Https endpoint.
Thanks @Steve-Mcl for answer. I have tried this code from link provided in previous posts. Could you please guide me on how exactly I could test that, I am sorry I am not getting it now to check from node to telegram check. Will be grateful go you
Thanks @Steve-Mcl, I have used following json file for flow(only change link and rest is from your guided url). [ { "id": "11167f67.5d5031", "type": "inject", "z": "44d1b5142cfbb4d4", "name": "cars on craigslist", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": true, "onceDelay": "20", "topic": "", "payload": "http://vancouver.craigslist.org/search/sss?format=rss&query=cars", "payloadType": "str", "x": 130, "y": 260, "wires": [ [ "70154cd4.de1444" ] ] } ]
And when I set frequency to 20 sec or so for inject node then I get following output in console:
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>Bots: An introduction for developers</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Bots are third-party applications that run inside Telegram. Users can interact with bots by sending them messages, commandsâŚ">
<meta property="og:title" content="Bots: An introduction for developers">
<meta property="og:image" content="75f7c457f2561cbf84">
<meta property="og:description" content="Bots are third-party applications that run inside Telegram. Users can interact with bots by sending them messages, commandsâŚ">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?215" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class=...
I have set https://api.telegram.org in http_request node.
Thanks @Steve-Mcl, for your time and help here. Its a GREAT forum with knowledgeable people here , appreciate your help and guidance here
FYI please!! I have figured out the problem what it was.
actually error message(ETELEGRAM: 404 Not Found)which I understood later) was self explanatory(some how ) So when I had to give token in receiver of telegram node I have given it after colon. Lets say, token isetcetc:abcdefghijkl so I have not given etcetc I missed it(may be because of newline bot father has given me, though its a miss which created this error).
I actually come across a thread in SO(stack overflow) where they mentioned to get details to telegram link its pattern should be like: https://api.telegram.org/bot_name:bot_token so when I read that it clicked into my mind and I re-checked my token then BINGO I found complete token and copy/pasted it and it worked fine then.
I am not having right now that SO link with me, will update it here if I get it. I again appreciate help of @Steve-Mcl and forum here