openhab / openhab1-addons

Add-ons for openHAB 1.x
Eclipse Public License 2.0
3.43k stars 1.69k forks source link

weather binding and my.openhab doesn't work #2034

Open staehler opened 9 years ago

staehler commented 9 years ago

when connected to openhab via my.openhab (habdroid) the weather binding webview (url="/weather?locationId=in&layout=weather&iconset=colorful") just shows "unauthorized".

teichsta commented 9 years ago

could you please have a look at this @gerrieg? Thanks, Thomas E.-E.

adrianmihai83 commented 9 years ago

Same thing happens to me, is there a solution to this?

screenshot attached screenshot_2015-09-14-17-47-32screenshot_2015-09-14-17-48-26

staehler commented 9 years ago

No, it seems there is no solution available ... unfortunately.

adrianmihai83 commented 9 years ago

This is a problem I encountered in previous builds also, to be more precise it didn't work for me in any of the builds. There are other things concerning me, other problems that make this nice opensource to be useless and that is the case of the missing icons in HabDroid when using myopenhab. And the most frustrating thing is that nobody answers, either way, is this thing checked out, is it not...is it left to be forgotten in the never ending new issues... Or maybe it is not worthy of a feature...

I have to roll back the runtime to get it working decently, there is an urge to add to the build numbers, add complexity with the expence of working things. I had used other software for the last 9 mounths and decided to come back to check things out. The thing that got me to come back is, and I quote here: "Well, the openHAB 1.x core runtime has been very stable and thus did not see much evolution during the last two releases. We will keep it this way and will only concentrate on security fixes and critical patches from now on." Instantly I thought, well, this is a mature software, everything has been fixed, time to use it propertly... Now, the greatest feature, myopenhab - to be more precise, the integration of the dedicated mobile application with myopenhab service - is useless...

But hey, you can't be upset, it's opensource, as everybody will say: use it or leave it!

Edit: this is what happens when accesing myopenhab from browser, so I guess that this is not integrated in myopenhab service: screenshot_2015-09-15-11-50-21

eschizoid commented 8 years ago

@gerrieg is there any update regarding to this?

Seems to be related to this:

https://github.com/openhab/openhab.android/issues/127

gerrieg commented 8 years ago

I don't know how to fix this in the weather binding. The weather URL is relative, so the weather URL in my.openhab a device is calling is my.openhab.org/weather. That URL might not be forwarded to the openhab server.

watou commented 8 years ago

Have you tried home.openHAB.org instead of my.openHAB. org?

eschizoid commented 8 years ago

@watou you meant to use that host as part of the Webview url or change the url when using the external OAuth authentication?

EDIT: Still getting Unauthorized when using home.openHAB.org as Remote URL on the iPhone.

watou commented 8 years ago

I recall @belovictor adding home.openhab.org to allow reverse proxying of all URLs on your openHAB server, so it wouldn't be a URL you used in your sitemap, just the URL to reach your server via home.openhab.org instead of my.openhab.org.

eschizoid commented 8 years ago

@watou Yeah, I just tried both approaches and still getting the Unauthorized

watou commented 8 years ago

Sorry, @eschizoid, out of ideas at the moment...

eschizoid commented 8 years ago

@watou, thanks for your help. I think we will have to wait for @belovictor and see wha he has to say regarding to this.

jaydee73 commented 8 years ago

@belovictor : Any updates on this issue? Have you seen this already? (as you didn't reply to the last comment).

digitaldan commented 8 years ago

The problem is my.openhab only forwards requests to /rest/* and a few more "blessed" URL patterns, bindings that attach to other URL locations will not be forwarded. One solution is to add "/weather*" to the allowed patterns. Other solutions will probably require a larger refactoring. With OH2 I have noticed a few missing locations, so I would vote to add this one as well .

digitaldan commented 8 years ago

@watou do you want to assign this to me? I will try to get this into a future release, no eta just yet on when that will be.

watou commented 8 years ago

Before it gets assigned, could you try the URL https://home.openhab.org/ instead of https://my.openhab.org? I think I recall @belovictor added that so the service would forward all requests.

eschizoid commented 8 years ago

Before it gets assigned, could you try the URL https://home.openhab.org/ instead of https://my.openhab.org? I think I recall @belovictor added that so the service would forward all requests.

@watou I did that while ago and it didn't make any difference.

jaydee73 commented 8 years ago

when I access the URL with home.openhab.org I'll get an "unauthorized" message in the webview frame (doesn't matter if I choose "ignore SSL certificate" or not). When I choose my.openhab.org, I'll get "Cannot get /weather?.....". So it makes a difference, but only in case of different error messages. :)

watou commented 8 years ago

with home.openhab.org I'll get an "unauthorized" message ... my.openhab.org, I'll get "Cannot get /weather?....."

@jaydee73 This is good information that might be useful to @belovictor regarding the "home.openhab.org" URL, in case it would be possible to allow the weather binding's URIs to be forwarded.

botura commented 8 years ago

Exactly the same errors here.