Android Companion App - Screen On

Hi,
I would very much appreciate some help with a problem I’ve been experiencing for some time.

My background is in electronic design and software development with assembler and C++.

I’ve been experimenting for some time with Home Assistant, but when it comes to Java and Yaml I must admit I’m having great difficulty coming to terms with both languages.

I’ve installed the Android Companion application on both my mobile phone and a tablet. My challenge is to use the tablet (wall mounted) as an interface for my family. What I’m looking to do is turn on the tablet screen if there is something to display and if there’s a person in the vicinity.

To me this should be straight forward using the “screen on” command which I’ve been trying to send via a “Call Service” in response to an automation event. So far I’ve been able to send notifications to tablet which appear at the top of the screen. However, at no point can I get the screen to turn on via a Call Service. I have spent quite some time trying different methods after traveling the internet for help. Sadly, not finding the necessary help.

If anyone can provide any pointers I’d be very much appreciative.
Ian

I have the same issue, and I imagine you’ve already tried this but just in case - allowing the App permission “Appear on Top” will wake the screen using this method:

    - service: notify.mobile_app_xxxxx
      data:
        message: "command_screen_on"

It won’t keep the screen on long but the screen will come on long enough for the notification sound to play out and the icons to appear.

Perhaps someone else knows how to keep the screen on, and reset the time-off counter.

Also really struggling with any and all notification commands

triggering via node red but also failing with yaml through ‘developer tools’ - ‘call service’.

yaml example triggered via developer tools

service: notify.mobile_app_pixel_4a
data:
  title: front door
  message: ding dong!
  data:
     ttl: 0
     priority: "high"
     data:
        message: "command_screen_on" 

the screen does not turn on, its hard to tell if its been given a high priority or not?
in the HA companion app under ‘App Configuration’ → ‘Notification history’ if i click on the notification under ‘full notification data’
{
“title” : “front door”,
“message” : “ding dong!”
}

with this im not sure any of the additional ‘data:’ info is being passed through.

??

in the developer tools - you would have no title, and the message “command_screen_on”. The second data block with another message in it, probably won’t do anything.

EDIT:
This is how I launch DroidCamX for example -

alias: Launch DroidCam
sequence:
  - service: notify.mobile_app_sm_g930f
    data:
      message: command_activity
      data:
        channel: com.dev47apps.droidcamx
        intent_class_name: com.dev47apps.droidcamx.DroidCamX
        tag: android.intent.action.MAIN
mode: restart

Notice that the message telling the app it is a command, is in the top level data, not the second data block.

1 Like

Thanks Andrew,
that work to a sense, simply sending the “command_screen_on” as the message does turn the screen on, great.
now im wondering how i combine notification “title” and “messages” with ‘commands’ to form a useful notification? as per my first post i’d like to have a front door notification with title = “front door” and message = “ding dong” that has high priority and turns the screen on.

as you may guess this is a start to a diy smart door bell that can notify me when im down the garden.