HIKVision NVR rebooting utility

aster1x

Getting the hang of it
Joined
Jul 8, 2014
Messages
400
Reaction score
87
I have an HIKVision NVR 7604NI/SEP at a remote site which is headless that sometimes the web interface is not reachable from the LAN although the LAN network interface of the NVR responds to pings, the NVR has not stopped recording, the emails generated from motion detection still works and the camera connected to the POE switch of the NVR is accessible from the LAN. Only the NVR web interface is not accessible and therefore it is not possible to reboot the NVR from the interface. Therefore in this case the only way to recover the web interface is to physically turn off and on the NVR from the NVR power switch.

In the Android playstore there is a dahua rebooter application that is not compatible with the HIKVision NVR's.

Is there a utility (preferably for the raspberry) to remotely connect to the NVR and issue a reboot command(assuming the telnet is still accessible)?
Alternatively is there a script to reboot the NVR at predefined tme intervals?
 

fenderman

Staff member
Joined
Mar 9, 2014
Messages
36,905
Reaction score
21,278
There are several threads discussing network controlled power outlets...
 

aster1x

Getting the hang of it
Joined
Jul 8, 2014
Messages
400
Reaction score
87
Cycling the power off-on in an NVR poses a risk for hard disk failures. This solution should be the last resort if all other software measures within the NVR fail. That's why I am looking for a software utility in the form of script preferably running externally to the NVR through a raspberry, assuming that a raspberry running a lean and clean OS with as few apps running in the background can be absolutely stable.

So any software solution?
 

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,966
Reaction score
6,795
Location
Scotland
I think the limitation, with the native NVR firmware, is the lack of the reboot command in the 'psh' restricted shell.
For the older firmware with a full telnet access, it would be possible to use command-line PuTTY (plink.exe) to log on and execute 'reboot' for a controlled re-start.

There is also in theory the ISAPI interface where a scripted HTTP PUT ISAPI/System/reboot should work - but I have not (yet) tried that.
 

aster1x

Getting the hang of it
Joined
Jul 8, 2014
Messages
400
Reaction score
87
@alastair, thanks for the info. I have two requirements.
1. A script that will run automatically from within the camera or NVR and reboot the device at predefined intervals, say once per day, or once per week.
This script will ensure that the device will -hopefully- run for ever without crashes and if it crashes then it will reboot at the next execution of the script, assuming that the script or kernel does not crash.
In case that all fails then the second requirement may help recover the device.
2. An external script to reboot the device remotely either through the telnet reboot command or the methods suggested by Alastair.

So anybody able to help on the above two requirements?
 
Last edited by a moderator:

Sean Nelson

Pulling my weight
Joined
Apr 20, 2016
Messages
159
Reaction score
203
Location
Tulsa
Interesting. I know of no tool from Hik that allows remote rebooting. I think the real problem that should be tackled is why is your NVR not responding to requests when trying to access the web interface. That should not be happening and is not really normal. Only issues that I can think of is:

- Possible IP conflict? Rare yes, but if you have your IP address set low to what most of your other devices are set to, then you increase the likelihood of a conflict when another device comes on the network via DHCP (such as a cellphone, computer, etc) Set your IP address really high, I usually do mine in the 240 and up range. example: 192.168.1.240
- Turn off UPNP on all your cameras and NVR, If you have already done port forwarding, but you still have UPNP on your NVR, then you have a port conflict which causes all kinds of issues including the one you mentioned. Given your symptoms, I almost think this could be the case, because you said emails still work which means outgoing traffic is still working, and it still responds to pings, but accessing the web page is intermittent. And rebooting the NVR would reset all the UPNP rules which would cause it to work again. It may even be worthwhile to change all of the port numbers to something completely different.
- possible bad NVR? How often does this happen? is it every day? If so, that can be an easily duplicatated issue and should be warranted by your dealer. If it happens like once every 2 months, that will be a tough one, more than likely something on your network causing the issue. Usually if its something bad with the recorder, it will happen often and frequently.
 

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,966
Reaction score
6,795
Location
Scotland
why is your NVR not responding to requests when trying to access the web interface. That should not be happening and is not really normal.
I do agree with Sean.
I have 2 Hik 7816 NVRs, about 18 months now, and not once has there been a freeze or reboot, with various versions of firmware.
The 'production' one had been running for a whole year with zero issues or even manual reboots before I decided it was time to upgrade from the firmware it came with.
The Hikvision cameras seem to go for many months without any hiccups, pretty stable but not as stable as the NVRs.

The HiSilicon SoCs do have a 'watchdog' facility that needs to be 'fed' periodically by the running system if it's not to trigger a reset / reboot, but that still requires some active functionality.
 

aster1x

Getting the hang of it
Joined
Jul 8, 2014
Messages
400
Reaction score
87
Nice and useful views by @seanNelson. Thanks
I use static IPs not included in the DHCP pool. So I know the problem with improper IP assignments. Therefore I do not have IP conflicts in the LAN.
I have off the UPNP and use manual port assignments and port forwarding in my router.

The problem with the crashed web nvr interface happens very seldomly, say once every 3 to 6 months. It is not a systematic problem. Dahua NVRs have a heartbeat monitor and also a configurable rebooting feature that reboots the NVR upon a configurable schedule.
Therefore it is not a problem that can be reproduced.

So can someone write a scheduled software script for the HIKVision NVRs?
 
Last edited by a moderator:

ZePrez

n3wb
Joined
Sep 26, 2016
Messages
6
Reaction score
0
I am dreaming for such a solution and woudl like to keep this thread alive.

Here is my situation. NVR is on UPS... Power outages are frequent and sometimes lengthy. IN those cases UPS runs out and shuts everything off... Not a graceful way to turn off. When power is back on. NVR simply boot up, not much of a problem for booting upon AC power present: that is their default mode. Turning them off from UPS command is the problem, I haven't seen anything like this on Hik.

UPS can be set to send a shutoff command (recognized by Win, Linux and sometimes Mac PCs) when the UPS reaches a certain level of battery depletion. Say it 'sees" it only has 5 mins left .. it send a "Power PC off" command... I would have liked the NVR or if hacking the NVR firmware is too much of a bother, to have a Raspberry Pi contraption "sees' this Power off command and shut off the NVR gracefully... Upon re-establishment of AC power, the NVR simply turns on.
 

pal251

Getting comfortable
Joined
Mar 15, 2014
Messages
1,012
Reaction score
133
Have you tried accessing from the desktop program? Mine does that but the program still works vs the web interface
 

Fruit

Getting the hang of it
Joined
Sep 26, 2015
Messages
152
Reaction score
50
Location
CA
Use the IVMS4200 client to remotely reboot...this works off their server/RTSP port and not Http port so might work for you if you are having http port issue...

Reboot ivms4200.JPG
 

ZePrez

n3wb
Joined
Sep 26, 2016
Messages
6
Reaction score
0
Use the IVMS4200 client to remotely reboot...this works off their server/RTSP port and not Http port so might work for you if you are having http port issue...

View attachment 12715
Hi

rebooting is not the issue. I would want the UPS to shut down gracefully the NVR when there is not enogh battery capacity. Thought experiment: A window or Linux machine is hooked to the UPS. THE UPS battery has only 5 minutes of capacity left, UPS sends a shutdown signal to the Win or Linux PC. PC then enters in its shutdown cycle.. it stops processes and gracefully shuts off. I can in the BIOS se the PC to turn on once there is power. So when the power returns and the UPS is charged the PC goes on. I can't do that with the Hikvision NVR.. if the UPS has only 5 minutes of POwer left it will send a shutdown string bu tthe NVR will not recognize it .. Eventually the UPS goes down and so does the NVR but in this case not gracefully ... Of course when power returns it turns on... Now for the most part with the UPPER models of Hikvision UPS, they have dual boot partition somewhere in their NVRAM so they can take a little bit of ungraceful shutdowns eventually .. you will lose a HDD or more .. after a few of those ungraceful shutdown. That is why I believe UPS control of an NVR is essential. I haven't seen in any Hikvision UPS and would like to see an utility that allows one to do so .. doable though hacking iVMS 4200 perhaps ... I am not knowledgeable about HTTP enough to do it but could learn but if a guru would ... ;) .....:)
 
Top