-
-
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
Monitors not updating in zmNinja after RUN state change. #1047
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. |
Yup this is a known issue https://forums.zoneminder.com/viewtopic.php?f=33&t=30422 |
Let's talk about this a bit:
|
Without knowing the mechanisms of how it all works I can't say specifically. I have some local montage views set up as Night and Day but I still need to go to settings and click "Save" for the monitor list to be updated with proper monitor modes. I would possibly either have a function reset the monitor modes and reread them everytime zmninja is opened or have a daemon on server that senses run state changes/monitor mode changes and updates zmNinja over websocket. The local montage run states I haven't played with much. I would assume that if you set monitors to disabled from zmNinja and the run state changes on the server, reenabling 1 or 2 of the 3 you disabled, the server should take precedence? Meaning that the same thing that happens if you are using zm webgui and changing monitors then a run state change happens. Example: my run state is set to Day and it's almost the time it turns to Night. I have changed some monitors to random modes manually but have not saved it to any runstate. When the Cron job script turns the run state to Night the monitors are set to whatever they are for the Night run state. Meaning whatever you set those monitors to manually is changed/forgotten. This is my understanding of expected behaviour. The local montage view can do what it does now and just show a grey background with 3 green dots if the stream isn't being offered by the servers current run state/monitor mode. I hope I'm making sense? I just don't see the issue with the local montage saved views if the run state is being monitored and updated. |
I've noticed that it seems the montage view has its own list it uses instead of using whatever zm sends. For example, in my above screenshots the monitors that are active have a small image showing the stream is active BUT the mode is set to NONE, so zmNinja hides the stream. If you then go to the Monitors menu you can see that all of the monitors are showing the correct data from zm API. |
Yup that’s the complexity. ZmNinja has its own concept of groups and I need to figure out a clean solution. I need to think about it - I won’t be able to get to this immediately. |
I have a version for you to test (desktop). What will happen is while zmNinja is running, it will not reflect the change. But if the run state changes and you restart zmNinja, it should show the monitors. Let me know which desktop version you can test, so I can upload a version. |
linux x64 |
Please give this a try https://drive.google.com/file/d/1Ahkpcg-DKOJaKi_QXPDAq_9hMk_TFLDD/view?usp=sharing |
I'd like to see logs for the following:
I'd like to see both logs. Specifically, I'm looking for text that says "ZM Changed state from" in step 5. Please post full logs for both runs. |
Okay, please hold on. My API cache was off. Will ping when fixed. |
This newest version works as described. After restarting desktop app it loads the correct Night/Day monitors in montage |
Okay, closing this. There is no way for me to know when a run state changes, unless I keep polling on a timed basis, which I don't want to do. So for now, restart the client it is. |
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?
No, I downloaded from Playstore
Describe the bug
I have a script on ZM host that changes RUN states from Day to Night or some other state. When these states change ZMNinja does not pick up on them. My Montage view is confused, for example, If I have Front, Back Alley (Night), and Back Yard (Night) monitors set up and working correctly and the state changes, The montage view automatically hides monitors it 'thinks' aren't active.
This is hard to explain and there are no errors to report. I have made a forum post about it and there is also a youtube video showing what I mean.
Forum post describing errors (with video and pictures) --> Here
I know you replied in that post but I thought it more appropriate to open an issue as this is a major part of the functionality to me and the Wife Approval Factor is not being given because of this little issue.
Debug logs
Screenshots
Here is the video. (I think you've already seen this but just adding it for context).
In this screenshot you can see how Back Yard (Day) and Back Alley (Day) are set to NONE but there is clearly a stream incoming, Also notice how the (Night) monitors are set to MODECT with no stream incoming. This means zmNinja hides the (Day) monitors from view.
Additional context
Only way I have found to get things working properly are to go to "Settings" and hit the "SAVE" button in top right corner. It then says "Please explore the menu and enjoy zmNinja". This causes zmNinja to reload the monitors and correctly identify active streams to show, a small inconvenience for technically adept people but a breaking nuisance for non-techies.
The text was updated successfully, but these errors were encountered: