Wallpanel updating Home Assistant UI only after touchscreen touch

Hi,
I’m not sure if this an Wallpanel or Android or maybe hardware issue.

TLDR:
When I wakeup my tablet, the Home Assistant UI is not updated until I touch the screen.
How to fix this?

Long version:
I’m using Wallpanel for a wall mounted tablet for my Home Assistant Lovelace interface.
When someone presses the doorbell I want the screen to be turned on and navigate to the tab showing a picture of whom pressed the doorbell.
The MQTT wake option works.
I’m using the browser_mod navigate command to navigate to the picture, also works.

The problem is that the screen updates to the navigated page after a touchscreen touch.
This is also the case for other Home Assistant Lovelace updates.

Is there a work-around of fix for this?

Thanks.

Tablet: Samsung Tab S2
Android versie: 9
LineageOS 16.0
Wallpanel version: 0.9.3 B1
Home Assistant: 2020.12.1

The only thing I can think of is sending MQTT command for the application to load a specific dashboard url from a HA automation linked to the doorbell. Try this rather than a tab, but this is something you have to figure out with HA, its not something the application can really address.

I also opened a topic on the HA community. No response yet.

But a complete page reload to a specific path should work, I think. It’s a solution for the doorbell use-case.

It’s not a solution for when I wake-up the tablet manually with the hardware button. It still needs a touchscreen touch to update the Home Assistant UI. It’s like the Javascript only wakes-up after a touch.

Maybe some problem with Javascript wake up events.

Thanks for the advice!

I have an update. I decided to download Andriod Studio have a look at the code.

And I got it working.
I fixed it with calling the onUserInteraction() method in the onResume() event handler and the MQTT wake command handler.
If you want, I can make a pull request, but I’m not an Android app developer. Maybe you have good reason not to do this.

Issue on github:
https://github.com/thanksmister/wallpanel-android/issues/232

The reason this fix is not needed for WallPanel is that its not meant to be an application in the background, its meant to run as a dedicated application using only a screensaver. Having the device sleep or having the device off breaks the the other features of the application the require a constant connection such as MQTT, Motion, Sensors, and HTTP streaming.

When the screen is off, MQTT and sensors keep working.

But let’s continue the discussion in github.
Thanks.

This may be tru until system does garbage collection or sleep and it also depends on device. Some devices turn off wifi as well when screen locked.

Let’s be clear, screen off is not dimmed, it’s device locked, same as power button pressed. There is a way to turn off the screen with low level access and tools such as termix.

Screen is turned off. I’m using the power button, next to the volume buttons, or the home button to wake up.
If you don’t want to support devices which keep WiFi and MQTT working during (screen) sleep, what’s the point of having a MQTT wake command with a duration?

And the change of giving focus to the WebView component after a wake up by MQTT or hardware button doesn’t break anything right?
I did not encounter problems yet.

You are asking for a feature that works with onResume methods, the application is definitely put into the background. Because you are not experiencing issues is due to the feature set you use. Your use case is specific for how you use the application. The change is minimal, put forth a PR and I will consider. We have a huge backlog of feature requests, not all align with the purpose of the app and many will not be implemented.

Ok thanks!
I also replied on GitHub.

Let’s find some time to make a PR.