Thanks for this guide, it was super helpful. I have it working for the most part except I cannot get the log file to work for the life of me. I have the file located in /www/telegram/telegram.log and I have tried using /local/telegram/telegram.log and even /shared/ and /config/ but none of them seem to work.
Also I’m unable to send something to two different users using the same bot. I added both user id’s separated with a comma to the config but only my phone gets the message. Anyone have this working?
bv101
April 5, 2020, 4:39pm
111
Same question here, cant get the logfile working.
And some google-fu is not helping
I figured out the location for the log file. I have /config/www/telegram/telegram.log
and that works fine for me. You just need to create the file first and point the node to the correct location. I wish the documentation was a little more clear.
1 Like
ne0ark
(Ne0ark)
June 24, 2020, 12:30am
113
Whenever I open Edit Button node I am getting a pop up:
Also not of my buttons are saving for some reason.
dawess
(Dieter)
August 24, 2020, 11:02am
114
Hi ne0ark,
do you still need help?
How does your “nodered addon” configuration part look like?
please remove secrets
Thanks for this, I’m looking to set a log file up myself, can I ask what OS you are using?
sjmotew
(Steve MO2)
September 12, 2020, 7:42pm
116
Need some help with what should be relatively simple. I have Telegram bot set-up in Node Red, able to send static message through when triggered, however I am not clear how to pass msg contents (topic and payload) from Node Red flow into the message node for telegram. I think this sits with the need to add a function node or set formatting in the telegram message noe, but need help with formatting to get contents through to telegram.
Thanks in advance.
sender
September 12, 2020, 8:16pm
117
Can you give an example of what you want to send? I have some running and might be able to help.
sjmotew
(Steve MO2)
September 12, 2020, 10:30pm
118
Thanks. I have a location entity state (from iOS app) sent from HA into Node Red and Node Red picks this up and parses a locale based on some processing that winds up completing with a msg.payload:
{"topic":"Location Alert","payload":"Joe is at work.","data":{"entity_id":"device_tracker.xxxxx","old_state":{"entity_id":"device_tracker.xxxx","state":"work","attributes":....}
I want to just send the message payload “Joe is at work” through to Telegram through the Telegram_Sender node. I can set up a separate “Text” message node for each different payload, however would rather just send the payload from one of many through a single flow if that makes sense?
sender
September 13, 2020, 10:23am
119
HI, can you try to make a function node with:
msg.payload = {}
msg.payload.chatId = YOURCHATID
msg.payload.type = "message"
msg.payload.content = msg.payload
return msg;
Sorry for the late reply. I’m using a Ubuntu virtual machine on my Windows PC.
No problem, thanks for the reply. I managed to find it in the end
sender
December 7, 2020, 1:51pm
122
Hello,
I have this running for a very long time very successfully.
But now it is time to multiply… I want an extra phone to receive the same messages.
I use:
Read all documentation, googled, tried with chatids, usernames, etc. But I can’t get my head around it.
What do I need to do to send a flow-outcome to multiple phones? Where do I need to “multiply”?
Depends how you want to setup Telegram on the second phone, a separate/dedicated Telegram account (for use by another individual) or a shared Telegram account for both phones (only used by you).
If you use a separate Telegram account, for example, you can add a second Telegram configuration node in Node-RED.
As far as I known you also can add the second user ID in the existing Telegram bot configuration node.
Documentation:
Also beware, as far I understand, using Telegram in HA (by configuration made in configuration.yaml) is separated from the Node-RED configuration, so don’t mix that up.
Documentation:
I didn’t tried this myself, I have an other setup (dedicated Node-RED config on a dedicated Node-RED server) so maybe someone else could chime in.
EDIT: Also you can check @gerard33 solution if it is suitable for you:
Thanks for this documentation!
I have Telegram bot integration with HA already running for a while and it’s a great combination.
I see you are using 3 Telegram bots. It’s also possible to use 1 bot and add that bot to 3 (or more) groups.
Then you can send messages to a group using notify.telegram_group1, notify.telegram_group2 etc.
When using this you have to add the chatid of the group (starting with -) to the allowed_chat_ids of the platform.
Maybe this solution is useful for some people …
and/or
https://community.home-assistant.io/t/telegram-bot-group-chat-to-control-garden-lights-with-inline-keyboard
Hi all,
I don’t know why but for months all my node-red-contrib-chatbot nodes had the same look, and recently nothing work any more and it refused to update in node-red add-on.
I found the working trick here below and now I have the newest nodes withe the adequate illustrations ands hopefully it works !
opened 08:18PM - 30 Mar 21 UTC
Please help.
2021-03-30T20:13:59.743Z Установить : node-red-contrib-chatbot… 0.19.7
2021-03-30T20:13:59.820Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production [email protected]
2021-03-30T20:14:12.569Z [err] npm WARN
2021-03-30T20:14:12.569Z [err] deprecated [email protected] : Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future
2021-03-30T20:14:15.790Z [err] npm
2021-03-30T20:14:15.790Z [err]
2021-03-30T20:14:15.790Z [err] WARN
2021-03-30T20:14:15.790Z [err]
2021-03-30T20:14:15.790Z [err] deprecated
2021-03-30T20:14:15.790Z [err] [email protected] : Please see https://github.com/lydell/urix#deprecated
2021-03-30T20:14:15.793Z [err] npm
2021-03-30T20:14:15.793Z [err]
2021-03-30T20:14:15.793Z [err] WARN
2021-03-30T20:14:15.793Z [err]
2021-03-30T20:14:15.793Z [err] deprecated
2021-03-30T20:14:15.794Z [err] [email protected] : https://github.com/lydell/resolve-url#deprecated
2021-03-30T20:14:16.166Z [err] npm
2021-03-30T20:14:16.166Z [err]
2021-03-30T20:14:16.166Z [err] WARN
2021-03-30T20:14:16.166Z [err]
2021-03-30T20:14:16.166Z [err] deprecated
2021-03-30T20:14:16.167Z [err] [email protected] : Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410
2021-03-30T20:14:16.654Z [err] npm WARN deprecated [email protected] : core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
2021-03-30T20:14:17.225Z [err] npm WARN
2021-03-30T20:14:17.225Z [err] deprecated [email protected] : Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future
2021-03-30T20:14:23.928Z [err] npm
2021-03-30T20:14:23.928Z [err]
2021-03-30T20:14:23.928Z [err] WARN
2021-03-30T20:14:23.928Z [err]
2021-03-30T20:14:23.928Z [err] deprecated
2021-03-30T20:14:23.928Z [err] [email protected] : If using 2.x branch, please upgrade to at least 2.1.6 to avoid a serious bug with socket data flow and an import issue introduced in 2.1.0
2021-03-30T20:14:43.096Z [out]
2021-03-30T20:14:43.096Z [out] > [email protected] install /config/node-red/node_modules/sqlite3
2021-03-30T20:14:43.096Z [out] > node-pre-gyp install --fallback-to-build
2021-03-30T20:14:43.096Z [out]
2021-03-30T20:14:43.467Z [err] node-pre-gyp
2021-03-30T20:14:43.468Z [err] WARN Using request for node-pre-gyp https download
2021-03-30T20:14:43.468Z [err]
2021-03-30T20:14:44.204Z [err] node-pre-gyp
2021-03-30T20:14:44.205Z [err] WARN Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.2.0/node-v83-linux-x64.tar.gz
2021-03-30T20:14:44.205Z [err] node-pre-gyp WARN
2021-03-30T20:14:44.205Z [err] Pre-built binaries not found for [email protected] and [email protected] (node-v83 ABI, musl) (falling back to source compile with node-gyp)
2021-03-30T20:14:45.344Z [err] gyp
2021-03-30T20:14:45.345Z [err]
2021-03-30T20:14:45.345Z [err] ERR!
2021-03-30T20:14:45.345Z [err]
2021-03-30T20:14:45.345Z [err] build error
2021-03-30T20:14:45.345Z [err]
2021-03-30T20:14:45.346Z [err] gyp
2021-03-30T20:14:45.346Z [err]
2021-03-30T20:14:45.346Z [err] ERR!
2021-03-30T20:14:45.347Z [err]
2021-03-30T20:14:45.347Z [err] stack
2021-03-30T20:14:45.347Z [err] Error: not found: make
2021-03-30T20:14:45.347Z [err] gyp
2021-03-30T20:14:45.347Z [err]
2021-03-30T20:14:45.347Z [err] ERR!
2021-03-30T20:14:45.347Z [err]
2021-03-30T20:14:45.347Z [err] stack
2021-03-30T20:14:45.347Z [err] at getNotFoundError (/usr/lib/node_modules/npm/node_modules/which/which.js:13:12)
2021-03-30T20:14:45.348Z [err] gyp
2021-03-30T20:14:45.348Z [err]
2021-03-30T20:14:45.348Z [err] ERR!
2021-03-30T20:14:45.348Z [err]
2021-03-30T20:14:45.348Z [err] stack
2021-03-30T20:14:45.348Z [err] at F (/usr/lib/node_modules/npm/node_modules/which/which.js:68:19)
2021-03-30T20:14:45.348Z [err] gyp
2021-03-30T20:14:45.348Z [err]
2021-03-30T20:14:45.348Z [err] ERR!
2021-03-30T20:14:45.348Z [err]
2021-03-30T20:14:45.349Z [err] stack
2021-03-30T20:14:45.349Z [err] at E (/usr/lib/node_modules/npm/node_modules/which/which.js:80:29)
2021-03-30T20:14:45.349Z [err] gyp
2021-03-30T20:14:45.349Z [err]
2021-03-30T20:14:45.349Z [err] ERR!
2021-03-30T20:14:45.349Z [err]
2021-03-30T20:14:45.349Z [err] stack
2021-03-30T20:14:45.349Z [err] at /usr/lib/node_modules/npm/node_modules/which/which.js:89:16
2021-03-30T20:14:45.349Z [err] gyp
2021-03-30T20:14:45.350Z [err]
2021-03-30T20:14:45.350Z [err] ERR!
2021-03-30T20:14:45.350Z [err]
2021-03-30T20:14:45.350Z [err] stack
2021-03-30T20:14:45.350Z [err] at /usr/lib/node_modules/npm/node_modules/isexe/index.js:42:5
2021-03-30T20:14:45.350Z [err] gyp
2021-03-30T20:14:45.350Z [err]
2021-03-30T20:14:45.350Z [err] ERR!
2021-03-30T20:14:45.350Z [err]
2021-03-30T20:14:45.350Z [err] stack
2021-03-30T20:14:45.350Z [err] at /usr/lib/node_modules/npm/node_modules/isexe/mode.js:8:5
2021-03-30T20:14:45.351Z [err] gyp
2021-03-30T20:14:45.351Z [err]
2021-03-30T20:14:45.351Z [err] ERR!
2021-03-30T20:14:45.351Z [err]
2021-03-30T20:14:45.351Z [err] stack
2021-03-30T20:14:45.351Z [err] at FSReqCallback.oncomplete (fs.js:183:21)
2021-03-30T20:14:45.351Z [err] gyp
2021-03-30T20:14:45.351Z [err]
2021-03-30T20:14:45.352Z [err] ERR!
2021-03-30T20:14:45.352Z [err]
2021-03-30T20:14:45.352Z [err] System
2021-03-30T20:14:45.352Z [err] Linux 4.19.0-16-amd64
2021-03-30T20:14:45.352Z [err] gyp
2021-03-30T20:14:45.352Z [err]
2021-03-30T20:14:45.352Z [err] ERR!
2021-03-30T20:14:45.352Z [err]
2021-03-30T20:14:45.352Z [err] command
2021-03-30T20:14:45.353Z [err] "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/config/node-red/node_modules/sqlite3/lib/binding/node-v83-linux-x64/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/config/node-red/node_modules/sqlite3/lib/binding/node-v83-linux-x64" "--napi_version=7" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v83"
2021-03-30T20:14:45.353Z [err] gyp
2021-03-30T20:14:45.353Z [err]
2021-03-30T20:14:45.353Z [err] ERR!
2021-03-30T20:14:45.353Z [err]
2021-03-30T20:14:45.353Z [err] cwd
2021-03-30T20:14:45.353Z [err] /config/node-red/node_modules/sqlite3
2021-03-30T20:14:45.353Z [err] gyp
2021-03-30T20:14:45.353Z [err]
2021-03-30T20:14:45.354Z [err] ERR!
2021-03-30T20:14:45.354Z [err]
2021-03-30T20:14:45.354Z [err] node -v
2021-03-30T20:14:45.354Z [err] v14.16.0
2021-03-30T20:14:45.354Z [err] gyp
2021-03-30T20:14:45.354Z [err]
2021-03-30T20:14:45.354Z [err] ERR!
2021-03-30T20:14:45.354Z [err]
2021-03-30T20:14:45.354Z [err] node-gyp -v
2021-03-30T20:14:45.354Z [err] v5.1.0
2021-03-30T20:14:45.355Z [err] gyp
2021-03-30T20:14:45.355Z [err]
2021-03-30T20:14:45.355Z [err] ERR!
2021-03-30T20:14:45.355Z [err]
2021-03-30T20:14:45.355Z [err] not ok
2021-03-30T20:14:45.355Z [err]
2021-03-30T20:14:45.358Z [err] node-pre-gyp
2021-03-30T20:14:45.358Z [err] ERR! build error
2021-03-30T20:14:45.359Z [err] node-pre-gyp ERR! stack
2021-03-30T20:14:45.359Z [err] Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/config/node-red/node_modules/sqlite3/lib/binding/node-v83-linux-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/config/node-red/node_modules/sqlite3/lib/binding/node-v83-linux-x64 --napi_version=7 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1)
2021-03-30T20:14:45.359Z [err] node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/config/node-red/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
2021-03-30T20:14:45.359Z [err] node-pre-gyp ERR! stack at ChildProcess.emit (events.js:315:20)
2021-03-30T20:14:45.359Z [err] node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1048:16)
2021-03-30T20:14:45.359Z [err] node-pre-gyp ERR!
2021-03-30T20:14:45.359Z [err] stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
2021-03-30T20:14:45.359Z [err] node-pre-gyp ERR! System
2021-03-30T20:14:45.360Z [err] Linux 4.19.0-16-amd64
2021-03-30T20:14:45.360Z [err] node-pre-gyp ERR!
2021-03-30T20:14:45.360Z [err] command "/usr/bin/node" "/config/node-red/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
2021-03-30T20:14:45.360Z [err] node-pre-gyp ERR!
2021-03-30T20:14:45.360Z [err] cwd /config/node-red/node_modules/sqlite3
2021-03-30T20:14:45.360Z [err] node-pre-gyp
2021-03-30T20:14:45.360Z [err] ERR! node -v v14.16.0
2021-03-30T20:14:45.360Z [err] node-pre-gyp
2021-03-30T20:14:45.360Z [err] ERR! node-pre-gyp -v v0.11.0
2021-03-30T20:14:45.360Z [err] node-pre-gyp
2021-03-30T20:14:45.360Z [err] ERR! not ok
2021-03-30T20:14:45.361Z [out] Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/config/node-red/node_modules/sqlite3/lib/binding/node-v83-linux-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/config/node-red/node_modules/sqlite3/lib/binding/node-v83-linux-x64 --napi_version=7 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1)
2021-03-30T20:14:46.746Z [err] npm
2021-03-30T20:14:46.746Z [err] WARN [email protected] requires a peer of @discordjs/uws@^10.149.0 but none is installed. You must install peer dependencies yourself.
2021-03-30T20:14:46.763Z [err] npm WARN [email protected] requires a peer of typescript@>=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >=3.0.0-dev || >= 3.1.0-dev || >= 3.2.0-dev but none is installed. You must install peer dependencies yourself.
2021-03-30T20:14:46.780Z [err] npm WARN [email protected] requires a peer of typescript@>=2.1.0 || >=2.1.0-dev || >=2.2.0-dev || >=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >= 3.0.0-dev || >= 3.1.0-dev but none is installed. You must install peer dependencies yourself.
2021-03-30T20:14:46.790Z [err] npm WARN [email protected] requires a peer of @types/[email protected] but none is installed. You must install peer dependencies yourself.
2021-03-30T20:14:46.801Z [err] npm WARN [email protected] requires a peer of babel-core@6 but none is installed. You must install peer dependencies yourself.
2021-03-30T20:14:46.813Z [err] npm WARN [email protected] requires a peer of webpack@2 || 3 || 4 but none is installed. You must install peer dependencies yourself.
2021-03-30T20:14:46.813Z [err]
2021-03-30T20:14:46.835Z [err] npm ERR! code ELIFECYCLE
2021-03-30T20:14:46.835Z [err] npm ERR! errno 1
2021-03-30T20:14:46.839Z [err] npm ERR! [email protected] install: `node-pre-gyp install --fallback-to-build`
2021-03-30T20:14:46.840Z [err] npm ERR! Exit status 1
2021-03-30T20:14:46.840Z [err] npm ERR!
2021-03-30T20:14:46.840Z [err] npm ERR! Failed at the [email protected] install script.
2021-03-30T20:14:46.840Z [err] npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2021-03-30T20:14:46.883Z [err]
2021-03-30T20:14:46.883Z [err] npm ERR! A complete log of this run can be found in:
2021-03-30T20:14:46.883Z [err] npm ERR! /root/.npm/_logs/2021-03-30T20_14_46_874Z-debug.log
2021-03-30T20:14:46.897Z rc=1
1 Like
sparklee
(Lee)
July 28, 2022, 1:36am
125
Hi guys, I know this is an older post but I find suitable for some of my projects. I can’t figure out where to find this node. Can some one provide the exact name of this particular node or its replacement?
Thanks in advance.
Mikefila
(Mike Fila)
July 28, 2022, 2:52pm
126
I’d guess that it would be the same node that is linked in the very first post.
@Domoticon is it possible to use variables in button node? i cant get it working…
Sorry for the late respond.
I don’t know for sure, but I think you need an upstream function node to construct a msg.payload as input for the button .
Check the button node inside help:
Buttons can be created programmatically by an upstream Function node
passing array of buttons in the message payload: …
HA_noobie
(Dan)
October 25, 2023, 12:21am
129
Thank you tremendously for this method of determining the chatid for my Telegram bot. It worked perfectly!