Double-click Home, rotate your wrist; volume goes up and down! Leave control-mode by pressing Back.
See it in action here (twitter video).
Ok cool 🍦, follow these steps:
- Node.js.
- Tizen Studio.
- Create an integration on Sonos, or make changes in the code to change volume on devices that are not Sonos.
-
Clone this repository.
-
Copy
src/config.template.ts
tosrc/config.ts
and make changes to thesonosClientId
andsonosClientSecret
properties. -
Bootstrap a Sonos API token:
# *nix in pwsh shell, or Win in PowerShell shell: ./tools/Set-BootstrappedSonosApiToken.ps1 -ClientId <client id from config.ts> -ClientSecret <client secret from config.ts>
-
You may think: "Why do I need to do all this?": I didn't bother implementing a OAuth2 authentication flow on the Gear - or in a companion app on Android). Instead, you run the initial access-token generation, and then let the app run it inside your watch for consecutive refreshes. Never do that in the real world! Your server should be creating and refreshing tokens on behalf of your users - do not share your integration secrets with devices that are not completely in your control.
-
-
Run
npm install
andnpm run build
in the project folder. -
Load the
./tizenproject
project in Tizen Studio and run it on your watch.- Configure your Watch and Tizen to receive and run your app, by following these steps. Don't forget to configure Tizen to sign your app.
- You can also run
npm run build-dev
to get source maps and easier debugging.
-
Configure double-press of the Home button to open this app.
- Press the Back button to stop controlling the volume.
Feel free to open an issue against this repository and/or create a pull request. If feature requests are quick and easy to implement, I might add them when I find the time 😊.