Repository navigation
Installation
Simply go to the 'Plugins' page, search Shark and install the @homebridge-plugins/homebridge-sharkiq plugin.
This will only work if you are using a platform which installs plugins globally.
sudo npm i -g @homebridge-plugins/homebridge-sharkiqThe plugin settings screen in the Homebridge UI includes an OAuth Assistant which signs you in to SharkNinja without needing to put your password in the config. It works like this:
- If your SharkNinja account is registered in Europe, set the EU region option first and save.
- Open the plugin settings and find the OAuth Assistant card.
- Click Generate Login URL and copy the URL it produces.
- Open that URL in a browser on a computer — not on a phone or tablet that has the SharkClean app installed. If the SharkClean app is present it will grab the final step of the login, show a "Linking Error" about Alexa, and use up the one-time code — the exchange will then fail with an HTTP 403 error.
- Sign in with your SharkNinja account and click Accept.
- The browser will then fail to open the final page — this is expected, because the final address is an app-only link starting with
com.sharkninja.shark://. Copy that full address from the browser's address bar. - Paste the copied address (or just the
codevalue from it) into the Callback URL or OAuth Code box and click Exchange Code straight away — the code only lasts a few minutes and can only be used once. - If the exchange fails, click Generate Login URL again and repeat from step 4 with the new URL. Each generated URL and its code belong together as a pair, so an old login tab will not work after generating a new URL.
Once the exchange succeeds, restart Homebridge and the plugin will stay signed in from then on.
Some browsers throw the address away instead of displaying it. Safari does this, so step 6 above will not work there.
There is a way that works in every browser. The final step is an ordinary redirect, and the code sits in that redirect's response — you just need the browser's Network tab to read it.
Safari
- Safari → Settings → Advanced → tick Show features for web developers.
- Press ⌥⌘I to open the Web Inspector, and click the Network tab.
- Turn on Preserve Log, so the entries survive the failed navigation.
- Paste a freshly generated login URL into the address bar and sign in.
- Click Accept. Safari will show a "cannot open the page" error — that is expected.
- In the Network tab, find the last entry from
login.sharkninja.comwith status 302. - Click it → Headers → under Response, find Location. It reads
com.sharkninja.shark://...?code=...&state=.... - Copy that value into Callback URL or OAuth Code and click Exchange Code straight away.
If the Headers view is awkward, the Response tab of that same entry shows the same address as plain text, starting "Found. Redirecting to".
Chrome or Edge: the same method works — F12 → Network → tick Preserve log → find the last login.sharkninja.com entry with status 302 → Headers → Location.
Firefox: usually simpler, as it tends to leave the address it could not open in the address bar. If it does not, its Network tab works the same way.
See the Configuration page for JSON configuration templates and other optional settings if editing the configuration manually.
And voila, your Shark IQ robots should be added to your Homebridge instance.
Setup
Help/About