[SOLVED] Broadcast notification delays on Android

Hi there,

I am experimenting big delays on the sendBroadcastNotification functionality. Everytime a switch is ON, I receive a message in my phone, but take time between 20 seconds and a few minutes. Depending on if phone is on wifi or not, if phone is on sleep mode or not.

  • I am using Samsung Galaxy S9+ Plus
  • Myopenhab
    and the following simple rules
   Item sonoff02 changed to ON
sendBroadcastNotification("Llaman al timbre")    

The issue is reproduced always in this 2 scenarios:

  • When is not connected to the local network. Takes 30 seconds more or less, even with the phone unlocked.
  • When phone is on sleep-mode, takes until 2-3 minutes. As soon as I unlock or push a button, I receive the notification.

The rules is located at the end of the file. Is this relevant? Should i put it at the begining? ÂżMaybe is a Samsung setup?


Yes that’s about right. The state needs to go to OH cloud then your phone IP located (It changes) then the message pushed through your IP provider…

Can do, That’s because your phone is not reporting it’s IP to the OH cloud and therefore it takes longer

1 Like

Pff, I changed my phone setup, alowing app to work even during sleep mode, but nothing change.

I think it is not an issue between Android <> Myopenhab. I think is an issue withtin Android. Because when is not in sleep mode, is working fine, it is only during sleep mode.

I have similar issues with my android phone using geofencing notifications generated by IFTTT so I agree the issue is with the way the phone hibernates rather than a problem with your OpenHAB setup

IFTTT is notoriously slow

1 Like

ok. More info.

I get this message while phone is locked. It seems that while phone is locked openhab App does not receive the notification. It is something on the Android setup, but I have setup everything to allow push notification even when phone is locked, and does not work. :confused:

Maybe I am missing something on the Android setup.

2019-01-09 10:44:15.469 [WARN ] [io.openhabcloud.internal.CloudClient] - Jetty request 6399229 failed: null

You are right.
After testing, is more an issue with the lock screen functionality. After locking the phone, wait some seconds and perform the test, I get nothing. Maybe when screen is locked the phone immediately hibernate, but I do not know how to change that.

Eventually, It is an issue with openhab app in android. This is not happening with other apps in Android. Other notifications arrives on time under screen locked but with myopenhab not. :confused:

EDIT: It seems that is an already known issue affected by Samsung devices.

I have setup Telegram and works much better for notifications :smiley:
Problem solved.

1 Like