OH Beta Android App - Cannot update items anymore

Hi OH Community,

Has anyone had this problem with the latest beta of the Android App? I can’t update items from the app any longer. Loading and connecting to sitemaps works fine, but when trying to toggle a switch, the app silently fails to update the item.

Based on the logs, it seems to be trying to send commands over plain http when the server is https only. The paste from the app log below.

Any advice appreciated! Thanks!!

Device information
Model: SM-G973U
Manufacturer: samsung
Brand: samsung
Device: beyond1q
Product: beyond1qltesq
OS: 10
Display: 1080x2042, 2.625 density
Data usage policy: DataUsagePolicy(canDoLargeTransfers=true, loadIconsWithState=true, autoPlayVideos=true, canDoRefreshes=true), data saver: 1, battery saver: false

--------- beginning of main
10-29 22:13:31.854  5077  5077 I ViewRootImpl@d13bbfb[LogActivity]: ViewPostIme pointer 0
10-29 22:13:31.916  5077  5077 I ViewRootImpl@d13bbfb[LogActivity]: ViewPostIme pointer 1
10-29 22:13:31.919  5077  5077 D LogActivity: onOptionsItemSelected()
10-29 22:13:36.563  5077  5077 I ViewRootImpl@d13bbfb[LogActivity]: ViewPostIme key 0
10-29 22:13:36.629  5077  5077 I ViewRootImpl@d13bbfb[LogActivity]: ViewPostIme key 1
--------- beginning of events
10-29 22:13:39.434  5077  5077 D PageConnectionHolderFragment: Updated page data for URL http://<openhab-remote-address-openHAB>/rest/sitemaps/default/default (23 widgets)
10-29 22:13:39.434  5077  5077 D ContentController: Got update for URL http://<openhab-remote-address-openHAB>/rest/sitemaps/default/default, pending []
10-29 22:13:39.437  5077  5077 I WidgetImageView: Refreshing image at https://<openhab-remote-address-openHAB>/icon/switch?format=SVG&anyFormat=true&state=OFF, avoidCache false
10-29 22:13:39.472  5077  5077 I WidgetImageView: Refreshing image at https://<openhab-remote-address-openHAB>/icon/text?format=SVG&anyFormat=true&state=00%3A44, avoidCache false
10-29 22:13:39.473  5077  5077 I WidgetImageView: Refreshing image at https://<openhab-remote-address-openHAB>/icon/number?format=SVG&anyFormat=true&state=1, avoidCache false
10-29 22:13:39.474  5077  5077 I WidgetImageView: Refreshing image at https://<openhab-remote-address-openHAB>/icon/tod?format=SVG&anyFormat=true&state=EVENING, avoidCache false
10-29 22:13:39.729  5077 12157 D WidgetAdapter: Command 'ON' was sent successfully to http://<openhab-remote-address-openHAB>/rest/items/PresenceGuest

Oops. 2 updates:

  1. I’ve verified the traffic seems to be sent correctly from the app in the access logs in my web server (nginx with reverse proxy)

  2. I just realized I have the same issue already reported here. My setup is pretty much the same. I’ve also tested with both android apps version 2.15.0 and 2.15.10. Not sure when exactly this issue started happening. Nothing has changed with the nginx configuration, but it did upgrade to OH 2.5.9 a couple weeks ago.

My nginx access.log shows something similar to the previous poster too:

 [30/Oct/2020:06:37:42 +0000] "POST /rest/items/PresenceGuest HTTP/1.1" 301 170 "-" "openHAB client for Android"
 [30/Oct/2020:06:37:42 +0000] "GET /rest/items/PresenceGuest HTTP/1.1" 200 189 "-" "openHAB client for Android"

Found the fix. It appears the problem wasn’t directly related to the android app, but rather OH2 itself (version 2.5.9).

My nginx reverse proxy was using an older configuration. For whatever reason, when I upgraded from 2.5.6 to 2.5.9, the reverse proxy was no longer passing item updates to the rest api.

Adding the following 3 lines to my nginx configuration seems to have solved the problem:

        proxy_set_header X-Forwarded-Proto      $scheme;
        proxy_set_header Upgrade                $http_upgrade;
        proxy_set_header Connection             "Upgrade";

So this issue occurs with both versions?

1 Like

@mueller-ma yes, it occurred with both versions, but it seems I’ve found the problem. Please see post above.


Yes, I saw your solution in the post above. I just wanted to know, if a new app version required this server side change.

Ah, gotcha!

I don’t think it was the OH app, but oddly, I did notice that homehabit (another OH app that I use) was working fine.