TheCrypt0 / yi-hack-v4

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

Is there a way to turn on/off Yi Dome 1080 via web/ssh? #204

Open bit111 opened 4 years ago

bit111 commented 4 years ago

Hi, I've installed yi-hack-v4 on my Yi 1080 Dome camera and integrated it in home-assistant. I would like know if there is a way to turn on/off camera outside yi app. My intention is to turn on/off it via home-assistant.

Mcgurk125 commented 4 years ago

+1

guillaume-smo commented 4 years ago

any solution equivalent to the "on/off" button in Yi Home app ?

edit: I found this fork https://github.com/Keroi/yi-hack-v4 which has implemented on/off switch "copied from official app", but I did not tested it

pkishino commented 4 years ago

Kerois fork works well :)

mcgurdan commented 4 years ago

How do I go about installing the Kerios fork?

pkishino commented 4 years ago

Same as this one, go to fork and download latest release

On Tue, May 5, 2020 at 16:12 mcgurdan notifications@github.com wrote:

How do I go about installing the Kerios fork?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/TheCrypt0/yi-hack-v4/issues/204#issuecomment-623891764, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA7OFYUJI6FVR7PWR2HUCQTRP634NANCNFSM4LFZ22ZA .

bit111 commented 4 years ago

edit: I found this fork https://github.com/Keroi/yi-hack-v4 which has implemented on/off switch "copied from official app", but I did not tested it

I have 2 cameras. I made a donation but I have enabled only one camera with RTSP. How can I enable second camera without make another donation? TheCrypt0's project seems to be dead.

mcgurdan commented 4 years ago

Same as this one, go to fork and download latest release On Tue, May 5, 2020 at 16:12 mcgurdan @.***> wrote: How do I go about installing the Kerios fork? — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#204 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA7OFYUJI6FVR7PWR2HUCQTRP634NANCNFSM4LFZ22ZA .

The instructions on the fork to say to grab the firmware from the usual place: https://github.com/TheCrypt0/yi-hack-v4/releases

However, the usual firmware does not include the extra functionality in that fork. Is there a guide on manually installing the files? The fork contains the yi-hack-v4-master folder?

bit111 commented 4 years ago

Same as this one, go to fork and download latest release On Tue, May 5, 2020 at 16:12 mcgurdan @.***> wrote: How do I go about installing the Kerios fork? — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#204 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA7OFYUJI6FVR7PWR2HUCQTRP634NANCNFSM4LFZ22ZA .

The instructions on the fork to say to grab the firmware from the usual place: https://github.com/TheCrypt0/yi-hack-v4/releases

However, the usual firmware does not include the extra functionality in that fork. Is there a guide on manually installing the files? The fork contains the yi-hack-v4-master folder?

I founded this link: https://github.com/Keroi/yi-hack-v4/releases/tag/v0.2.1 edit: but it's a pre-release

mcgurdan commented 4 years ago

That worked! Thanks

bit111 commented 4 years ago

That worked! Thanks

Let me know if turn on/off works!

mcgurdan commented 4 years ago

It does, I can see the web preview and everything seems to functioning properly (although RTSP stream is still very choppy).

However, when attempting to save the camera settings nothing happens. Looking at the dev tools in Chrome I can see a Javascript error: _module camerasettings not registered

tunerooster commented 4 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 4 years ago

I found the answer to my own question:

ssh camera ipc_cmd -t ON 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