Keroi / yi-hack-v4

New Custom Firmware for Xiaomi Cameras based on Hi3518e Chipset. It features RTSP, PTZ, SSH, FTP and more!
GNU General Public License v3.0
21 stars 3 forks source link

Turn Camera On/Off via command line #1

Open tunerooster opened 3 years ago

tunerooster commented 3 years ago

Using the 0.2.1 release, how do you turn the camera on/off using ssh or curl (or any other command line process)? Thanks!!!!!

tunerooster commented 3 years ago

I found the answer: ssh camera ipc_cmd -t OFF

Usage: ipc_cmd [t ON/OFF] [-s SENS] [-l LED] [-v WHEN] [-i IR] [-r ROTATE] [-m MOVE] [-p NUM] [-d]

-t ON/OFF, --switch ON/OFF
    switch ON or OFF the cam
-s SENS, --sensitivity SENS
    set sensitivity: LOW, MEDIUM or HIGH
-l LED, --led LED
    set led: ON or OFF
-v WHEN, --save WHEN
    set save mode: ALWAYS or DETECT
-i IR, --ir IR
    set ir led: ON or OFF
-r ROTATE, --rotate ROTATE
    set rotate: ON or OFF
-m MOVE, --move MOVE
    send PTZ command: RIGHT, LEFT, DOWN, UP or STOP
-p NUM, --preset NUM
    send PTZ go to preset command: NUM = [0..7]
-f FILE, --file FILE
    read binary command from FILE
-x,     --xxx
    send xxx message
-d,     --debug
    enable debug
-h,     --help
    print this help
iclems commented 3 years ago

Hi! Awesome work. Looking into this, I don't really need the complete upgrade but wonder for a kid if there is any way to control just the status LED remotely without flashing? https://api.eu.xiaoyi.com/v2/ipc/... I've monitored everything but it appears the settings updates are communicated via a secure websocket making it hard to find a direct command