ZoneMinder / zmeventnotification

Machine Learning powered Secure Websocket & MQTT based ZoneMinder event notification server
412 stars 128 forks source link

No longer receiving image in notification on Android #312

Closed blauter closed 4 years ago

blauter commented 4 years ago

Just upgraded to 6.0.2 from an early 5.x version and migrated all my configs after reading through the breaking changes.

Everything is working identical to before now with the exception that I am no longer receiving an image in the notification area with each alarm on my android device. Also notifications appear inbox style as I am also now able to get multiple notifications instead of just last one (YES!).

Does using fcm v1 under 6.0.2 support including images? (Bonus if can stack notifications WITH images)

CONSOLE DBG-2:2020-10-14,22:45:12 |----> FORK:Front Door (10), eid:137165 fcmv1: Final JSON using FCMV1 being sent is: {"sound":"default","image_url":"https://zm.**********.org:****/zm/index.php?view=image&eid=137165&fid=objdetect&width=600&username=****&password=xxx},"data":{"eid":"137165","mid":"10","notification_foreground":"true"},"token":"************************","body":"[a] detected:car:100%  Forced Web:  ended at 10:45 PM, 14-Oct"} to token: ...I79SZf
CONSOLE DBG-1:2020-10-14,22:45:12 |----> FORK:Front Door (10), eid:137165 fcmv1: FCM push message returned a 200 with body {"Success":"projects/ninja-1105/messages/0:1602729912769197%311426be311426be"}

The URL loads fine from the browser on the device.

pliablepixels commented 4 years ago

Yup images work fine. There is something wrong with this payload. It should have an Android section. Could you check tokens.txt and make sure platform is android?

blauter commented 4 years ago

Problem solved, I didn't realize there was an update to ZMNinja a few days ago. After upgrade, it started working immediately.

Not sure if this is why, but before Upgrading ZMNinja, appversion was unknown in tokens.txt:

{"tokens":{"***":{"intlist":"0,0,0","monlist":"6,10,11","pushstate":"enabled","platform":"android","appversion":"unknown","invocations":{"at":"9","count":"11"}}}}

But After upgrading ZMNinja, appversion had valid version:

{"tokens":{"***":{"invocations":{"at":"9","count":"11"},"platform":"android","appversion":"1.6.000","pushstate":"enabled","monlist":"6,10,11","intlist":"0,0,0"}}}

Closing issue, thank you!