I just recognized that it looks like the parameters of the telegramphoto action have changed. Unfortunately I could not find this in the docs. I had a running action in release 2.1 that send an image to a group:
sendTelegramPhoto("groupname","URL...snap.jpg",null, "user", "password")
With Release 2.2 I get the following error:
017-12-27 11:41:39.632 [WARN ] [ab.action.telegram.internal.Telegram] - Failed to retrieve an image. Received status: HTTP/1.1 401 Unauthorized
If I look into the github I looks like as if there are additional parameters necessary to get a telegram photo within release 2.2. However I was not able to figure them out in the correct order…
If anybody uses a working telegram photo action I’d appreciate the right sequence of the parameters
I am behind the changes in
sendTelegramPhoto. The changes are simply additions, and they should not break old behaviour. Caller can optionally now specify HTTP timeout as well number of retries.
For example, you are using
sendTelegramPhoto(group, url, caption, username, password), which is still supported.
HTTP 401 is server response which means that server denied access to the URL. Are you sure you have the right password? I suggest you try the query locally as well, using a browser.
For example, https://user:firstname.lastname@example.org/basic-auth/user/passwd authenticates to https://httpbin.org/basic-auth/user/passwd with username
user and password
P.S. good point regarding documentation, I need to add the new call signatures to there as well.
I’m getting the same error since updating to 2.2. The query works locally, so it should not be a password issue.
I recommend raising a bug / issue in github. Perhaps some library is changed in 2.1->2.2, and maintainers would know. Please refer to this discussion in the ticket.
@ssalonen thank you for your reply. I also checked locally with http://httpbin.org/basic-auth/user/passwd (not https) and I get the image as used to in 2.1. Didn’t try the earlier snapshots and jumped directly from 2.1 release to 2.2 release this week.
Although using openHAB for some time now I have no github account nor have I opened a bug / issue so far. How and where can this be done?
You do need to register an account to github – it’s free of charge & pretty fast to do. I think it would be the best so you can join any requests/further queries regarding this topic.
After logging create a new issue to openhab1-addons repository, by using this link: https://github.com/openhab/openhab1-addons/issues/new . Just fill in the issue template and you should be good to go.
Anyone else having issues with the TelegramPhoto action and http: URL besides @pune2001 and me since the update to 2.2 ?
Or is just another layer 8 error ?
I also face the same problems as you described.
Since update to 2.2 (purging old OH 2.1, reinstall with apt and then restore backup of data) I also get that error. For testing purposes I tried sending a picture without credentials but also didn’t work.
In one of around 50 tries sending a pic worked (local picture, no credentials) but I couldn’t reproduce this success even with the same rule configuration.
The config in a rule which once worked locally:
sendTelegramPhoto(“xyzbot”,“http://188.8.131.52:8080/static/webcamsnaps/snap.jpg”,null, “”, “”)
@Nork could you please second this in the issue I opened in Github? Same here, local URL. I tried to remove the Portnumbers but without any change. Same error (unauthorized"). I tried to put the caption null between “…” but also no change. Worked perfectly fine in 2.1.
I think the root cause was identified (surprise, surprise, it was side effect of my PR). See the github for more details – there is also a workaround.
Works again as expected. Thanks for fixing.
Thank you for fixing so fast. Tested the Fix .jar and it works perfectly fine. Same parameters as in 2.1.
Thank 9037568 at github! Great that this was resolved fast enough, shame it got to the release
Thank you Bernd and Ssalonen i found this topic very useful
so i resolved