Notification icon

Hello! in notification i send icon. but not all notifications display the icon. i have own cloud server.

And in the notification list in the app they’re all visible, I guess? If so, my suspicion would be a server timeout when fetching the icon. All other notification content comes with the FCM message, icon is the only thing for which your OH server is needed.

Yes it visible. How to fix it?

I don’t think there’s much we can do. If your server isn’t reachable or responds too late when fetching the icons, there’s no place we can get the icons from.
We maybe could increase the timeout (currently 1 second), but I’m not sure whether that really makes much of a difference.

When looking at the app log after receiving such a notification without icon, do you get ‘Error getting icon’ lines in there or not?

thank you. But how can I increase the timeout? timeout in openhabcloud? or in my openhab client?

Now I cant catch error. All icons visible

You can’t :wink: ‘We’ was referring to ‘Android app developers’.

Either the app can’t reach myOH at that moment, or myOH can’t reach your server (fast enough). It’s hard to tell which of the two is actually the case, the latter seems a tad more likely though.
What’s your server HW? Some Raspberry Pi or something more powerful? This may play a role here as well.

openhab client installed on orange, raspberry or Jethome. Openhabcloud installed in hardware server. domain in our network, ping from openhab client to domain 1ms

PING my******.kz (45.) 56(84) bytes of data.
64 bytes from 45.
): icmp_seq=1 ttl=59 time=1.22 ms
64 bytes from 45.
* (45.): icmp_seq=2 ttl=59 time=0.986 ms
64 bytes from 45.
(45.): icmp_seq=3 ttl=59 time=1.01 ms
64 bytes from 45.
(45.): icmp_seq=4 ttl=59 time=1.07 ms
64 bytes from 45.
(45.): icmp_seq=5 ttl=59 time=1.15 ms
64 bytes from 45.
(45.*******): icmp_seq=6 ttl=59 time=1.05 ms

I have 3 devices. on 2 devices icon is visible, but on 1 is not

Maybe this icon should be cached instead of fetching it on every notification.

no, icon of battery was first time.

can I find problem in logs of openhabcloud?

Indeed. Our default is no caching, so the notification code should override that.
(TBH, I was surprised about ‘no cache’ being the default)

.get(message.icon.toUrl(context, true), timeoutMillis = 1000)
I change 1000 to 2000 and increase timeout to 2 seconds?

When in logs i have
"GET /addAndroidRegistration?deviceId=1452c0868ef0cbfd&deviceModel=Samsung+SM-A505FN&regId=dxijW8sJRzGSPLDMz_612z:********************************-*************-******** HTTP/1.1" 200 7 "-" "Mozilla/5.0 (Linux; Android 4.0.4; Galaxy Nexus Build/IMM76B) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.133 Mobile Safari/535.19"
icon is unvisible