Counting viewers for an Amcrest NVR

i have an Amcrest NVR. it is capable of showing the numbers of viewers logged in. the number is always 1 because im the only person. im curious if there’s a way to alert me if the number = 2 or greater. if it can’t, can any other NVR do this with HA?

You could try using this to make a template sensor, but every connection is going to most likely show up as a new admin connection when viewing from different device, the Amcrest App, a web browser, your NVR itself… so it probably wouldn’t work great unless you are sure you always only have one view yourself… or make sure to have a different username for every single possible connection you may use…

'curl -s --digest -u admin:<password> "http://192.168.1.<your-nvr-ip>/cgi-bin/userManager.cgi?action=getActiveUserInfoAll"'

i am sorry but where can i put your code in?

It would be in either a command_line sensor or you could try a rest sensor but that would be just the http address part without the curl stuff…

Before you get into all this… I would try going to this address in a web browser:

http://admin:<password>@192.168.1.<your-nvr-ip>/cgi-bin/userManager.cgi?action=getActiveUserInfoAll

and see how many users it returns… you would then need to figure out how to parse that data into a single number based on what it shows you…

But again, I would try it in a browser and see if you even get the results you expect as even HA is going to show up as a logged in user unless you have created a username in your NVR for every single connection to the NVR you have…