npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@homebridge-eufy-clean/eufy-robovac-nodejs-library

v1.0.0

Published

NodeJS library to control Eufy RoboVac

Downloads

6

Readme

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
  • RoboVac localKey

You can get both pieces of information by using logcat to "sniff" the data on an android phone OR emulator (like BlueStacks. This is known to work on Eufy Home v2.3.2 (click the link to download the apk)

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).
  • Note: You must be the owner of the device, not a shared user

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. Be sure to setup BlueStacks correctly (see #12)

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 build
npm run demo <deviceId> <localKey> <command>

Where command is either "quickTest", "drive" 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 drive command will:

  • Connect to your device
  • Drive it backwards
  • Wait 2 seconds
  • Turn it left
  • Wait 2 seconds
  • Turn it right
  • Wait 2 seconds
  • Drive if forward
  • Wait 2 seconds
  • 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.