ZoneMinder / zmeventnotification

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

Migrate from Legacy FCM to HTTP v1 for better features #306

Closed pliablepixels closed 4 years ago

pliablepixels commented 4 years ago

@lucasnz I think you said you use the ES. Wondering if you'd have time to update to latest ES and check that: a) push works as intended (with images, if you are using them) b) ES tokens file migrated to JSON doesn't create issues

I've done two things: 1) Migrated FCM push to the new FCM protocol for better features 2) Migrated tokens file in ES to JSON for better management

lucasnz commented 4 years ago

I pulled the latest master, ran install.sh and left my config the same - I've hardly changed anything in zmeventnotification.in, so I still have;

[fcm]
# Use FCM for messaging (default: yes).
enable = yes

Seemed to work fine with the latest update - Android 10. Nice to have the fast gif PR in too :)

pliablepixels commented 4 years ago

Great thanks. Can you send a sample log of the push being sent? It will be the in debug logs.

lucasnz commented 4 years ago

This??


10/10/2020 08:50:36.892365 zmeventnotification[111423].INF [main:948] [PARENT: New event 22661 reported for Monitor:2 (Name:Driveway) Motion Driveway[last processed eid:]]
10/10/2020 08:51:13.943719 zmeventnotification[112556].INF [main:948] [|----> FORK:Driveway (2), eid:22661 Event 22661 for Monitor 2 has finished]
10/10/2020 08:51:15.946675 zmeventnotification[112556].INF [main:948] [|----> FORK:Driveway (2), eid:22661 Sending event_start notification over FCM]
10/10/2020 08:51:23.571862 zmeventnotification[112556].INF [main:948] [|----> FORK:Driveway (2), eid:22661 Not sending event end notification as send_event_end_notification is no]
10/10/2020 08:51:56.891704 zmeventnotification[111423].INF [main:948] [PARENT: New event 22662 reported for Monitor:2 (Name:Driveway) Motion Driveway[last processed eid:22661]]
pliablepixels commented 4 years ago

Umm no you probably don't have debug logs enabled. No worries - can you do sudo -u www-data /usr/bin/zmeventnotification.pl --check-config and make sure Use FCM V1 APIs....................... yes is there?

lucasnz commented 4 years ago
sudo -u www-data /usr/bin/zmeventnotification.pl --check-config | grep FCM
10/10/2020 09:52:20.229945 zmeventnotification[114176].INF [main:948] [PARENT: using config file: /etc/zm/zmeventnotification.ini]
10/10/2020 09:52:20.237701 zmeventnotification[114176].INF [main:948] [PARENT: using secrets file: /etc/zm/secrets.ini]
Use FCM .............................. yes
Use FCM V1 APIs....................... yes
FCM Date Format....................... %I:%M %p, %d-%b
pliablepixels commented 4 years ago

Yay! thanks.