Giter Site home page Giter Site logo

yi-home_telegram_bot_interface's Introduction

Yi-Home_Telegram_Bot_Interface

Ditch Xiaomi's cloud and use a Telegram bot instead


Features

  • Motion detection

Works by monitoring a tmp file that is created only when the camera detects a motion

  • Get a picture from the camera

Uses the snapshot.sh functionality to get a real time picture

  • Multi camera support

Add as many cameras as you please

  • The bot works in groups and there's a API limit bypass

Multiple bot token can be added to round robin the requests (Telegram bots cannot send many messages per second in a group chat)

  • Text to speech to all cameras

Use the speak.sh functionality to convert text to audio. Supports en-US, en-GB, de-DE, es-ES, fr-FR, it-IT

  • Text to speech to a single camera

Same but limited to a single camera

  • Play any preconfigured sound to all cameras

Play any audio from a specified folder (default: sound/). Use ffmpeg to convert it to the needed format

  • Play any preconfigured sound to a single camera

Same but limited to a single camera

  • Send a voice note and it will play on all cameras

Send a voice message and ffmpeg will convert it and play simultameusly to all cameras

  • Alert if a camera goes offline

No description

  • Alert if a camera goes online

No description

  • Function to enable/disable motion notification

Mute the camera alerts

  • Function to enable/disable the camera while retaining the audio functionalities

Disable video and photo functionalities of the camera

  • Media retention settings

All media are saved into a folder (default: recording/) and will be deleted in X days. Set 0 to delete immediately

  • Multi language

Currently supports IT and EN languages. You can add more by adding a locale file in config/

Note

  • No need for Xiaomi's cloud service (The app is needed only for the first setup)
  • The cameras don't need to connect to the internet so they will work fine in a isolated vlan

If you have a UniFi access point you can add a Wi-Fi network with a custom VLAN else you can simply use a dedicated access point

  • You'll need to install Yi-Hack firmware on the camera and enable FTP and motion recording

https://github.com/TheCrypt0/yi-hack-v4 https://github.com/roleoroleo/yi-hack-MStar https://github.com/roleoroleo/yi-hack-Allwinner https://github.com/roleoroleo/yi-hack-Allwinner-v2

  • For the text to speech functionality you'll need to install the extra nanotts package

https://github.com/roleoroleo/yi-hack-utils

  • A Raspberry/Docker or LXC Container/VM needs to be connected to the isolated network and to a network with internet access

  • There's 2 branches, one with a lot of emojis in the text and one with none

How to use

Edit config/config.py and add your bot api token and the cameras ip address and nickname and then run main.py

Dependencies

ffmpeg and https://github.com/python-telegram-bot/python-telegram-bot

urllib ftplib requests

I'm not sure which one are already packaged with Python 3


yi-home_telegram_bot_interface's People

Contributors

erlipan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.