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 🙏

© 2026 – Pkg Stats / Ryan Hefner

n8n-nodes-roborock

v0.1.3

Published

n8n community node for Roborock robot vacuums via the Roborock app cloud (unofficial API) - start, stop, room cleaning, status, consumables

Readme

n8n-nodes-roborock

n8n community node to control Roborock robot vacuums from your workflows: start and stop cleaning, clean specific rooms, send the robot to the dock, read status, battery and consumables, and run routines.

Roborock has no official public API. This node talks to the same unofficial cloud API the Roborock app uses (the protocol known from projects like python-roborock, ioBroker.roborock and homebridge-roborock-matter). It can break whenever Roborock changes their backend, and it requires your app credentials.

Supported devices

Vacuums using protocol version "1.0" (the vast majority): S4, S5, S5 Max, S6, S6 MaxV, S7, S7 MaxV, S8 family, Q5, Q7 Max, Q8, Q Revo family, Saros, and more. Newer A01 devices (Dyad, Zeo) and B01 devices (2025 Q7 M5/L5, Q10) are not supported yet; the node tells you if your device needs them.

Installation

Self-hosted n8n only (this node uses an MQTT client dependency, so it is not available on n8n Cloud):

Settings > Community Nodes > Install > n8n-nodes-roborock

Credentials

Email and password of your Roborock app account.

Accounts with two-step email verification (most accounts today) cannot log in with just a password. For those, run the one-time helper after installing the package locally:

node scripts/login-roborock.mjs request           # emails you a 6-digit code
node scripts/login-roborock.mjs complete 123456   # saves the session blob

Then paste the contents of ~/.roborock-userdata.json into the credential's "Session Data (JSON)" field. The session is long-lived; password can stay empty.

Logins are aggressively rate-limited by Roborock (about 20 per day). The node caches its session in memory to stay far below that limit, but avoid workflows that would recreate credentials constantly.

Operations

Device

  • Get Many: list all devices in the account (owned and shared)
  • Get Status: state, battery, errors, fan power, water mode
  • Start Cleaning / Pause / Stop Cleaning / Dock
  • Clean Rooms: segment clean of selected rooms, with repeat count. Rooms can be picked from the current map or resolved by name at runtime, which is what you want when the request comes from a webhook or an expression.
  • Get Rooms: room list of the current map with names
  • Set Fan Power / Set Water Flow / Set Mop Route
  • Get Consumables / Reset Consumable
  • Get Clean Summary: lifetime statistics
  • Find My Robot: the robot announces its location
  • Custom Command: send any raw protocol method (e.g. app_zoned_clean, set_led_status, get_network_info) with JSON parameters

Scene

  • Get Many: list the routines configured for a device in the Roborock app
  • Execute: run a routine

Cleaning rooms by name

Segment IDs are local to the map and change whenever the map is rebuilt, so hardcoding them in a workflow is fragile. Set Room Source to By Name and pass a comma-separated list of room names (or segment IDs) instead:

kitchen, Carlos's Office, 22

Names are resolved against the live map on every run. Matching ignores case, accents, apostrophes and separators, because the Roborock cloud stores room names exactly as they were typed in the app and routinely mixes Carlos’s Office (typographic apostrophe), Fernando's Bedroom (straight apostrophe) and Máster Bathroom (accent) in the same home. So carlos-office, Carlos's Office and Carlos’s Office all resolve to the same segment.

A name that matches nothing, or that matches more than one room (master, when the home has both a Máster Bathroom and a Master bedroom), fails the node with the list of available rooms rather than cleaning the wrong room.

How it works

Login against the regional Roborock cloud gets a long-lived session (token plus MQTT credentials). Commands travel over Roborock's cloud MQTT broker as AES-encrypted binary frames, the same way the app controls the robot remotely. Every response is matched to its request; commands time out after 10 seconds if the device is offline.

Development

npm install
npm run build        # tsc + icons
npm run lint
npm test             # room name resolution unit tests, no credentials needed
npm run smoke        # live smoke test, needs ROBOROCK_EMAIL / ROBOROCK_PASSWORD

Disclaimer

This project is not affiliated with or endorsed by Roborock. Use at your own risk.

Author

Built by Carlos Aragon. Need a custom n8n node, an integration with an API that "has no API", or automation consulting? Reach out through carlosaragon.online.

License

MIT