windkh / node-red-contrib-telegrambot

Telegram bot nodes for node-red.
Other
259 stars 116 forks source link

contrib-telegrambot not working #257

Closed JanOosthuizen closed 2 years ago

JanOosthuizen commented 2 years ago

Karl-Heinz Wind

NB: also see my ticket #248 for more software info. For some reason the telegrambot is not working on my Raspberry Pi 4. (Don't get ANY messages when I connect Debug node to receive bot node) Only get a error message after deploy. +-12Sec ( Error stopping node: Close timed out") I copied all the nodes and flows to my Windows 10 Node-Red and there the receive node is working 100%

Questions 1 Can it be that my Pi user don't have enough privileges? (I doubt it because all my other software MQTT, Influx software don't have a problem)

Questions 2 Maybe I must try install the contrib-telegrambot from scratch. How do I uninstall "node-red-contrib-telegrambot" completely . I did uninstall it from the pallet but it looks like there is still file's under cd ~/.node-red/node_modules

Will this command's do the "job"? 1) npm uninstall node-red-contrib-telegrambot 2) npm uninstall node-telegram-bot-api Node-Red Flow

JanOosthuizen commented 2 years ago

[ { "id": "fcfb558249716e2c", "type": "tab", "label": "Flow 2", "disabled": false, "info": "", "env": [] }, { "id": "7adcf6ab209720e8", "type": "telegram receiver", "z": "fcfb558249716e2c", "name": "TryAgain", "bot": "d26056f94c2689fd", "saveDataDir": "", "filterCommands": false, "x": 515, "y": 260, "wires": [ [ "ca88e9fdde7530ba" ], [ "3ecc334f7ccbda02" ] ], "l": false }, { "id": "ca88e9fdde7530ba", "type": "debug", "z": "fcfb558249716e2c", "name": "", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "false", "statusVal": "", "statusType": "auto", "x": 710, "y": 240, "wires": [] }, { "id": "3ecc334f7ccbda02", "type": "debug", "z": "fcfb558249716e2c", "name": "", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "false", "statusVal": "", "statusType": "auto", "x": 710, "y": 280, "wires": [] }, { "id": "d26056f94c2689fd", "type": "telegram bot", "botname": "BotNameProb1", "usernames": "BotUserProb1_bot", "chatids": "-749652758", "baseapiurl": "", "updatemode": "polling", "pollinterval": "300", "usesocks": false, "sockshost": "", "socksport": "6667", "socksusername": "anonymous", "sockspassword": "", "bothost": "", "botpath": "", "localbotport": "8443", "publicbotport": "8443", "privatekey": "", "certificate": "", "useselfsignedcertificate": false, "sslterminated": false, "verboselogging": true, "credentials": {} } ]

windkh commented 2 years ago

@JanOosthuizen … you can just delete the folders under node_modules and then npm install …

I do not have any idea what is wrong with your pi. It could be anything.

JanOosthuizen commented 2 years ago

How do I uninstall "node-red-contrib-telegrambot" completely ?

windkh commented 2 years ago

I would try what you suggested npm uninstall …

JanOosthuizen commented 2 years ago

What is Verbose Logging? Can help identifying the problem?

windkh commented 2 years ago

Verbose logging is useful when your bot can not send messages... then you will get additional details in the debug window.

JanOosthuizen commented 2 years ago

I found the problem ! To many underlying errors/faults in total on my flows. Little bit of cleanup and maintenance and then I got no more timeout faults on Node-Red when using this bot node.

windkh commented 2 years ago

So you had several config nodes with the same token?

JanOosthuizen commented 2 years ago

No At least not in my flows. (Don't know if a token can be written in some other file in the background?) Attempt 1 : I formatted the ssd and installed all software from scratch. Import all flows - result failed Attempt 2 : I formatted the ssd and installed all software from scratch. Start with only one flow with a bot in the flow - success ! Attempt 3 : I formatted the ssd and installed all software from scratch. Import all flows, disable some "possible problem" flows before deploy - success !