Android actionable notifications

Yes, \config\custom_components\notify\fcm-android.py

I’ll try deleting it all and started over this evening when i get home.

Andy idea of this van work on android tv?

There’s already a platform for Notifications for Android TV that works offline (without Firebase), just in case you weren’t aware of that.

1 Like

Deleted everything, rebooted, Copied a new fcm-android.py file in custom_components/notify/ folder
Added the lines below in my configuration file.

And HA displays this alarm…

Configuration invalidCHECK CONFIG
Platform not found: notify.fcm-android

Could it have anything to do with the new auth setup in the latest Hassio?

I know thats not formatted correctly in this post but I cannot seem to get it formatted using the code blocks

It shouldn’t have anything to do with the new Auth system since I think the REST API still falls back on the legacy api password…though I’m not 100% sure of that.

Have you made any progress on getting it to work by chance?

I tried all weekend to get it to work with no success. Keep getting “something went wrong”. Only asking about the new authorization thinking it had something to do with hassio needing a login and password. I thought I read something using the legacy api password after upgrading to the latest hassio. I’ll see if I can find it and maybe try reverting back to that and see if it works.

Thanks

Hey guys, I threw this into the HomeAssist app. I forked the repository then added my stuff in. Registering/Unregistering for the Push Notifications is found in the Settings. I switched from Volley to Retrofit to match what was already in the code…everything should work with the current fcm-android.py. Here is the apk.

https://github.com/Crewski/homeassist/blob/master/generated%20apk/homeassist-hanotify-4_0_0.apk

1 Like

The new APK will not install on my Pixel XL. Did it really go from 3.27MB to 10.33MB in size?

what a hero! thanks, will give it a whirl tonight

I’m guessing that you have the play store version of HomeAssist installed. My apk can’t overwrite that since it isn’t from the same author. You need to uninstall the other version first, then install mine.

The apk I provided is just the debug version. I didn’t run a production build, sign, and zip-align. I would expect that to drop the size back down. I only added 2 Kotlin files, 2 models, and a couple other lines of code. Nothing major by any means.

UPDATE
I went ahead and signed a release apk, which brought it down to about 8.9MB. Obviously still a lot higher than before. I’m not really sure what the change is. Feel free to poke around and let me know if you figure it out. Thanks.

Here is an easier link for mobile:

3 Likes

Opened the new app in Android Studio Debug and it says "Libraries (*.so) in the APK are missing debug symbols. If that helps.

Unfortunately I’m not sure on this one. Maybe try my HomeAssist fork I just posted and see if that will work.

installed and working! Nice and very rapid work!

Now just got to get the Assist app to support lovelace somehow. Seems to only show groups :frowning:

[EDIT]
Yeah i had to uninstall the store version. I used apkinstaller to then install the downloaded .apk

Hi there. Fairly new to Home Assistant, so apologies if I’m overlooking something obvious.

I fall at the first hurdle using the Home Assist fork app. I’m using Hassio with a username/password for initial authentication. The app only has URL and password fields. When I try to connect, the app reports invalid password. I assume that has something to do with the lack of a username field.

Any suggestions?

Thanks

@ronschaeffer sounds like you are using the new auth system. I haven’t tried it out yet so I can’t comment on it too much. This program uses the Rest API and Websockets, which as of now rely on a legacy api password. In your configuration.yaml file under the the http: section you should have a base_url and an api_password. This api_password is what is needed, so add it in if it isn’t there. This shouldn’t affect how you currently log in.

http:
  # Secrets are defined in the file secrets.yaml
  api_password: !secret http_password
  # Uncomment this if you are using SSL/TLS, running in Docker container, etc.
  # base_url: example.duckdns.org:8123
  base_url: !secret dns_url
  ssl_certificate: /ssl/fullchain.pem
  ssl_key: /ssl/privkey.pem

Thanks. That was indeed the problem.

Now to play around with notifications…

All set up and working now with the HANotify APK. I tried first with your fork of the Home Assist app, but it did not generate a fcm-android-registrations.conf file.

After success with HANotify, I tried again with the Home Assist fork. This time, the APK installation ended with the error “App not installed”. This occurred both with and without HANotify also installed.

Is anyone using this to launch an Android app from the notification. If so, which method are you using to trigger the app launch after receiving the callback on the HA server.

@Crewski Thanks for your great work on this. It’s exactly what I need for a smart doorbell project.

Glad at least one is working!

If you want to try the HomeAssist app again, go ahead an uninstall whatever version of HomeAssist that may be there. Then install my version from the links given. Go to settings where it says Push Notifications. Try to toggle it a few times…ending with it being checked.

When you uncheck it, there will be a toast message that’ll either say “Registration not found” or “Push notification subscriber unregistered”. When you toggle it back on you should see a toast that says “Push notification subscriber registered”.

I can’t actually (re)install the HANotify version of Home Assist from the Drive link anymore. Attempting to install it results in an “App Not Installed” error at the end of the Package Installer wizard. Installation did work the first time around (when notifications didn’t work) but hasn’t worked since I uninstalled it. No other version of Home Assist is installed.

Pixel 2 XL
Android 9.0.0

Thanks.

I get the same thing, Not Installed. Although you did get it to install once, It never would install for me. I have every external sources options on my phone enabled.