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:
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.
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.
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.
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.
@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.