Page 1 of 1

zmeventnotification - zmninja no longer displays preview image after ES 6 upgrade

Posted: Mon Sep 07, 2020 6:31 pm
by dave_88
ZM 1.34.20

Just upgraded to ES version 6 (and ZM 1.34.20 from .19) and unfortunately now zmNinja doesn't display the preview pictures, just the notification text.

I ran a debug and it is sending the following JSON:

Code: Select all

07/09/20 19:01:58.475912 zmeventnotification[4671].DBG [main:935] [|----> FORK:Front-Door (2), eid:50802 Final JSON being sent is: {"data":{"summaryText":"alarmed image","message":"[a] detected:car:63%  Forced Web:  ended at 07:01 pm, 07-Sep","badge":0,"myMessageId":4,"title":"Ended:Front-Door Alarm (50802)","eid":"50802","mid":"2","priority":1,"icon":"ic_stat_notification","style":"picture","picture":"https://MYURL.COM/zm/index.php?view=image&eid=50802&fid=objdetect&width=600&username=MYUSERNAME&password=xxx&eid=50802&fid=objdetect&width=600&username=MYUSERNAME&password=xxx to token: ...ITdu8F]
Assuming that the debug log replaces my actual password with "xxx" and that's not what it's actually sending?

Noticed it seems to append the variables to the URL twice, but even so, the URL still works in my browser and displays the image (SSL Cert Valid) when I replace xxx with my password.

I have also noticed that my phone now displays multiple push notifications one after the other. Before upgrading to ES 6, it used the same notification and over-wrote itself each time it received a new one. Not sure if this is just because it isn't displaying an image.

Any tips would be greatly appreciated.

Re: zmeventnotification - zmninja no longer displays preview image after ES 6 upgrade

Posted: Tue Sep 08, 2020 6:31 pm
by dave_88
Playing around a bit and am copying the $json, $key and $uri and sending manually via postman. Again, still no image displayed on the notification so thinking it's something on the android side of it as it's definately getting the correct URL for the image which is valid.

This is the payload of the POST request that results in no image being displayed:

Code: Select all

{"notification":{"badge":"1","icon":"ic_stat_notification","title":"TESTING","image":"https://MYURL/zm/index.php?view=image&eid=52206&fid=objdetect&width=600&username=MYUSER&password=MYPASS","android_channel_id":"zmninja","body":"[a] detected:person:81%   Decking at 07:05 pm, 08-Sep","sound":"default"},"to":"MYDEVICEKEY","data":{"badge":0,"myMessageId":1,"mid":"3","channel":"zmninja","icon":"ic_stat_notification","picture":"https://MYURL/zm/index.php?view=image&eid=52206&fid=objdetect&width=600&username=MYUSER&password=MYPASS","eid":"52206","priority":1,"message":"[a] detected:person:81%   Decking at 07:05 pm, 08-Sep","title":"Back-Door Alarm (52206)","style":"picture","summaryText":"alarmed image"}}
Or formatted:

Code: Select all

{
  "notification": {
    "badge": "1",
    "icon": "ic_stat_notification",
    "title": "TESTING",
    "image": "https://MYURL/zm/index.php?view=image&eid=52206&fid=objdetect&width=600&username=MYUSER&password=MYPASS",
    "android_channel_id": "zmninja",
    "body": "[a] detected:person:81%   Decking at 07:05 pm, 08-Sep",
    "sound": "default"
  },
  "to": "MYDEVICEKEY",
  "data": {
    "badge": 0,
    "myMessageId": 1,
    "mid": "3",
    "channel": "zmninja",
    "icon": "ic_stat_notification",
    "picture": "https://MYURL/zm/index.php?view=image&eid=52206&fid=objdetect&width=600&username=MYUSER&password=MYPASS",
    "eid": "52206",
    "priority": 1,
    "message": "[a] detected:person:81%   Decking at 07:05 pm, 08-Sep",
    "title": "Back-Door Alarm (52206)",
    "style": "picture",
    "summaryText": "alarmed image"
  }
}
WIll keep playing and see unless anyone can see any reason why both of my Android devices (S9 and S9 Note) are refusing to display the image, only the text (both background and foreground).

Re: zmeventnotification - zmninja no longer displays preview image after ES 6 upgrade

Posted: Tue Sep 08, 2020 6:56 pm
by asker
Looks like you updated to ES 6.
You may need an updated apk - I'm surprised you are getting a push at all.
Please make sure you are not using self signed certs and the URL is externally reachable.

If you could send me an email (pliablepixels @ gmail) I'll send you an updated apk to test

Re: zmeventnotification - zmninja no longer displays preview image after ES 6 upgrade

Posted: Tue Sep 08, 2020 7:05 pm
by dave_88
Hi,

Yep, image is good for SSL, even tried sending a different URL of an image from google and same effect. Imagine this is something to do with the notification channel settings on the app then?

Will send you a message now. Thanks for your help

Re: zmeventnotification - zmninja no longer displays preview image after ES 6 upgrade

Posted: Tue Sep 08, 2020 7:25 pm
by dave_88
Just installed the APK and that now works perfectly with the push notification images. Thanks very much for your support with this. :D

Re: zmeventnotification - zmninja no longer displays preview image after ES 6 upgrade

Posted: Tue Sep 08, 2020 7:31 pm
by dave_88
Double bonus...looks like you've also resolved the issue I was having with squashed thumbs for my fisheye camera!

viewtopic.php?f=33&t=29785

Re: zmeventnotification - zmninja no longer displays preview image after ES 6 upgrade

Posted: Tue Sep 08, 2020 7:39 pm
by asker
Glad you got it working and yes, I was hoping this version would fix the thumb issue.