I had trouble setting up push notifications for the out of the box openhab app for Android, using my own own openhab-cloud installation (installed on local Linux ARM device). From the community I received some help (special thanks to @Felix_Raetz) and this is how I got it working:
Enter any dummy package name like bla.bla and click on register App button (afterwards some more hints will be shown in the popup window, just close it)
copy / paste the server key (=password) and sender id (=jid) to your config file (see next step).
Important: Please note that you will need to add @gcm.googleapis.com to your sender id (people have reported that @googleapis.com works as well for them, but I use it with the gcm subdomain)
Open your config file and make the required changes
I installed openhab-cloud to /opt/openhab-cloud and my config file is config.json. Paste the copied values and don’t forget to add @gcm.googleapis.com to the sender id (=jid)
when starting openhab-cloud on your server the log (in my case /var/log/syslog) should show: info: openHAB-cloud: Initializing XMPP connection to GCM
and a few lines down info: openHAB-cloud: GCM XMPP connection is online
Please let me know if I should install something else then myOpenhab Cloud Connector form PAPER UI. I ask you this because I don’t find the file config.json nor
opt/openhab-cloud/
Just to confirm that this tutorial is still valid today (12th december 2020), even if the Firebase interface is a bit different now… but the main concepts are still the same.
Nevertheless, my log file is inside /opt/openhabcloud/logs and not inside /var/log/syslog.
This post is old but i think it is still relevant for those who decides to use their own private OpenHab Cloud instance. I am having issue with the Android/IOS app, as the app complain the following which i capture through android studio debug. Does it mean the open source all from PlayStore or App Store can’t be used because they tied to openhab google-services.json?
E/FcmRegistrationWorker: FCM registration failed
java.io.IOException: FIS_AUTH_ERROR
at com.google.firebase.iid.GmsRpc.handleResponse(com.google.firebase:firebase-iid@@20.3.0:81)
at com.google.firebase.iid.GmsRpc.lambda$extractResponseWhenComplete$0$GmsRpc(com.google.firebase:firebase-iid@@20.3.0:91)
at com.google.firebase.iid.GmsRpc$$Lambda$0.then(Unknown Source:2)
at com.google.android.gms.tasks.zzc.run(com.google.android.gms:play-services-tasks@@18.0.1:3)
at com.google.firebase.iid.FirebaseIidExecutors$$Lambda$0.execute(Unknown Source:0)
at com.google.android.gms.tasks.zzd.zzd(com.google.android.gms:play-services-tasks@@18.0.1:1)
at com.google.android.gms.tasks.zzr.zzb(com.google.android.gms:play-services-tasks@@18.0.1:5)
at com.google.android.gms.tasks.zzw.zzb(com.google.android.gms:play-services-tasks@@18.0.1:3)
at com.google.android.gms.tasks.zzc.run(com.google.android.gms:play-services-tasks@@18.0.1:8)
at com.google.android.gms.cloudmessaging.zzz.execute(Unknown Source:0)
at com.google.android.gms.tasks.zzd.zzd(com.google.android.gms:play-services-tasks@@18.0.1:1)
at com.google.android.gms.tasks.zzr.zzb(com.google.android.gms:play-services-tasks@@18.0.1:5)
at com.google.android.gms.tasks.zzw.zzb(com.google.android.gms:play-services-tasks@@18.0.1:3)
at com.google.android.gms.tasks.TaskCompletionSource.setResult(com.google.android.gms:play-services-tasks@@18.0.1:1)
at com.google.android.gms.cloudmessaging.zzq.zza(com.google.android.gms:play-services-cloud-messaging@@16.0.0:9)
at com.google.android.gms.cloudmessaging.zzs.zza(com.google.android.gms:play-services-cloud-messaging@@16.0.0:7)
at com.google.android.gms.cloudmessaging.zzf.zza(com.google.android.gms:play-services-cloud-messaging@@16.0.0:45)
at com.google.android.gms.cloudmessaging.zzi.handleMessage(Unknown Source:2)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7872)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
Hello.
I also set up a private cloud instance and activated the legacy API in Firebase for the usage for the android app. However, it states that the legacy API only works until June 20, 2024 and that the migration to the new API must take place by then.
Is there already a plan regarding this?
What are the next steps for migrating to the new Firebase API? Should I open an issue on the OpenHAB-Cloud GitHub page? I’m also a full-stack developer for mobile applications, so I could contribute to this migration. However, I would need some guidance because this would be my first time contributing to open-source projects, and I’m not familiar with the process. Any advice on how to proceed would be greatly appreciated.
I want to bring up the feature again. Are there any new news on the topic? I got an email, that the API will be removed at 20.06.2024. So in my opinion all instances of the cloud (myopenHAB included) are no longer able to deliver push notifications to Android devices.
Maybe there is an alternative approach: I know that Homeassistant also send push notifications to android devices without a cloud connection. Maybe it uses an Android API to send push notifications. So we could also do that for the android app?