Android App Beta

I just cleared the log in the app and put the phone on a wireless charger. On another device I used the app to view the state of the charge state item and saw that the value was UNDEF, in the app it shows a dash “-” as the item value. The following was written to the log:

-----------------------
Device information
Model: SM-G988B
Manufacturer: samsung
Brand: samsung
Device: z3s
Product: z3sxeea
OS: 10
-----------------------

--------- beginning of main
07-17 13:42:57.192 22749 22749 D ViewRootImpl@cbd9628[LogActivity]: ViewPostIme pointer 0
07-17 13:42:57.199 22749 22749 D ViewRootImpl@cbd9628[LogActivity]: ViewPostIme pointer 1
--------- beginning of events
07-17 13:42:57.206 22749 22749 I menu_item_selected: [0,Reload]
07-17 13:42:57.207 22749 22749 D LogActivity: onOptionsItemSelected()
07-17 13:43:02.593 22749 22749 D BackgroundTasksManager: onReceive() with intent android.intent.action.ACTION_POWER_CONNECTED
07-17 13:43:02.593 22749 22749 D BackgroundTasksManager: Battery or charging state changed: android.intent.action.ACTION_POWER_CONNECTED
07-17 13:43:02.600 22749 22749 D BackgroundTasksManager: Both periodic workers are running
07-17 13:43:02.614 22749 22749 D BackgroundTasksManager: Both periodic workers are running
07-17 13:43:02.620 22749 22749 D BackgroundTasksManager: Scheduling work for tag charging_state
07-17 13:43:03.137 22749 22834 D ConnectivityManager: requestNetwork; CallingUid : 10292, CallingPid : 22749
07-17 13:43:03.186 22749 10784 D ItemUpdateWorker: Trying to get connection
07-17 13:43:03.225 22749 10784 D ItemUpdateWorker: Trying to update Item 'stevephoneChargingState' to value UNDEF, was UNDEF
07-17 13:43:03.232 22749 10784 D ItemUpdateWorker: Item 'stevephoneChargingState' successfully updated to value UNDEF
07-17 13:43:03.236 22749 22834 I WM-WorkerWrapper: Worker result SUCCESS for Work [ id=afc65cb9-0264-4050-bfde-32529aba6493, tags={ itemUploads, charging_state, org.openhab.habdroid.background.ItemUpdateWorker } ]

It looks like the app detected that the power was connected but updated the item value to UNDEF.

I opened a PR to increase the logging here: https://github.com/openhab/openhab-android/pull/2098

Can you reproduce this with 2.13.15-beta and share the log?

Did you mean the change to support updating a switch with the charge state or the charge state logging?

Here’s the log when putting the phone on a wireless charger:

-----------------------
Device information
Model: SM-G988B
Manufacturer: samsung
Brand: samsung
Device: z3s
Product: z3sxeea
OS: 10
-----------------------

--------- beginning of main
07-20 16:59:51.145  7051  7051 D BackgroundTasksManager: onReceive() with intent android.intent.action.ACTION_POWER_CONNECTED
07-20 16:59:51.145  7051  7051 D BackgroundTasksManager: Battery or charging state changed: android.intent.action.ACTION_POWER_CONNECTED
07-20 16:59:51.149  7051  7051 D BackgroundTasksManager: Both periodic workers are running
07-20 16:59:51.154  7051  7051 D BackgroundTasksManager: Both periodic workers are running
07-20 16:59:51.157  7051  7051 D BackgroundTasksManager: EXTRA_STATUS is 3, EXTRA_PLUGGED is 0
07-20 16:59:51.157  7051  7051 D BackgroundTasksManager: Scheduling work for tag charging_state
07-20 16:59:51.316  7051  7151 D ConnectivityManager: requestNetwork; CallingUid : 10292, CallingPid : 7051
07-20 16:59:51.322  7051 26416 D ItemUpdateWorker: Trying to get connection
07-20 16:59:51.340  7051 26416 D ItemUpdateWorker: Trying to update Item 'stevephoneChargingState' to value UNDEF, was UNDEF
07-20 16:59:51.348  7051 26416 D ItemUpdateWorker: Item 'stevephoneChargingState' successfully updated to value UNDEF
07-20 16:59:51.351  7051  7240 I WM-WorkerWrapper: Worker result SUCCESS for Work [ id=cb5be3b5-845f-4c75-a0c1-e6c657f5d588, tags={ itemUploads, charging_state, org.openhab.habdroid.background.ItemUpdateWorker } ]
07-20 16:59:51.354  7051  7051 D ConnectivityManager: unregisterNetworkCallback; CallingUid : 10292, CallingPid : 7051
07-20 16:59:56.679  7051  7051 D ViewRootImpl@f4643e7[LogActivity]: ViewPostIme pointer 0
07-20 16:59:56.686  7051  7051 D ViewRootImpl@f4643e7[LogActivity]: ViewPostIme pointer 1
--------- beginning of events
07-20 16:59:56.700  7051  7051 I menu_item_selected: [0,Reload]
07-20 16:59:56.700  7051  7051 D LogActivity: onOptionsItemSelected()

The charge state item sometimes doesn’t get updated correctly, as shown in the log above.

I meant the logging.

So the app received the signal, that power is connected, but the battery api returns BATTERY_STATUS_DISCHARGING (this is a constant with the value 3) and no charger connected (“EXTRA_PLUGGED is 0”).
No idea why this happens and what we can do about it.

Maybe there’s a delay between the POWER_CONNECTED event being sent and the battery beginning to be charged?

It would be useful to know if other users see the same behaviour.

2.13.16-beta comes with improved svg icon handling. Please check if any svg icons are now handled worse.

With 2.13.16, images doesn’t resize correctly.

Please define ‘correctly’. It’s intentional that small images aren’t scaled up to full screen width anymore (BasicUI behaves the same way), for scaling down large images to screen width I opened a PR.

This PR is included in 2.13.17-beta.

Hello,
I experience the same issue with scaling of images even with .17 beta. I checked also the behavior over the basic ui web interface and there are no issues. That means the apps doesnt seem to handle images the same way as basic ui webinterface as it supposed to be . I have a map image from the miio binding for my roborock s50 and in the app its not the full width of a row, but on webinterface it is. Its tested on the same device to make sure it does not behave different because of a different resolution.

What’s the resolution of the image, and what device is this on? Display density handling might be different between browser and app.

Thanks, that’s what I’m talking about. It’s fixed with 2.13.17-beta

On Google Pixel 4 XL
Resolution of image is unknown. Its directly from server.

It surely should be possible to open the image in a browser and check the resolution using the tools built into the browser though?

I checked and the resolution is : around 700*800. So its too small i guess for Display. Sadly there is no option in openhab to stretch fit with some special item setting.

Hi.
I’ve just upgraded my OH to version 3 with the nice new GUI. Are there any plans to adopt the apps to the new GUI in OH3? Any ongoing work?

Also a tiny problem: My app works fine. However I get a popup with a HTTP 404 error message every time I start it. At the same time I get this in my Apache log (using Apache as a proxy):

[01/Dec/2020:18:40:46 +0100] "GET /api/v1/settings/notifications HTTP/1.1" 404 1194 "-" "openHAB client for Android

The new UI is already implemented in the latest beta version, but not yet polished.

Can you post a screenshot of the error? Which app version are you using?

1 Like

It’s version 2.15.15-beta. Screenshot:

edit: Btw, sorry for not looking close before asking. I found the item for OH3 gui in the app menu now. I guess I seldom look in that menu :stuck_out_tongue: