Giter Site home page Giter Site logo

eufy-robovac's Introduction

eufy-robovac

NodeJS library to control Eufy RoboVac. This library relies heavily on TuyAPI for communicating with the RoboVac and would not be possible without the eufy_robovac repo by mitchellrj as reference.

Required Information

  • RoboVac Device Id OR IP address of RoboVac
  • RoboVac localKey

You can get both pieces of information by using logcat to "sniff" the data on an android phone OR emulator.

More detailed steps on using logcat:

  1. Close the app on your mobile device
  2. Connect the device to your laptop and enable USB debugging
  3. Run adb logcat -e 'tuya.m.my.group.device.list' (assumes you have already installed the Android debug tools)
  4. Launch the Eufy Home app
  5. The output lines contain JSON, you're looking for the values of localKey (16 character hex string) and devId (20 character hex string).

HUGE THANKS to mitchellrj for figuring this out!

I had to use adb shell logcat -e 'tuya.m.my.group.device.list' on my Mac running BlueStacks emulator to get it to work but your mileage may vary. You may also not need to run BlueStacks but it was the easiest method for me. I installed the EufyHome into the emulator and logged in and was able to grab my id/key.

Demo

To test out if this library can talk to your RoboVac follow the steps below:

git clone [email protected]:joshstrange/eufy-robovac.git
cd eufy-robovac
npm install
npm run demo <deviceId | ipAddress> <localKey> <command>

Where command is either "quickTest" or "status". The quickTest command will:

  • Connect to your device
  • Print out the current statuses
  • Start cleaning
  • Wait 10 seconds
  • Pause cleaning
  • Wait 1 second
  • Send device home
  • Wait 1 second
  • Disconnect & exit

The status command will simply print out the current statues and exit.

NOTE: There is a decent amount of console.logs scattered around for debugging purposes that I haven't cleaned up yet so it might be a little... louder than you want

I'm open to pull requests and I hope to use this library to implement a HomeBridge plugin in the near future. If you have any questions open an issue and I'll try my best to help.

I have published this on npm:

npm install --save eufy-robovac

I will try to keep the npm package updated. Also the type definitions for TypeScript are included.

Development

This library is written in TypeScript. You should just need to run npm run build after making changes in the src/ directory.

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.