Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@homebridge-plugins/homebridge-sharkiq

Package Overview
Dependencies
Maintainers
3
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@homebridge-plugins/homebridge-sharkiq

A Homebridge plugin to connect your Shark Vacuum to homebridge.

latest
Source
npmnpm
Version
1.5.0
Version published
Weekly downloads
103
-32.68%
Maintainers
3
Weekly downloads
 
Created
Source

Homebridge Shark Clean Vacuum Plugin

verified-by-homebridge npm npm

A Homebridge plugin for SharkIQ vacuums.

Contributions are always welcome. I used the sharkiq python module as a reference for creating the javascript wrapper to control SharkIQ Vacuums.

This plugin has only been tested on the UR250BEXUS model.

The fastest way to get community support (not for bugs) is to join the Homebridge Discord server and chat in the #sharkiq channel.

Install and Setup

Step 1.

Run npm install -g @homebridge-plugins/homebridge-sharkiq

Step 2.

Configure Homebridge. The config file for SharkIQ should include:

{
  "platforms": [
    {
      "name": "SharkIQ",
      "platform": "SharkIQ",
      "oAuthCode": "[Optional. Use for manually obtaining credentials]",
      "vacuums": [
        "[Shark Vacuum DSN]",
        "..."
      ],
      "europe": false,
      "invertDockedStatus": false,
      "dockedUpdateInterval": 30000
    }
  ]
}

The Vacuums array is a list of your vacuum's device serial numbers (DSN). If you only have one vacuum, just include the one's DSN. The DSN(s) can be found in the SharkClean mobile app.

If you would like to manually obtain your Shark Clean credentials, you can use an OAuth code. Refer to the OAuth Code Login Method section.

The Vacuums array is a list of your vacuum's device serial numbers (DSN). If you only have one vacuum, just include the one's DSN. The DSN(s) can be found in the SharkClean mobile app.

If you are in Europe or the UK, set the europe config value to true. SharkClean has separate servers for the U.S. and Europe. The default value is false, which connects to the U.S. server.

The default interval between updating the docked status is 30 seconds (30000 ms). To change the docked status interval, add dockedUpdateInterval to your config. Value is in milliseconds. If the interval is too low, you have the risk of your account being rate limited.

Features

  • Be able to turn on and off the vacuum
  • Set the power mode of the vacuum and change it while running
  • Sensor for if the vacuum is docked or not
    • The sensor will display as "opened" when the vacuum is docked and "closed" when the vacuum is not docked
    • Set invertDockedStatus to true to display as "closed" when the vacuum is docked and "opened" when the vacuum is not docked
  • Pause switch for pausing the vacuum while it's running

Matter and HomeKit Integration

This plugin supports both classic HomeKit Accessory Protocol (HAP) and Homebridge Matter.

Matter Implementation

  • HAP mode: Uses SharkIQPlatform and SharkIQAccessory.
  • Matter mode: Uses SharkIQMatterPlatform when Homebridge Matter is available and enabled.

If Matter is unavailable or disabled, the plugin automatically falls back to HAP mode.

Device Mapping

ModeHomebridge ClassHAP Service(s)Matter DeviceTypeMatter Clusters
HAPSharkIQPlatform / SharkIQAccessoryFanv2, ContactSensor, SwitchN/AN/A
MatterSharkIQMatterPlatform(HAP not registered in Matter path)RoboticVacuumCleanerrvcRunMode, rvcOperationalState

Matter References

OAuth Code Login Method

The OAuth Code value is for creating and storing the login for the plugin. Here is how to sign in with this method.

The easiest method is to use the Homebridge UI OAuth Assistant in this plugin's Settings tab:

  • Open the plugin UI in Homebridge.
  • Go to Settings -> OAuth Assistant.
  • Click Generate Login URL.
  • Open the URL, sign in, then paste the callback URL (or code) back into the assistant.
  • Click Exchange Code and restart Homebridge.

Manual method (if needed):

  • Run Homebridge with the latest plugin version.
  • Open the Homebridge logs
  • Open the URL in the console printed by homebridge-sharkiq. Safari will not work due to the way Safari handles the results of the login
  • Before you login, open up developer tools in your browser (inspect element), and navigate to the network tab
  • Enter your login info, and press continue
  • Open the request with the uri of /authorize/resume that shows up and view the headers
  • Search com.sharkninja.shark in the headers
  • Copy the code in between code= and &. for example in com.sharkninja.shark://login.sharkninja.com/ios/com.sharkninja.shark/callback?code=abcdefghijkl&state=, abcdefghijkl is the code that needs to be copied
  • Open your Homebridge configuration, and paste the code value in the OAuth Code config option
  • Restart Homebridge

Notes

Contributions would be very helpful to help this Homebridge plugin stay maintained and up to date. If you have any problems, please create an issue.

Keywords

homebridge-plugin

FAQs

Package last updated on 05 May 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts