667bdrm / sofiactl

sofiactl is an open source cross-platform tool and sdk to control Sofia powered Hi35xx DVR devices
80 stars 22 forks source link

Shutdown the DVR #4

Closed Vladdrako closed 3 years ago

Vladdrako commented 5 years ago

Hi. Can I shutdown the DVR via sofiactl? I have OpenWrt-based Wi-Fi router with UPS connected to USB via Network Ups Tools. I want to automate shutdown. OpenWrt will send shutdown command to DVR, then power off UPS.

667bdrm commented 4 years ago

Hi. I don't know if the device Sofia api support shutdown. I only seen the reboot schedule option in the CMS app. If you have root password of the DVR linux you could try to authenticate and execute 'halt' shell command from the OpenWRT, but it could not have effect if the device does not have implemented the shutdown functionality. Here is a list of known DVR linux passwords. Otherwise you need to have DVR power connected through managed relay (for example Arduino or ESP8266 based).

667bdrm commented 4 years ago

Update:

Just checked with the new camera:

/sbin/halt and /sbin/poweroff killing telnet session, the device not answering to pings, but after timeout the device become visible and accessible by telnet. Looks like it rebooting after these commands.