-
-
Notifications
You must be signed in to change notification settings - Fork 274
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Notifications for events from unchecked monitor. #1022
Comments
👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you follow the issue template or I may not respond. |
Check if the monitors specified in |
Hi, There were 14 events recorded tonight, 4 of them had object detected. I received a notification for 2 events, 1 of them with object detected 1 without. It's no biggie really, just strange why it's happening. |
Okay. You may want to enable Debug logs for a few days if you want us to dive into what is going on. If not, feel free to close this. |
I enabled debug logs in the app on the phone, after I get unmonitored notification is there anything specific I'm looking for? I'll upload them here in any case. |
Yes, we are looking for logs from |
Of course 1st day after enabling debug logs it doesn't happen. I'll keep an eye on it, but I was wondering I see these in the log:
Why is it talking about monitor 1? That's the unselected one. Shouldn't it be talking about monitor 2 as that is what
Apologies if I'm misunderstanding how it all works. |
managed to get the logs. while at work I got 3 notifications for outside camera (in the time I was at work there were 18 events recorded in ZM). The full log is humongous 11M txt file, if you need it I can upload it somewhere, but the 3 events that prompted the unwanted notifications all look like this just the event number changes: event 489 @ 13:28
what immediately jumps at me is first it correctly says forgot to add that only the phone received these notifications, none on the tablet |
This block:
It is not sending a notification via FCM. It is sending a message via MQTT - two completely different things. I'm not sure what happens after MQTT is sent - if some MQTT broker is further sending a push, then its out of scope. My guess is you've used zmNinja to disable that monitor. That only applies for FCM tokens. zmNinja has no idea about anything else except for FCM. Next up:
This is for a different token, so different device. |
It's not the mqtt, as I tried disabling it via setting
in However I believe I narrowed it down to hook processing, as if I disable hooks, everything starts working as it should, with the unfortunate side effect of the zmninja notifications not having a picture now. Did some testing by generating ZM events on inside camera and I only got zmninja notification when an object is detected. I tested this by walking in front of the inside camera twice, both times both devices got notification from zmninja that a person was detected on inside camera. Then I slid my chair across the room twice, and while ZM recorded the event, no notification was generated. This lead me to the hooks, after I disabled those everything started working as I want, i.e. no notifications from outside, all of the notifications from the inside. This tells me I probably misconfigured something in the hooks, but I can't figure what. Obviously that's likely not the case, but were you to ask me I'd swear I haven't edited the files in months until trying to debug this issue few weeks back. I'll attach my inis below:
I'll leave it with mqtt and hooks off overnight and see if I get any unwanted notifications tomorrow. |
OK, I'm getting really lost now. After the yesterdays changes, what happens now is, the phone doesn't receive notifications from the unchecked monitor, but now the tablet started receiving them... this is from the logs for one such event (with mqtt and hooks still off)
edit:
I doublechecked zmninja on both devices and the push/tokens,txt and both zmnijnjas have monitor 1 unselected and in the tokens.txt both have only 2 in mon_list. |
1 day after turning off hooks tablet stopped receiving notification from disabled monitor. 2 days after turning hooks no device received any notification from disabled monitor. Turned on hooks yesterday, this morning phone started getting notifications from disabled monitor. |
I need to see logs that reflect your observations. The last logs you posted which I responded to showed MQTT messages being sent off. Can you post new logs, with MQTT off and showing the problem? |
In the post from 4 days ago I posted logs where both mqtt and hooks were off |
Can you post tokens.txt? |
|
This seems like a bug for now. Will look into it. |
I've added some logs and made some fixes to zmeventnotification.pl - please try master and post logs |
I think I'll have to wait till the changes make it into stable docker ZM image as that's what I'm using. |
Can't you just overwrite zmeventnotification.pl with the new one and test? |
Oh I thought full master install was needed. I went inside the container in portainer, made a backup of Will enable hooks and restart the container and report back when I catch some logs. |
I don't use docker, but not sure if your changes will persist if you restart the container. Instead:
|
You're right of course (I ain't that great with docker myself I just like the portability of it). I ran the commands you suggested after I changed the file without restarting the container:
and I verified the log.txt is receiving the debug log. |
This is no longer happening with latest ES and the dlandon/zoneminder image was also updated to latest ES version and everything works fine. Many thanks for the fixes! |
The version of zmNinja you are reporting:
The version and OS of ZoneMinder you are using:
Platform zmNinja is running on
Did you build the package from source code yourself?
N
Describe the bug
I got 2 cameras in ZM, outside, inside. In zmninja settings/event server I have outside unchecked and inside checked.
I set up the whole thing, ZM, eventserver, object detect, installed zmninja on phone/tablet and all is well, however, every morning I wake up, or every break at work, on the phone I will get notifications for detected events, but they are for outside camera that's unchecked in event server settings. It is not every event, it's just some of events with detected objects
I cleared API cache, I cleared the whole app data and set the app from the ground and it still happens. I also have zmninja set up with the exact same settings on android 9 tablet and there I only receive notifications from the enabled monitor
It is not consistent it happens randomly. For whatever reason also the tablet tends to get the notifications always earlier, sometimes by up to a minute or two.
Debug logs
The text was updated successfully, but these errors were encountered: