Android Companion 2022.2: Local Push Notifications!

Hi.

I understand how to display temperature of my Xiaomi, I use :
{{ states('sensor.ble_temperature_a4c138******') }}

but I don’t understand how to display for example a button-switch on/off for my Hue light. Can you explain me please ? Thx

(I am totally noob sorry :confused: )

I’ve got the same scrolling issue on a Galaxy S10 on Android 12.

1 Like

@ALEdmonds and @Nameless I have made a PR to make this page scrollable, sorry for the inconvenience. If you wish to adjust the channel settings, you should be able to do so on the notification directly by long pressing on it and going to gear icon from there. Every device in how they implement that may be different. You can also adjust the channel preferences by going to your device settings and looking at the notification channels from the app in there.

2 Likes

did you get any errors in the app logs at the time of the HA core error? that would help pin down what happened. In any case you may need to start fresh to re-register things if the service call is still missing

Templating is a very advanced feature especially for new users, the link given to you above does go over how to display states among other things. If you are trying to display a button that won’t happen, templates are text rendering only. Try to read the link a few times to get an idea of what templates actually are and that should help clarify what can be done here. Discord is also a good place to get some help.

That’s fantastic, thanks! For what it’s worth, I had no problem working around the bug. Well, at least after I came here to verify that I wasn’t missing out on any crucial information that was being cut off.

I can’t even begin to express how unnecessary this apology is, but as a Canadian, I get it.

Keep being awesome.

2 Likes

Great app, great effort! Love it!
Question…

Got the app installed (android), and I seem to have a hard time to get images in my notifications.
When I add an image url it wont show up, but when using the /local/path it works.
Have I missed something? Is images only accessible from a local path?

service: notify.mobile_app_sm_n975f
data:
  message: Camera
  title: .xXXx.
  data:
#    image: /local/img/frigate/00_parkering_latest.jpg
    image: http:192.168.1.242:5000/api/events/1644944060.614325-zm6c1s/snapshot.jpg?h=300&crop=0&quality=100
    color: 'red'

When you use a full URL you miss out on adding in authentication which is required for API calls, use a relative URL instead and it should work so starts with /api/events I am not sure if that will work but it depends on the authentication required for the API.

if you want to use a full URL then test in a browser to see if it loads, then you can be sure it will work in the app.

The strange part is that the url is working when opened in a browser
Url: http:192.168.1.242:5000/api/events/1644944060.614325-zm6c1s/snapshot.jpg?...

The url and HA is not the same machine, im trying to send Frigate snapshots via the HA app…

try removing everything after the ? in the URL, android may not like that

You may also see a failure for that in the Companion App > Logs screen too.

1 Like

Damn! The “?” is causing the image not to be included… That simple, yet so troublesome …
Thanks for the info/help!

1 Like

Another option is to snap an image into a local file and then use that.

service: camera.snapshot
target:
  entity_id:
    - camera.front_doorbell_main
data:
  filename: /local/last-doorbell.JPG
service: notify.phone_notifications
data:
  title: Doorbell Ring
  message: Someones at the door.
  data:
    image: https://host:port/local/last-doorbell.JPG
    tag: Doorbell-general
    group: Doorbell
    timeout: 180
    channel: Doorbell
    ttl: 0
    priority: high
    actions:
      - action: URI
        title: Open Cameras
        uri: /my-home/cams
3 Likes

That’s one way to do it. But it works as long you dont have a “?” in the url… :slight_smile:

Allright, trying to open the Frigate media browser in a uri.
Is this possible?
I’m able to open media-browser, but HA complains that Frigate is not a valid media player…

      - action: URI
        title: "Open Events"
        uri: "/media-browser/frigate/clips/today/"

I’ve run a bare android on a pixel from 100% charge to 0 a few times with and without websockets on and I haven’t seen much of a difference in battery times. With and without i’ve gotten the same +/-. Just though i’d share. This isn’t to say there isn’t a difference in battery use but it isn’t causing wakelocks. It does show in battery stats as using much more % of time but I attribute that to simply running in a notification which adds time to the foreground app. If anything battery use, so far, seems negligible.

2 Likes

Why cant I send images from frigate via snapshot url?
But it works from /local/path …
Any clue?

Below does not work. No image is included.

service: notify.mobile_app_sm_n975f
data: 
  message: "Test {{ states('sensor.time') }}"
  data: 
    image: http://192.168.1.242:5000/api/events/1645034792.861152-yz4huv/snapshot.jpg

I’m using Frigate behind a password protected (ngnix) proxy. It seems that notify is not allowed to reach the https://frigate.proxy.com without a password. Is it possible to append a user and pass to the image url?

Okey… Managed to send images through the notify service.
Used the nabu casa url and frigate snapshots works like a charm… :slight_smile:

Question, or a idea…
As I started to use Local PUSH a “LOT!” since the new version, it’s getting hard to have an overview of all the received notifications.

I’m using Frigate and a couple of RSS feeds and push them to the app. Would it bee possible to have like a notifications overview sidebar inside the app? Something like PushOver or Telegram styled where the received notifications can be sorted per channel?

Below is a snap from Pushover:

Configuration > Companion App > Notification History

you can also perform a search or filter up to the last 100 notifications

Yepp, i know this, but this is not good enough :slight_smile: The ability to se all of the notifications with revcied images etc are a lot more nice to see. :slight_smile:
This is HA app…
image
And this is Telegram:

feel free to submit feature requests on github :slight_smile: make sure to not combine multiple requests into the same request please

2 Likes