openhab-cloud
openhab-cloud copied to clipboard
openHAB Cloud & OH 3.0.0.M2 & Android App
I have issues with combination of android app, OH 3.0.0M2 and latest OpenHab Cloud. As Im debug is problem with comunication beetween OH3 server and Cloud server... In android app Local connection work as must and without issues but when I try connect by Remote server option in android app over Cloud server I can't access to sitemaps. App normally register to "Firebase Cloud Messaging" but hen try load sitemap show 401 error.
In openHAB Cloud logs I get that:
MOBILE_IP - USER@DOMAIN [06/Nov/2020:17:43:55 +0000] "GET /rest/ HTTP/1.1" 200 2132 "-" "openHAB client for Android" MOBILE_IP - USER@DOMAIN [06/Nov/2020:17:43:56 +0000] "GET /rest/sitemaps HTTP/1.1" 401 74 "-" "openHAB client for Android"
On OpenHAB server I see that in log:
17:47:02.909 [DEBUG] [.io.openhabcloud.internal.CloudClient] - on(): request 17:47:02.911 [DEBUG] [.io.openhabcloud.internal.CloudClient] - Got request 71 17:47:02.912 [DEBUG] [.io.openhabcloud.internal.CloudClient] - {"host":"OH_CLOUD_DOMAIN","cache-control":"no-cache","accept-encoding":"gzip","user-agent":"openhab-cloud/0.0.1"} 17:47:02.914 [DEBUG] [.io.openhabcloud.internal.CloudClient] - Request method is GET 17:47:02.915 [DEBUG] [.io.openhabcloud.internal.CloudClient] - Jetty set header host = OH_CLOUD_DOMAIN 17:47:02.916 [DEBUG] [.io.openhabcloud.internal.CloudClient] - Jetty set header cache-control = no-cache 17:47:02.917 [DEBUG] [.io.openhabcloud.internal.CloudClient] - Jetty set header accept-encoding = gzip 17:47:02.918 [DEBUG] [.io.openhabcloud.internal.CloudClient] - Jetty set header user-agent = openhab-cloud/0.0.1 17:47:02.948 [DEBUG] [.io.openhabcloud.internal.CloudClient] - Jetty finished receiving response header 17:47:02.950 [DEBUG] [.io.openhabcloud.internal.CloudClient] - Sent headers to request 71 17:47:02.951 [DEBUG] [.io.openhabcloud.internal.CloudClient] - {"headers":{"Transfer-Encoding":"chunked","Server":"Jetty(9.4.20.v20190813)","Date":"Fri, 06 Nov 2020 17:47:02 GMT","Content-Type":"application/json"},"responseStatusCode":200,"responseStatusText":"OK","id":71} 17:47:02.953 [DEBUG] [.io.openhabcloud.internal.CloudClient] - Jetty received response content of size 2120 17:47:02.954 [DEBUG] [.io.openhabcloud.internal.CloudClient] - Sent content to request 71 17:47:02.962 [DEBUG] [.io.openhabcloud.internal.CloudClient] - Finished responding to request 71 17:47:03.391 [DEBUG] [.io.openhabcloud.internal.CloudClient] - on(): request 17:47:03.392 [DEBUG] [.io.openhabcloud.internal.CloudClient] - Got request 72 17:47:03.393 [DEBUG] [.io.openhabcloud.internal.CloudClient] - {"host":"OH_CLOUD_DOMAIN","cache-control":"no-cache","accept-encoding":"gzip","user-agent":"openhab-cloud/0.0.1"} 17:47:03.394 [DEBUG] [.io.openhabcloud.internal.CloudClient] - Request method is GET 17:47:03.395 [DEBUG] [.io.openhabcloud.internal.CloudClient] - Jetty set header host = OH_CLOUD_DOMAIN 17:47:03.396 [DEBUG] [.io.openhabcloud.internal.CloudClient] - Jetty set header cache-control = no-cache 17:47:03.397 [DEBUG] [.io.openhabcloud.internal.CloudClient] - Jetty set header accept-encoding = gzip 17:47:03.398 [DEBUG] [.io.openhabcloud.internal.CloudClient] - Jetty set header user-agent = openhab-cloud/0.0.1 17:47:03.408 [DEBUG] [.io.openhabcloud.internal.CloudClient] - Jetty finished receiving response header 17:47:03.418 [DEBUG] [.io.openhabcloud.internal.CloudClient] - Sent headers to request 72 17:47:03.422 [DEBUG] [.io.openhabcloud.internal.CloudClient] - {"headers":{"Transfer-Encoding":"chunked","Server":"Jetty(9.4.20.v20190813)","Date":"Fri, 06 Nov 2020 17:47:03 GMT","Content-Type":"application/json"},"responseStatusCode":401,"responseStatusText":"OK","id":72} 17:47:03.423 [DEBUG] [.io.openhabcloud.internal.CloudClient] - Jetty received response content of size 63 17:47:03.426 [DEBUG] [.io.openhabcloud.internal.CloudClient] - Sent content to request 72 17:47:03.428 [WARN ] [.io.openhabcloud.internal.CloudClient] - Jetty request 72 failed: HTTP protocol violation: Authentication challenge without WWW-Authenticate header 17:47:03.430 [WARN ] [.io.openhabcloud.internal.CloudClient] - Response Failure: HTTP protocol violation: Authentication challenge without WWW-Authenticate header 17:47:03.433 [DEBUG] [.io.openhabcloud.internal.CloudClient] - Finished responding to request 72
For me looks like that Cloud server can't communicate(Authenticate) correctly to API on OH3... OH3 have new authentications and tokens for API access so maybe cloud server or oh addon need to be updated to access to API... Any idea how to fix problem/issue?