Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lukekarrys/arduino-mkr-iot-carrier-sonos
An Arduino MKR IoT Carrier Sonos Controller
https://github.com/lukekarrys/arduino-mkr-iot-carrier-sonos
Last synced: 16 days ago
JSON representation
An Arduino MKR IoT Carrier Sonos Controller
- Host: GitHub
- URL: https://github.com/lukekarrys/arduino-mkr-iot-carrier-sonos
- Owner: lukekarrys
- Created: 2023-04-07T16:43:40.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-05-06T02:30:24.000Z (over 1 year ago)
- Last Synced: 2024-10-20T14:33:25.677Z (17 days ago)
- Language: C++
- Size: 6.94 MB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Arduino MKR IoT Carrier Sonos Controller
## Prereqs:
- Install `arduino-cli`
- Have an instance of my fork of [`node-sonos-http-api`](https://github.com/lukekarrys/node-sonos-http-api) running and accessible
- Have an [Arduino MKR IoT Carrier](https://store-usa.arduino.cc/products/arduino-mkr-iot-carrier) + [Arduino MKR WiFi 1010](https://store-usa.arduino.cc/products/arduino-mkr-wifi-1010)## Steps
1. Install libraries with `./run.sh -c install`
1. Create `Sonos/Secrets.h````cpp
#define WIFI_SSID "WiFi SSID"
#define WIFI_PASSWORD "WiFi Password"
```1. Edit `Sonos/SonosConfig.h`
```cpp
#define SONOS_ROOM "Office"
#define SONOS_SERVER "192.168.4.30"
#define SONOS_PORT 5005
```1. Find board `fqbn` and `port` with `arduino-cli board list`
1. Run `./run.sh -b $FQBN -p $PORT -d ALL`## Features
### Sleep/Wake
The device will go to sleep after `SLEEP`ms (see [Utils.h](./Sonos/Utils.h)) if the player state has not changed.
You can also trigger sleep/wake manually by a `Tap Hold` action on `Button 0`.
### Button Lock
The player buttons will lock (indicated by the controls turning red) after `LOCK`ms (see [Utils.h](./Sonos/Utils.h)) if no commands have been initiated from the player buttons.
You can also trigger lock/unlock manually by a `Tap Hold` action on `Button 4`.
### Player Buttons
#### Button 0
- **Tap**: Previous Track
- **Double Tap**: First Track
- **Hold**: Previous Room#### Button 1
- **Tap**: Volume -1
- **Double Tap**: Volume -5
- **Hold**: Toggle Mute#### Button 2
- **Tap**: Toggle Play/Pause
- **Double Tap**: Toggle Shuffle
- **Hold**: Toggle Repeat All/One/None#### Button 3
- **Tap**: Volume +1
- **Double Tap**: Volume +5
- **Hold**: Toggle Mute#### Button 4
- **Tap**: Next Track
- **Double Tap**:
- **Hold**: Next Room## Demo
https://user-images.githubusercontent.com/542108/236306044-578de611-f258-4daf-8c45-21f37a0cd9cf.mov
## Pics
### Sleep
### WiFi
### Sonos Rooms
### Player