Page 3 of 3
Re: IP3M-941B ONVIF and User Management
Posted: Mon Jul 12, 2021 5:47 pm
by Revo2Maxx
On the 941 I was able to get it to give a True Result
table.UserGlobal.OnvifLoginCheck=true
And also on the 841v3 after a few more tries..
Edit: After getting the Ok for setting running the Onvifer I still get the same error message...
Re: IP3M-941B ONVIF and User Management
Posted: Mon Jul 12, 2021 7:47 pm
by jack7
It is confusing, but you need to set it to false for it to work. Try using
It should end up as:
table.UserGlobal.OnvifLoginCheck=false
Re: IP3M-941B ONVIF and User Management
Posted: Mon Jul 12, 2021 8:04 pm
by Revo2Maxx
Interesting I kept doing the True and thought that was what it needed however the one post in your last post was what made it work.
Thanks for the Time you have invested in tracking down how people can make this work for them now and into the future..
Re: IP3M-941B ONVIF and User Management
Posted: Mon Jul 12, 2021 8:09 pm
by Revo2Maxx
Also to Confirm that it did truly worked, Onvifer comes with with working results and I was able to add Revo2Maxx user to my Hikvision DVR where before the change I wasn't able to so it does now work..
Re: IP3M-941B ONVIF and User Management
Posted: Tue Jul 13, 2021 12:23 am
by Slyke
Where did you get those REST API docs from @jack7 ? I tried the call you did, but kept getting 401. It probably is different for my camera.
Re: IP3M-941B ONVIF and User Management
Posted: Tue Jul 13, 2021 1:07 am
by Slyke
Edit: See bottom. A PR has been submitted, if it has been merged, skip to after the ------------
@jack7 I got it working!
Easiest way for other people to get it working:
Clone this repo
https://github.com/tchellomello/python-amcrest or do a
pip install amcrest && pip show amcrest
Then, open the file
(either using the path provided by pip show, or in the repo's directory) and scroll down to the very bottom:
https://github.com/tchellomello/python- ... em.py#L167
Paste the following code below the reboot function def:
Code: Select all
def onvif_login_check(self, setCheck=False):
if setCheck == True:
ret = self.command(
"configManager.cgi?action=setConfig&UserGlobal.OnvifLoginCheck=true"
)
else:
ret = self.command(
"configManager.cgi?action=setConfig&UserGlobal.OnvifLoginCheck=false"
)
return ret.content.decode('utf-8')
------------
Then create python file, on say your desktop and paste this into it, replacing the IP, and password (the account must be the admin account):
Code: Select all
from amcrest import AmcrestCamera, AmcrestError
camera = AmcrestCamera('192.168.1.X', 80, 'admin', 'yourCameraPassword').camera
try:
print(camera.onvif_login_check(False))
except AmcrestError as error:
print(error)
Then just run with
It should simply print OK.
If you ever need to turn it off in the future, just change the following line from False to True:
Code: Select all
print(camera.onvif_login_check(True))
I submitted a PR to that repo. Hopefully the developer will merge it. Once merged, this will allow skipping everything except the creating and executing of the yourPythonFile.py file
PR:
https://github.com/tchellomello/python-amcrest/pull/178
Re: IP3M-941B ONVIF and User Management
Posted: Tue Jul 13, 2021 8:43 am
by jack7
Slyke wrote: ↑Tue Jul 13, 2021 12:23 am
Where did you get those REST API docs from @jack7 ? ...
https://support.amcrest.com/hc/en-us/ar ... TP-API-SDK
Re: IP3M-941B ONVIF and User Management
Posted: Fri Jul 23, 2021 10:44 pm
by Slyke
PR on the python-amcrest repo has been merged. Use version 1.8.0 or higher.