IP3M-941B ONVIF and User Management

Have some questions or having issues with your IP Camera(s), Post them here for the mods and other users to assist you with.
User avatar
Revo2Maxx
Site Admin
Posts: 5900
Joined: Sat Jun 15, 2019 3:05 pm

Re: IP3M-941B ONVIF and User Management

Post 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...
Be Safe.
jack7
Posts: 904
Joined: Tue May 29, 2018 7:46 pm

Re: IP3M-941B ONVIF and User Management

Post by jack7 »

It is confusing, but you need to set it to false for it to work.  Try using

Code: Select all

http://ID:[email protected]/cgi-bin/configManager.cgi?action=setConfig&UserGlobal.OnvifLoginCheck=false 
 
It should end up as:
table.UserGlobal.OnvifLoginCheck=false
User avatar
Revo2Maxx
Site Admin
Posts: 5900
Joined: Sat Jun 15, 2019 3:05 pm

Re: IP3M-941B ONVIF and User Management

Post 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..
Be Safe.
User avatar
Revo2Maxx
Site Admin
Posts: 5900
Joined: Sat Jun 15, 2019 3:05 pm

Re: IP3M-941B ONVIF and User Management

Post 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..
Be Safe.
Slyke
Posts: 14
Joined: Sun Jul 11, 2021 2:57 pm

Re: IP3M-941B ONVIF and User Management

Post 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.
Slyke
Posts: 14
Joined: Sun Jul 11, 2021 2:57 pm

Re: IP3M-941B ONVIF and User Management

Post 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

Code: Select all

/src/amcrest/system.py
(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

Code: Select all

python3 yourPythonFile.py
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
jack7
Posts: 904
Joined: Tue May 29, 2018 7:46 pm

Re: IP3M-941B ONVIF and User Management

Post 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
Slyke
Posts: 14
Joined: Sun Jul 11, 2021 2:57 pm

Re: IP3M-941B ONVIF and User Management

Post by Slyke »

PR on the python-amcrest repo has been merged. Use version 1.8.0 or higher.
Post Reply