Push Notifications now available!

Yes. the pir sensor will send Android a message.

Clear cashe, or clear data, or both?

Thanks for hanging in there with me.

That’s not what I meant, I meant to try: Actionable Notifications | Home Assistant Companion Docs and see if you can see the Actions show up in the notification. If that does not work then do: Troubleshooting | Home Assistant Companion Docs and try again with the image.

Both options. No luck…

I believe the fundamental problem is here. Why doesn’t this send the image to my Android device? This is the litmus test for all? Developer tools>services>call service no?

Text can be sent, images no. So puzzling? Nothing it the logs all, no errors registered at all.
I deleted the app and reinstalled it? Restarted the server, logged in, logged out, logged in.

Can take a picture, store it, but not send it to my app. How does it work for everyone else. I must be missing something basic in the initial configuration or set-up…

I’d really appreciate you insight.

Many Thanks.

You are not sending the correct data for the service call. Look at the format and follow the format :slight_smile:

message: TEXT
data:
  image: URL

message is a required parameter, and the URL is still not correct test it in a browser to make its valid and publicly accessible.

If you still have issues I suggest you read the companion docs that I linked to, they will show you what is expected.

Hy,

is it possible to template the image url like this:

title: "Müllabfuhr"
message: >
  {% if is_state_attr("sensor.ics_1", "remaining",1) %} {{states.sensor.ics_1.attributes.friendly_name}} wird morgen abgeholt. - {{ now().strftime('%I:%M %p') }}{% endif %}
  {% if is_state_attr("sensor.ics_2", "remaining",1) %} {{states.sensor.ics_2.attributes.friendly_name}} wird morgen abgeholt. - {{ now().strftime('%I:%M %p') }}{% endif %}
  {% if is_state_attr("sensor.ics_3", "remaining",1) %} {{states.sensor.ics_3.attributes.friendly_name}} wird morgen abgeholt. - {{ now().strftime('%I:%M %p') }}{% endif %}
data: >
image: >
  {% if is_state_attr("sensor.ics_1", "remaining",1) %} !secret trash_black {% endif %}
  {% if is_state_attr("sensor.ics_2", "remaining",1) %} !secret trash_yellow {% endif %}
  {% if is_state_attr("sensor.ics_3", "remaining",1) %} !secret trash_red {% endif %}

I don’t get it how to …

You are 100% correct. The issue is that the file is not public. I receive a 404 error when trying to access the photo from a browser.

I’m running Hassio via Ubuntu on VirtualBox. Any idea how to make the www folder public? I’ve dug around and don’t have a solution yet. The folder permissions are fine.

Oh, and yes, actionable notifications work just fine.

Many thanks.

I had another crack at it by calling on some random publicly available image from google.

message: testing 1-2-3
data:
  image: https://www.google.com/imgres?imgurl=https%3A%2F%2Fimage.pbs.org%2Fvideo-assets%2FmknIjcl-asset-mezzanine-16x9-kknCeMo.jpg%3Fcrop%3D384x215%26%3Fformat%3Djpg&imgrefurl=https%3A%2F%2Fvideo.mpt.tv%2Fshow%2Fmotor-week%2F&tbnid=l7SuP7tPxUdGgM&vet=12ahUKEwiy_7H4x-DoAhWN1-AKHRGlBn8QMygUegQIARBB..i&docid=AHuVgd8JKHBjgM&w=384&h=215&q=car%20image%20thumbnail&ved=2ahUKEwiy_7H4x-DoAhWN1-AKHRGlBn8QMygUegQIARBB

Still the same error. websocket_api.http.connection.

Does this Call Service work for you? It should be a blue bi-turbo Merc. Works right?

I suspect it has something to do with my set-up. Digging around today I discovered that if your profile is running on the backend and not the front end there is some kind of api issue. However frontend is supposed to be enabled by default…In my profile the theme is backend-selected.

Any insight would be appreciated.

Many Thanks

This still not a valid URL. Pick a real image URL like: https://upload.wikimedia.org/wikipedia/commons/3/3a/Cat03.jpg

your indentation of image looks off and make sure you are using data_template before message and topic

data_template:
  message: MESSAGE
  topic: TOPIC
  data:
    image: URL

:rofl: :rofl: :rofl: :rofl:

Still…nothing. same Error.

Logger: homeassistant.components.websocket_api.http.connection.1234567890
Source: core.py:1210
Integration: websocket_api

:man_shrugging:

:man_facepalming: you keep forgetting to follow all the steps lol

see the format I gave you 21 hours ago?

Try this service data

message: test
data:
  image: https://upload.wikimedia.org/wikipedia/commons/3/3a/Cat03.jpg

How, Why, What…How? My poor brain.

Thanks for hanging in there with me! Now just to figure out why the doorbell.jpg file in my www folder is not public.

Many Thanks!

Check the third paragraph here, it explains in detail what is expected with a few different options to try: https://companion.home-assistant.io/docs/notifications/notification-attachments

/api/camera_proxy/camera.name finally worked.

unbelievable. thanks for you help!

1 Like

HI is it possible to use a camera entity to show live video in a notification on android as you can do on iOS
like below

data:
  attachment:
    content-type: jpg
    hide-thumbnail: false
  entity_id: camera.foscam_camera
  push:
    badge: 0
    category: camera
message: Someone is at the front door

This shows live video in a notification for iOS

HI trying to sue the below url to see camera feed but get an unauthorised error

http://192.168.#.#:8123/api/camera_proxy_stream/camera.foscam_camera?token=long live token

Can anyone assist

see: Push Notifications now available!

Thanks but that is what I am trying to use

/api/camera_proxy/camera.name

With no luck

Correct but your previous post was not the same as this. Make sure that your base_url is defined or if you use nabu casa turn on remote

Thanks, sorry for the possible dumb question.
what do you mean by base_url defined. I am not using Nabu Casa

thanks