Skip to content

Commit

Permalink
Merge pull request #17 from codybrom/main
Browse files Browse the repository at this point in the history
Update outdated packages for better compatibility with node 20
  • Loading branch information
ryanolf committed Jan 14, 2024
2 parents 33342c7 + 54ce6fd commit 0ed2cdf
Show file tree
Hide file tree
Showing 5 changed files with 4,066 additions and 11,721 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules/
/coverage
/coverage
usersettings.json
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ $ npm install

For simplicity, [sonos-http-api](https://github.com/jishi/node-sonos-http-api), needed for this program to work, is included as a dependency, though you don't need to use it if you already have an http api running elsewhere.

If you _DO_ want to use the included Sonos HTTP API, you'll need to configure it. Rename the `usersettings.json.example` to `usersettings.json` and edit it to your liking. You'll need to set the `spotify` and/or `apple` sections to your credentials. You can also set the `http` section to your liking. The defaults should work fine for most people.

## Run all the time

To run continuously and at boot, you'll want to run under some supervisor program. There are lots of options, like systemd (built-in already), supervisord, and pm2. I have found pm2, recommended by the author of Vinyl Emulator, to be very easy to use. To have pm2 spin-up sonos_nfc at boot and keep it
Expand Down Expand Up @@ -103,7 +105,7 @@ e.g.
$ sudo env PATH=$PATH:/usr/bin /usr/lib/node_modules/pm2/bin/pm2 startup systemd -u pi --hp /home/pi
```

If you already have the http API running elsewhere, you can direct this program to that server via the `usersettings.json` and instead run just this program via `npm start`, so replace the `pm2 start` command above with
If you already have the http API running elsewhere, you can direct this program to that server via the `usersettings.json` (rename it from .example and update to how you would like to use) and instead run just this program via `npm start`, so replace the `pm2 start` command above with

```
$ pm2 start npm -- start
Expand Down
Loading

0 comments on commit 0ed2cdf

Please sign in to comment.