Giter Club home page Giter Club logo

eufy-security-proxy's Introduction

Eufy Security API Proxy

This proxy build from ground up without official API documentation from Eufy Security camera. The proxy has a very limited implementation and the main focus is to get the video stream from the Eufy Security camera it self.

The documentation provided how to access the RTSP stream from local devices but it's limited to recording duration and we can't activate the devices without triggering the motion sensors. Getting continuous stream url is possible using Eufy Security app and from Web Dashboard.

In that scenario, using this API Proxy allows us to activate the camera remotely and get the RTMP stream url from the list of devices that we registered. Again, as I mentioned in the beginning the implementation is very limited. Feel free to improve this project and make a PR. :-)

Running in Development

Clone this repository and run:

npm install

Before we run the project, create one .env file in the root of the project and configure this value:

API_HOST=<eufy api url>
API_USERNAME=<your eufy login email>
API_PASSWORD=<your eufy password>

To run this project in the development:

npm run dev

The development server will run at http://localhost:3000

Testing Endpoints

Get Device List

curl -L -X GET http://localhost:3000/devices

Example response:

[{"device_id":0123456789,"device_name":"C1","device_model":"T8113","device_sn":"***","station_sn":"***","main_hw_version":"eufy2_mini","main_sw_version":"1.6.7","sec_hw_version":"P0","sec_sw_version":"1.0.70-20200706","wifi_mac":"AA:BB:CC:DD:EE:FF"},{"device_id":0123456789,"device_name":"C2","device_model":"T8113","device_sn":"***","station_sn":"***","main_hw_version":"eufy2_mini","main_sw_version":"1.6.7","sec_hw_version":"P0","sec_sw_version":"1.0.70-20200706","wifi_mac":"AA:BB:CC:DD:EE:FF"}]

Get Stream URL

curl -L -X POST 'http://localhost:3000/stream/start' -H 'Content-Type: application/json' -d '{ "device_id": 0123456789, "device_sn": "***", "station_sn": "***" }'

Example response:

{"url":"rtmp://p2p-vir-6.eufylife.com/hls/*****?time=*****&token=*****"}

Stop Stream

curl -L -X POST 'http://localhost:3000/stream/stop' -H 'Content-Type: application/json' -d '{ "device_id": 0123456789, "device_sn": "***", "station_sn": "***" }'

Example response:

{"message":"OK"}

eufy-security-proxy's People

Contributors

dependabot[bot] avatar feedsbrain avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

spencerbutler

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.