Never tried it, but I guess you can add multiple users in the receiver/send nodes:
*Comma separated list of userId authorized to use the chatBot*
Never tried it, but I guess you can add multiple users in the receiver/send nodes:
*Comma separated list of userId authorized to use the chatBot*
Was someone able to send videos recorded by a cam? Last time I tried it wasnât possible:
âError: EFATAL: Unsupported Buffer file-typeâ
It can be done with telegram_bot and a call service node. Make sure you set the bot up in YAML as âbroadcastâ instead of âpollingâ as it will cause conflicts with Redbot if not.
Iâm trying to set this up but no matter what I do I end up with errors in NodeRed.
It must be something with its config because I was able to complete all six steps and I have received text with testing
When it comes to my NodeRed config:
Iâm not sure where the problem lies as when I hit timestamp it records contents of the message in the log in my shared folder but the message is not forwarded to the telegram.
Also I get tons of polling errors:
error: [polling_error] {âcodeâ:âEFATALâ,âmessageâ:âEFATAL: Error: connect ENOENT /bot8888888:token/getUpdatesâ}
I do not get any output from Authorized node in debug nodes. Finally here is edited output from chatbot debug node in Nodered log in hassio:
-- OUTBOUND MESSAGE --
type: message
content: Hello, testing, testing
chatId: id_number
messageId: null
inbound: false
silent: false
fallback: null
options:
Error: EFATAL: Error: connect ENOENT /bot888888888:TOKEN/sendMessage
26 Oct 13:15:40 - [error] [chatbot-telegram-node:a9929f17.22e57] Error: EFATAL: Error: connect ENOENT /bot888888888:TOKEN/sendMessage
--------------------- ChatBot context (id:a60b8141.3a12b8) ---------------------
chatId: chatid number
userId: null
messageId: null
transport: telegram
authorized: false
pending: false
language: null
currentConversationNode: 24d49947.fea4ee
currentConversationNode_at: Sat Oct 26 2019 13:15:40 GMT+0100
--------------------- ChatBot message (id:a60b8141.3a12b8) ---------------------
type: message
content: Hello, testing, testing
chatId: id_number
messageId: null
inbound: false
silent: false
fallback: null
options:
Any advice would be really great, thx.
Do you have a Telegram bot setup with polling in your YAML config somewhere? If so, change it to broadcast and that will stop the errors. If that is the case, youâre basically running the same bot twice and it will cause issues sending messages.
I donât think you need that conversation node either. Connect the authorized node directly to the text node.
No, I do not. I have set it up only in NodeRed.
Is it possible you have the bot running in both the development environment and the production environment, in different nodes?
Also, according to the error, it looks like its coming from chatbot-telegram-node:a9929f17.22e57. Have you looked at that one specifically? That doesnât look like one of the send/receive nodes as that would be named chatbot-telegram-send or chatbot-telegram-receive.
I was running both in development and in production. I have changed it to development and there is no difference, Iâm still getting polling errors.
That error points towards telegram config node on all flows. It disappears when I put authorized node after text node.
If I remove it then I donât receive any messages on my debug node. I have changed the flow so it looks like below:
Since you mentioned Telegram bot setup in Yaml config, is it also required for this to work?
Yeah, with an inject node you need the conversation node, didnât think of that earlier.
Setting it up in YAML is only if you want to use a call service node to send messages, rather than using Redbot like youâre doing. AFAIK, thereâs no reason to have it setup in YAML if you are using REDBOT.
Are there any other telegram bot nodes other than Redbot that youâve set up in testing?
I setup this telegram bot along side REdbot when I was testing and had a similar issue as you, after uninstalling it the issue went away
No, I donât have any other bot nodes.
Did you check some basics first?
FYI, the Authorized-node should only be used behind a Receiver-node. It should not be used for sending. When sending messages it is only sends messages to the user ID setting of the Sender-node
To be more clear, the Authorization-node is used to manage authorized/unauthorized request from the bot to Node-Red.
Option: If you have multiple users configured in the Sender-node (or none = visible to everyone/complete world!), but you only want to send a message to one specific user you should use a Coversation-node. Also when used as @PickleSlice mentioned.
Something another weird thing I noticed. Sometimes it will happen, by some reason, the conversation routing get stuck in a loop.
This can be noticed by setting a debug node connected directly to the Receiver-node and watch the Node-Red debug-tab.
When sending a message with the Telegram Messenger app and no data will be shown, you should check the Node-Red Telegram-bot Context settings:
Now Node-Red will reset the Telegram-bot Context-memory and sometimes things come to live again.
Just something I want to share, maybe it can help you solve some strange problemsâŚ
To add-on to what @Domoticon said, starting over is sometimes the way to go, as it undoes anything that you might have missed.
Just a simple questionâŚAm I supposed to have to manually ~regexp away all âunderscoreâ characters in my outgoing messages to telegram users?
Since my telegram notifier chokes on them
The log says (when sending the text âtest3_â):
[homeassistant.components.telegram_bot] Error sending message: Can't parse entities: can't find end of the entity starting at byte offset 5.
I know the underscore is a markdown char, but should the ha-logic choke on it?
I can survive it now, by adding â| replaceâ to all my strings I send, but it feels a bit annoying, so I cant help but wonder if it is working as designedâŚ
Br,
Taisto
OK, I have decided to start again from scratch (third time).
https://api.telegram.org/bot<AUTHENTICATION_TOKEN>/sendMessage?chat_id=<USER_ID>&text=testing
to send URL in my web browser. Received reply message from my bot with text testing.So far the above worked for me every time. It is only when I move to NodeRed I start to get errors.
In node red in the sender node I have filled following fields:
Here is my flow (without the authorization node):
and here is the output from my telegram.log
My_userID < [TELEGRAM] Sun Oct 27 2019 17:11:54 GMT+0000 - Testing, testing, testing
The error from the flow which points to the: 75b9a33a.4b256c node and when I click on it, it points here:
I have no clue why this doesnât work.
Compare what youâre doing to a write up that I did. Maybe youâre missing a step somewhere?
Weird
Did you have the parse setting set to html?
Did you disabled the Track and Pass through setting for your test-nodes-setup?
Did you try to reboot the HA Node-Red integration?
Can you try to set the HA Node-Red integration network port host-port to 1880?
Personally I donât use Node-Red Telegram in the HA Node-Red integration (separate on an other RasPi). I could try that this evening.
EDIT: FYI, ENOENT means ENOENT: no such file or directory. It could be a package (npm) error. Donât know what to do with this info (yet), though.
I have been wondering if this is specific config issue. I run Hassio on my NUC which runs Proxmox and I can reach HA externally with duckdns addon. Just want to clarify one thing, do I need to have Telegram enabled in Home Assistant or is it only required when I want to use call service node with Telegram?
@PickleSlice I will try this as well but so far I can see only one difference, you have parse set to none I have to HTML
I you want to use it only in Node-Red, you donât have to enable it in HA. When you want to use a HA call service, you have to configure it in HA (not necessary to install a Node-Red Telegram add-on).
I just did a test on my Hassio install on a RasPi 3+.
node-red-contrib-chatbot will not work on a Node-Red Hassio integration because of a failing node-pre-gyp install. Now I remembered what @frenck was saying back in April:
As I mentioned before, I use a separate Node-Red server (docker, nodered/node-red-docker). I see this deprecated and is now available as nodered/node-red.
So I suggest you use the HA Telegram integration and call the HA services to use Telegram (like @PickleSlice does)
I will check if node-red-contrib-telegrambot-home is working for Hassio on my RasPi.