Android actionable notifications

@warcanoid, its a parameter under the data parameter. all the details are are at the top of the page.

@BCrippsy38 so add message_type: notification?

@warcanoid, correct would go under data: either above or below image:.

for the camera snapshots…
I got the snapshot to save but i cant get it to send the image in the notification. one thing i noticed is you use a secure https, im just using http. is there anything else i would need to address for that? i put the snapshot in /config/www/ folder

@BCrippsy38 thanks, under data, as you wrote!
Use https! My first try was with http and did not worked. If you use config/www/snapshot.jpg then the access is: https://example.com:8123/local/snapshot.jpg, see: https://www.home-assistant.io/components/http/#hosting-files
Have you whitelisted folder? See this: https://www.home-assistant.io/components/camera/
I also must changed the url from …local/yourcamera.jpg to yourcamera.jpg?{{now().second}}, to get the latest snapshot.
Here you have my working automation for snapshot, working also when device is in long sleep: https://hastebin.com/newugemosu.bash

And here you have HTML5 notification with Url image for Chrome, but do not get notifications when the the device is sleep over 20-30minutes: https://hastebin.com/goxumazece.bash

same concern here! I hope the update is on the way :slight_smile: really like this add-on!!

What is the change that is being made? I quickly glanced and saw the breaking change if we are overwriting a component. This one isn’t overwriting anything, so does that mean it’ll be fine?

@Crewski I have left an issue on github, i can’t seem to get the callbacks to work on HA 0.89.1

Not sure if this is a related issue but the images only appear when I’m on the same network as HA. When using the ddns outside the network an image doesn’t get attached. Has anyone else experienced this?

Hi,
Is this component still active and will it work on .89.2?

@phairplay Notification side of things are working for me, but not the callbacks. which is a pain :frowning: not sure if it’s related to .89+ i have created an issue on github but as of yet i have had no response from @Crewski on the issue

1 Like

Hey guys, I finally got around to updating to 90.2. Along with it came a bunch of changes, 2 of which I think are related to the callbacks working.

  1. The fcm-android.py file needs to be renamed and moved. OLD: /config/custom_components/notify/fcm.anroid.py. NEW: /config/custom_components/fcm-android/notify.py

  2. In your configuration.yaml file, the auth provider for legacy api password (since this still uses that) needs to have the api_password as part of it (see below).

configuration.yaml

homeassistant:
          auth_providers:
          - type: homeassistant
          - type: legacy_api_password    
            api_password: !secret http_password

After making these changes, I was able to successfully send a notification with actions and receive/act upon the callback without any modifications of my previous code. Try it out and see if it works for you as well. For the record, I’m only using DuckDNS/LetsEncrypt on HassOS (Rpi 3).

2 Likes

By When will this be merged into main branch of home assistant?

This will never be in any branch of home assistant. It’s something that I just pieced together. The good news is that they are working on an official Android app that is scheduled to be initially released I think at the end of the summer. It is supposed to have actionable notifications similar to iOS, so I’m sure it’ll be 45395 times better than this one!

Is there a way to set a different notification sound for each notification? My phone currently just beeps. I want to make it sound an alarm when I receive a notification that my alarm has been triggered.

Wow,

Thank you for your efforts. This is awesome. I have only been a HA convert for about 2 weeks now but I have a pretty sweet setup thanks to people like you.

Now not only does my Blue Iris NVR switch to an “Away” profile when I leave the house I actually get notified. Just finished setting up notifications for my other automations :slight_smile:

I tell you I am addicted to HA lol

What can I learn next …

Seems like 0.92 has broken this component now, HA completely stops loading and will never start once it gets to this component.

Yup. Same here

Check instructions from here to see how you should fix the issue:


Note: DO NOT copy the script from that repository. That will only work with Ariela.

1 Like

I did make that file init but no joy…

But i have name it “init” is that right?