-
-
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
Add Wake/Sleep/Reset to PTZ functions (credit: @sctt) #306
Comments
You mean PTZ functions? They are not implemented yet in zmNinja |
Yes, i mean PTZ functions. You say that they are not implemented yet, but that confuses me because i can see a PTZ panel which i can use to control movement functions. I use Wake and Sleep functions to control my IR LEDs, but i can temporarily use movement functions for that aim, even if it is quite counterintuitive. While waiting for those Wake and Sleep functions to be implemented, can you please confirm that PTZ movement functions on zmninja have already been coded? thank you a lot. |
not sure which PTZ panel you are referring to - that of ZM or zmNinja. zmNinja has a PTZ panel, but I haven't added buttons beyond movement and presets. I don't have a camera to test wake/sleep PTZ movement has been implemented in zmNinja. You can always download the desktop version which is free and test for yourself to make sure it works for you. |
I was referring to zmNinja panel. Thank you for your answer, i see that only movement functions have been implemented on zmNinja, and i can use those to control my IR LEDs right now. Anyway, you don't need special cameras to test wake/sleep/reset or anything. That was just a suggestion if you really intend to implement those new buttons, i think that they will be useful to many users. Thank you again for your support. |
No, that won't help. All that does is simply add a button called wake that just moves the camera which really doesn't help in testing if zmNinja got the wake command right. |
Sorry, i don't really want to insist, but i took a look at your code... on the click event of your zmNinja PTZ panel buttons you just call a ControlPTZ function with the proper cmd name.
that function just posts HTTP data to zoneminder in this simple format:
i see that your code doesn't really care what the control command actually does, it just invoke it by posting the command name to ZM. to implement a wake function you just need to do something like this:
posting those data:
for what concerns to you, that wake function could do anything, from turning on IR LEDs to moving your camera orientation, from echoing an 'hello world' on a /tmp/test file to activating your house self exploding bombs... the effect is not important at all, it depends on the custom perl script which is a user responsability. i don't want to sound like imposing this implementation to you, i will be happy to code it by myself in the next future, when i will manage to overcome those deathlines which i'm currently on. if i'll find the time to code and test this enhancement, i hope you will consider it for your next release. thank you. |
Happy to accept a PR, here are the things you need to do:
|
Got it, thanks a lot. |
…s multi-device formatting - so there is no button overlap
tweaks to Sleep/Wake/Reset #306
thanks for contributing - looks good! |
@sctt - merged your changes with some UI tweaks. Can you pull latest master and test it works as required? |
Thank you for merging! i tested this latest master version and unfortunately those tweaks broke the w/s/r on my environment. you see, handling w/s/r as "presets" binds those control functions to the hasPresets flag : www/js/MonitorModalCtrl.js:1146 :
but in fact my cameras don't have presets, and i didn't check HasPresets in my ZM Control Settings because i simply didn't need to. i like your "list approach" and the nice icons you chose, but i think we have better to find a way to unbind w/s/r to presets, maybe adding another button near the presets one or something. i'm sorry if i can't give you nice suggestions about this, but i'm not very good in graphics, UIs and UX. |
ah I see. How about now? |
I did a brief test... but unfortunately i'm experimenting severe bandwidth problems right now and sockets keep crashing on me (grrrrr), but w/r/s seems to work well now. i just wanted to say that, even thought functionality seems to work just fine, UI doesn't feel right to me. i like the new icons a lot, i just find strange that i have to click on "pan/tilt/zoom", then on "more" or "presets" and then on an "opened eye icon" in order to access the wake function. the interface doesn't give any clue about what those nice icons are for, not even how to reach w/s/r functions from the monitor view.
i don't know, maybe it would be better to add another button to the bottom-right menu named "wake/sleep/reset" and pushing those icons to the bottom center, taking them away from p/t/z panel in a cleaner and intuitive fashion. don't take me wrong, i don't actually care that much about UI, i'm happy that those functions are working now and if it was up to me i'll release everything how it is. let me know if you want to code what i proposed (or want me to code it, i have some free-coffee nights), if you have another idea, or if you want to leave everything how it is. |
I agree. I need to re-look at this screen. I don't want to keep adding new sets of buttons at arbitrary locations on the screens as it causes layout hell in different modes/devices. I started with the arbitrary location approach and then changed to lists, and now have both :-) I plan to move Zoom as well into this list. I've made some more tweaks. Let me know if its going in the right direction. |
i finally managed to solve my connection problem, i did a deeper test and i confirm that w/s/r works pretty well on my cameras. i pulled last master and i see that UI is totally better now! maybe the controlToggle button shoud not appear if in the end $scope.ptzPresets.length == 0 , but that's a minor detail. i did a little code clean: i removed w/s/r conditions starting from line 1099 and added command names on those starting from line 1203, like this:
i tested and it works. UI satisfies me now, let me know if you are still considering other improvements. |
thanks. I don't think we need the ptzWake/Reset/Sleep Commands any more of 1099 do we ? Since they were moved to the list, the list already has the command |
yes you are right, if the list approach is final those variables like $scope.ptzWakeCommand are not useful anymore and they can be removed from MontageCtrl and MonitorCtrl too. i take this opportunity for asking you if you have already planned a release date for this w/s/r thing. |
I'll be uploading it to the beta channel http://pliablepixels.github.io/2016/08/12/android-open-beta.html I'd like to wait a month in beta before I push to release - I have a habit of breaking stuff in Android |
that makes sense, beta will be just fine, i've already applied to become a tester. |
sounds good - let's close this issue for now and I can upload a new release to beta. If something breaks, we can always re-open |
Hello,
i can't find anywhere the control functions named "Wake", "Sleep" and "Reset" that are present in the classic zoneminder web interface.
are they actually missing or am i missing something?
thank you.
The text was updated successfully, but these errors were encountered: