Telegram Plug-in to send text, images and video notifications
-
Contact!
Had to make a new token to make it work, theres no expiry of them, i hope?
Now i have to learn how to send "special" characters, it didnt even like "!".. But i don't intend to yell in my notifications anyway.
Sent one from reactor too Patrick.
To all you developer guys; Awesome job! thankyou for making this great HA system! Hope to join in on making some contributions myself.
-
didn't find the Message function in this forum, and couldn't send pictures in "chat":
@toggledbits , there's a small UI bug in the stable release:
Other than that, its f**in awesome.
-
I can't reproduce it. What version of AltUI are you on? (see More > Plugins)
-
@perh said in Telegram Plug-in to send text, images and video notifications:
Now i have to learn how to send "special" characters, it didnt even like "!"
It should work out of the box. I have emojis in my notifications and they are correctly encoded.
-
Thats weird, this is the error i get with "Hello!" :
luup_log:755: VeraTelegram(nil@194): executeCommand("curl -k -H 'Content-type: application/json' 'https://api.telegram.org/botXX:XX/sendMessage?parse_mode=MarkdownV2&chat_id=-362200779&text=Hello%21&disable_notification=false'"): "{\"ok\":false,\"error_code\":400,\"description\":\"Bad Request: can't parse entities: Character '!' is reserved and must be escaped with the preceding '\\\\'\"}"
-
therealdbreplied to PerH on Nov 17, 2020, 7:36 AM last edited by therealdb Nov 17, 2020, 2:37 AM
@perh Yep, I tracked it down on the other forum as well. As a temporary solution, set Format parameter to Markdown. I defaulted to MarkdownV2, but
_ * [ ] ( ) ~ > # + - = | { } . !
should be escaped and I didn't pay attention to this. Sorry, I'll push an update to GitHub very soon, to default to Markdown anyway.
-
@toggledbits
I've got something similar. Running ALTUI 2.50.2549 (from the bottom banner)
Installed the Reactor.stable branch for the Pushover enhancements.
Oddly, although my Plugins tab for Reactor reads GitHub.stable, my Reactor Logic Summary page notes:Version: 3.9develop-20318.1220 config 20263 cdata 20045 ui 20190 pluginDevice 98 LuaXP 1.0.2enh
-
That's correct. The stable branch is a development branch, so it will have development tagging on the versions. The stable branch is updated when work from development is tested and passes.
-
I'm seeing this as well with the dropdowns in both Firefox and Chrome. Running stable version of Reactor and v2.50 of ALTUI
-
The issue is resolved in the new "stable" version.
Perhaps this discussion should be moved from this Telegram thread? it's not really related.
-
@therealdb done
-
@therealdb
Sorry db, thanks PerH - 'nuff said, properly chastened
-
I have set this up for some text notifications and it is working as it should, thanks for a very nice plugin!
With the added support in Reactor it makes a nice pair!I also tested sending an image (in the format http://url/folder/image.jpg) and it works as specified in the users guide on github.
What I cannot get to work however is when the url to the image contains user and login, which is required to get an image from my cameras.
I.e. the url to the image is :http://user:passwd@192.168.x.y/jpg/image.jpg
.
I have tried encoding it withhttps://www.urlencoder.org/
, but it does not seem to work.Any ideas on how to solve this?
//ArcherS
-
@therealdb yes I think it should be basic authorisation to send credentials via http in the form of
http://username:password@example.com/
to retreive an image from an Axis IP Camera and send it via Telegram.Maybe there is a better way to do it?
I have used curl calling a .sh file from OpenLuup for sending a few commands to the camera (for enabling/disabling privacy mask) in the past.What I did try, but failed was to get the camera to send an image directly. It has support for sending images via http/https, but I didn't get that to work. So far I have done it via email instead since it supports that as well.
I think however that quite a few cameras do not support sending themselves, so getting it to work in the plugin with basic auth would hopefully be of use anyway.
//ArcherS
-
Try with
curl --user daniel:secret http://example.com/
And if it's working, I'll try a patch.
-
Edit: I tested to modify mu curl from
curl --digest -u daniel:secret...
tocurl --user daniel:secret...
and that does not seem to work. It seems as if the Axis cameras require Digest mode for auth.Original post:
@therealdb not sure how to test, I tried from the prompt on my OpenLuup PC running Ubuntu but it didn't seem to work, I got "This server could not verify that you are authorized...".But in the .sh file that I call from OpenLuup I have:
curl --digest -u daniel:secret "http://192.168.x.x/axis-cgi/admin/param.cgi?action=update&root_Image_I0_Overlay_MaskWindows_M0_Enabled=no"
(This is a cgi command to the camera.)
And that curl works.Let me know if I should test something else!
//ArcherS
-
Will have to have a look at this!
C