Good Morning.
I am using Contrib-TelgramBot-Home quite successfully. Everything works.
I am battling to get the code right to send a global variable from a function node as a message with TelegramBot-home..
Kindly assist.
Good Morning.
I am using Contrib-TelgramBot-Home quite successfully. Everything works.
I am battling to get the code right to send a global variable from a function node as a message with TelegramBot-home..
Kindly assist.
As we cannot guess your setup, your messages, payload, flow(s), it is kind of hard to provide help.
Can you share incoming example data and expected output data ?
I want to send the following variables as a message with Telegram-bot-home
Blockquote
var fridgetemp = global.get("FridgeTemp");
var fridgealarm = global.get("FridgeAlarm")
var power_on = global.get("Power_On");
msg.payload = fridgealarm + fridgetemp + " " + "Celsuis." + " " + "Power = " + power_on;
return msg;
Blockquote
And what do you see in a debug node after that function?
Not sure how useful that node still is given that it hasn't been updated in 12m and the Telegram bot API has changed quite a bit since then.
I have changed over to the standard contrib-telegrambot and now i have everything working.
Many thanks i am sorted.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.