๐ŸŽฅ Yi Home 1080p

March 21, 2026 ยท View on GitHub

A complete remote surveillance and control system for the Yi Home 1080p camera running yi-hack-allwinner v2 firmware by roleoroleo. Control your camera, receive automatic alerts, and communicate bidirectionally โ€” all through a Telegram bot.


โœจ Features

  • ๐Ÿ“ท On-demand snapshot and video recording via Telegram commands
  • ๐Ÿšจ Automatic motion alerts with photo
  • ๐Ÿ”Š Automatic sound alerts with snapshot + 15s audio clip
  • ๐ŸŽ™๏ธ Bidirectional voice intercom โ€” speak through Telegram, hear through the camera speaker
  • ๐Ÿ’ก Blue LED control โ€” turn on/off remotely
  • ๐Ÿ”† Infrared control โ€” turn on/off remotely
  • ๐Ÿ”• Silent mode โ€” suppress notifications without stopping the watchers
  • ๐Ÿ“Š System status โ€” IP, uptime, memory, process PIDs
  • ๐Ÿ”„ Remote reboot

๐Ÿ“ Project structure

โ”œโ”€โ”€ config.env              # Bot credentials (NOT included โ€” create manually)
โ”œโ”€โ”€ lower_half_init.sh      # System startup and process launcher
โ”œโ”€โ”€ telegram_control.sh     # Telegram bot: command reception and processing
โ”œโ”€โ”€ watch_motion.sh         # Motion detection watcher
โ”œโ”€โ”€ watch_sound.sh          # Sound detection watcher
โ””โ”€โ”€ intercom.sh             # Bidirectional voice intercom

๐Ÿค– Telegram commands

CommandDescription
/snapshotCapture and send a photo
/videoRecord and send a 15s video
/motion_on / /motion_offStart / stop motion watcher
/sound_on / /sound_offStart / stop sound watcher
/intercom_on / /intercom_offStart / stop voice intercom
/silent_on / /silent_offSilence / re-enable alerts
/led_on / /led_offTurn blue LED on / off
/ir_on / /ir_offTurn infrared on / off
/statusShow system status
/logShow last 30 lines of the log
/rebootReboot the camera
/helpShow all available commands

โš™๏ธ Prerequisites

The following ARM-precompiled binaries must be present on the camera:

BinaryPurpose
curlTelegram API communication
ffmpegAudio/video conversion (requires libopus)
imggrabberSnapshot capture
h264grabberH.264 video capture
speakerSpeaker hardware control
ipc_cmdHardware control (LED, IR, motion)

All binaries should be placed in /tmp/sd/yi-hack/bin/.

Download curl by @moparisthebest.

Download ffmpeg by @johnvansickle.


๐Ÿš€ Installation

1. Access the camera

ssh root@<camera-ip>

2. Copy scripts

# Copy all .sh files to the scripts directory
chmod +x /tmp/sd/yi-hack/script/*.sh
mkdir -p /tmp/sd/yi-hack/motion

3. Create config.env

cat > /tmp/sd/yi-hack/script/config.env << 'EOF'
#!/bin/sh
BOT_TOKEN="YOUR_BOT_TOKEN_HERE"
CHAT_ID="YOUR_CHAT_ID_HERE"
EOF

4. Create your Telegram bot

  1. Open Telegram and search for @BotFather
  2. Send /newbot and follow the instructions
  3. Copy the token to BOT_TOKEN in config.env
  4. Get your CHAT_ID by sending a message to your bot and visiting: https://api.telegram.org/bot<TOKEN>/getUpdates

5. Test manually (without rebooting)

sh /tmp/sd/yi-hack/script/watch_motion.sh &
sleep 5
sh /tmp/sd/yi-hack/script/watch_sound.sh &
sleep 5
sh /tmp/sd/yi-hack/script/telegram_control.sh &

The scripts start automatically on boot via lower_half_init.sh.

if watch_sound.sh doesnt start execute this on shell:

ssh root@<camara_ip>
# Actual value
cat /tmp/sd/yi-hack/etc/system.conf | grep RTSP_AUDIO

# If empty, activate
sed -i 's/^RTSP_AUDIO=$/RTSP_AUDIO=pcm/' /tmp/sd/yi-hack/etc/system.conf

# Check it
cat /tmp/sd/yi-hack/etc/system.conf | grep RTSP_AUDIO

๐Ÿ”Š Audio technical details

The camera uses different audio formats per direction:

DirectionFormatPipe
Microphone โ†’ ScriptPCM 16-bit LE, mono, 8000 Hz/tmp/audio_fifo
Script โ†’ SpeakerPCM 16-bit LE, mono, 16000 Hz/tmp/audio_in_fifo

The intercom uses a 30-block circular buffer (~15s of prior audio) to ensure the beginning of sentences is not lost when voice detection triggers.


๐Ÿ“‹ Log files

Each script writes its own log to /tmp/:

tail -f /tmp/telegram_control.log
tail -f /tmp/watch_motion.log
tail -f /tmp/watch_sound.log
tail -f /tmp/intercom.log

Logs are stored in /tmp/ and are lost on reboot.


๐Ÿ“„ Documentation

Full technical documentation is available in yi_telegram_documentation.odt, covering architecture, script internals, audio format discovery, installation steps, and troubleshooting.


โš ๏ธ Disclaimer

Use this software at your own risk.

  • This project is unofficial and is not affiliated with, endorsed by, or supported by Yi Technology Co., Ltd.
  • Installing this software may void your device warranty.
  • This software enables audio and video recording and remote monitoring. You are solely responsible for complying with all applicable laws regarding surveillance and privacy in your jurisdiction, and for obtaining any necessary consent from individuals who may be recorded.
  • You are solely responsible for securing access to your Telegram bot and camera credentials. The authors accept no liability for unauthorised access or data breaches resulting from insecure configuration.
  • The authors accept no liability for any damage, data loss, legal issues, or any other consequence arising from the use of this software.

See the LICENSE file for the full legal text.


๐Ÿ“œ License

This project is licensed under the MIT License โ€” see the LICENSE file for details.

The license includes an additional disclaimer covering device warranty, privacy compliance, security responsibilities, and limitation of liability.


๐Ÿ’ฐ Donation

If you enjoy this project, please consider supporting its maintenance with a donation. Thanks!!

Click here or use the below QR code or push the button to donate via PayPal

QRcode

Donate with PayPal