Giter Site home page Giter Site logo

yi-hack-mqtt's Introduction

yi-hack-mqtt

This projects adds a MQTT subscriber and publisher for motion detection to the yi-hack-v3 project.

Requirements

You need a camera with the yi-hack-v3 firmware.

You have to enable Motion Detection / Alarms for the camera via the Yi App: Stopping the motion detection just kills some processes on the camera and won't change the settings in the App. Starting the motion detection again will just "revive" the killed processes.

Setup

  • Login to your camera via telnet/ssh. The username should be root and the password isn't set by default.
  • Move into the home directory: cd /home/yi-hack-v3
  • Download & untar the project: wget https://github.com/fbrinker/yi-hack-mqtt/releases/download/1/yi-hack-mqtt.tar && tar -xvf yi-hack-mqtt.tar && rm yi-hack-mqtt.tar && cd mqtt
  • Edit the mqtt.conf and add your MQTT broker ip and login credentials: vi mqtt.conf
  • Remember: To save & close vi, press ESC and enter :wq and press Return/Enter
  • Run the install script ./install.sh
  • Reboot the camera reboot

Usage

  • The camera will publish MQTT messages to the topic /home/camera/*hostname*/motion/state (default) with the value 1 if motion is detected and 0 if the recording stopped again.
  • You can publish start to the topic /home/camera/*hostname*/motion/control (default) to start the motion detection and stop to stop it.

So you can react to state changes (Alarms) via software like Home Assistant and it's MQTT sensors. This will also allow you to activate the motion detection if you leave the house and to deactivate it if you are back home.

Thanks

Special thanks to dvv for the compiled mosquitto binaries.

yi-hack-mqtt's People

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.