Closed lolodomo closed 7 years ago
Using the proxy would mean an additional transfer of image data between the client UI and the openHAB server (the data is already provided through the REST API). So the current implementation in Basic UI and Classic UI consisting in not requesting the proxy in such a case is better but the solution with proxy could be interesting for other UIs that don't want to implement specifc code for image items.
@kaikreuzer @maggu2810 @sjka : I am waiting for your thoughts before going further.
We could rather implement another service/servlet that will provide image from image items. The proxy servlet would redirect to it for image tems.
Finally I think it would be easier to simply fix the Android app.
And what about the iOS app? Will there also be a fix/implementation required?
Yes surely
I don't know if I get the point. The openHAB android app (also the iOS one?) does not support image item and no one implement the image item handling in that app. Correct? There are IMHO only a few item types in ESH and the clients should support them. Adding another code just because of missing item support in client seems a little bit strange to me.
I agree with you.
I have now an android dev env and I should be able, I hope, to add support of image item.
I close the debate.
For information, I have now implemented support for image items in the Android app, it was only few lines of code to add. https://github.com/openhab/openhab.android/pull/414
I opened a request for support for image item in Android app (https://github.com/openhab/openhab.android/issues/216) 14 months ago and no one is willing to implement this feature. It might be not easy at all, I don't know.
I was the one who implemented this feature in Basic UI and Classic UI and now I am asking myself why I have not simply updated the proxy to provide image data from image items ? It would have avoided any specific code in UIs and image items would have been automatically supported by any UI already supporting image URL. This solution was probably forgiven when we discussed about implementation in Basic UI and Classic UI but I don't remember why.
Updating the proxy would I think mainly require building HTTP headers and pushing the raw data as body ?
WDYT ?