Reputation: 3
Firstly I want to say I am a novice to programming. But I want to learn. I do know logic and want to make things for myself using Node Red for IoT.
I was trying to figure out how do send messages to and from telegram through node red. So that once I can do that I can connect other devices that can listen to my messaged from telegram and be controlled via node red and vice-versa.
Here's what I have already done so far.
1. Installed both of the following modules in Node red TelegramBot and Redbot(chatbot) via NPM and for this example I am using Redbot to send my message.
2. Setup a telegram bot successfully and got my API key for the bot
3. Got my API key and ChatID (which was really a Pita BTW)
4 I followed guide - https://www.npmjs.com/package/node-red-contrib-chatbot to setup my Node Red Flow. the basic flow which looks like this. NodeRed Flow
But my problem is when I send anything from my Telegram bot, NodeRed pick up something as I see the "Debug tab" updating. But it only says
"msg : string [44]Unable to find context().global in Node-RED" When I click the error it takes me back to the instance of Telegram I setup already.
I know I am doing something wrong here but what is that I am just not sure. Can someone help. I am sure I am missing something very simple.
Upvotes: 0
Views: 2026
Reputation: 59751
There is an open issue for this problem on the package's github page:
https://github.com/guidone/node-red-contrib-chatbot/issues/28
And a what looks like a pull request that will fix it:
https://github.com/guidone/node-red-contrib-chatbot/pull/29
Upvotes: 0