Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

telegram notifications do not work #22

Open
alan-rpi opened this issue Mar 14, 2020 · 2 comments
Open

telegram notifications do not work #22

alan-rpi opened this issue Mar 14, 2020 · 2 comments

Comments

@alan-rpi
Copy link

To replicate follow instructions at https://www.domoticz.com/wiki/Telegram_Bot to create a telegram a/c, create a bot and get the API key, and then obtain the Chat ID.

In Domoticz Settings / Notifications tab, paste the API key and Chat ID into the Telegram settings (as the bottom of the page) and press Test. Message: "Notification Sent - should arrive at your device soon" pops up. No message arrives. Log error:

 2020-03-14 15:58:27.965 Status: Notification: Domoticz test
2020-03-14 15:58:28.016 Notification sent (telegram) => Failed
2020-03-14 15:58:28.024 Active notification Subsystems: email, telegram (2/13)
2020-03-14 15:58:28.016 Error: Telegram: 

There is no problem when sending a message via the CLI:
Open the Domoticz CLI in Portainer and connect. Paste the following (after inserting the API key and Chat ID):
curl --data chat_id=<CHAT ID> --data-urlencode "text=Some complex text $25 78%" "https://api.telegram.org/bot<API KEY>/sendMessage"
It returns:
{"ok":true,"result":{"message_id":67,"from":{"id":985736213,"is_bot":true,"first_name":"xxxxxxx","username":"xxxxxxxxx"},"chat":{"id":xxxxxxxxx,"first_name":"xxxxxx","username":"xxxxxx","type":"private"},"date":1584201822,"text":"Some complex text 5 78%"}}root@c826cdca9643:/#

Does the problem have the same issue as sending email?

@joshuacox
Copy link
Owner

I am now on telegram and will test this soon.

@mortyone
Copy link

mortyone commented Dec 7, 2020

Telegram may just need port 443 also opened when running "docker create"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants