Skip to content

Commit

Permalink
Merge pull request #126 from svrooij/beta
Browse files Browse the repository at this point in the history
Beta
  • Loading branch information
svrooij committed Dec 18, 2020
2 parents 27e643a + c2fd6b9 commit 9a9bbe8
Show file tree
Hide file tree
Showing 9 changed files with 702 additions and 612 deletions.
12 changes: 11 additions & 1 deletion .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,17 @@
"contributions": [
"doc"
]
},
{
"login": "dgmltn",
"name": "Doug Melton",
"avatar_url": "https://avatars3.githubusercontent.com/u/698270?v=4",
"profile": "http:https://dgmltn.com",
"contributions": [
"bug"
]
}
],
"contributorsPerLine": 7
"contributorsPerLine": 7,
"skipCi": true
}
30 changes: 20 additions & 10 deletions .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Run tests and publish

on:
workflow_dispatch:
push:
branches:
- master
Expand Down Expand Up @@ -36,23 +37,32 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Set up Docker Buildx
-
name: Set up QEMU (multi platform)
uses: docker/setup-qemu-action@v1
if: steps.semantic.outputs.new_release_published == 'true'
with:
platforms: all
-
name: Set up Docker Buildx
id: buildx
if: steps.semantic.outputs.new_release_published == 'true'
uses: crazy-max/ghaction-docker-buildx@v2
uses: docker/setup-buildx-action@v1
with:
buildx-version: latest
skip-cache: false
qemu-version: latest
- name: Docker login
version: latest
-
name: Login to DockerHub
uses: docker/login-action@v1
if: steps.semantic.outputs.new_release_published == 'true'
run:
docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Publish to docker with buildx as latest
if: steps.semantic.outputs.new_release_published == 'true' && github.ref == 'refs/heads/master'
run: |
docker buildx build \
--platform linux/386,linux/amd64,linux/arm/v7,linux/arm64 \
--platform linux/amd64,linux/arm/v7,linux/arm64 \
--push \
-t $GITHUB_REPOSITORY:latest \
-t $GITHUB_REPOSITORY:${{ steps.semantic.outputs.new_release_version }} \
Expand All @@ -64,7 +74,7 @@ jobs:
if: steps.semantic.outputs.new_release_published == 'true' && github.ref != 'refs/heads/master'
run: |
docker buildx build \
--platform linux/386,linux/amd64,linux/arm/v7,linux/arm64 \
--platform linux/amd64,linux/arm/v7,linux/arm64 \
--push \
-t $GITHUB_REPOSITORY:beta \
-t $GITHUB_REPOSITORY:${{ steps.semantic.outputs.new_release_version }} \
Expand Down
43 changes: 34 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,25 @@
# Sonos2mqtt

[![npm](https://img.shields.io/npm/v/sonos2mqtt.svg?style=flat-square)](https://www.npmjs.com/package/sonos2mqtt)
[![Sonos2mqtt][badge_sonos-mqtt]][link_sonos-mqtt]
[![npm][badge_npm]][link_npm]
[![Sonos api documentation][badge_sonos-docs]][link_sonos-docs]
[![Sonos typescript this library][badge_sonos-typescript]][link_sonos-typescript]
[![Sonos cli][badge_sonos-cli]][link_sonos-cli]
[![Join us on Discord][badge_discord]][link_discord]

[![github issues][badge_issues]][link_issues]
[![docker pulls][badge_docker]][link_docker]
[![Downloads/week](https://img.shields.io/npm/dw/sonos2mqtt.svg?style=flat-square)](https://npmjs.org/package/sonos2mqtt)
[![License](https://img.shields.io/npm/l/sonos2mqtt.svg?style=flat-square)](https://github.com/svrooij/sonos2mqtt/blob/master/package.json)
[![Support me on Github][badge_sponsor]][link_sponsor]

<!-- [![npm](https://img.shields.io/npm/v/sonos2mqtt.svg?style=flat-square)](https://www.npmjs.com/package/sonos2mqtt)
[![docker pulls][badge_docker]][link_docker]
[![Support me on Github][badge_sponsor]][link_sponsor]
[![github issues][badge_issues]][link_issues]
[![Run build and publish][badge_build]][link_build]
[![Run build and publish][badge_build]][link_build] -->
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-5-orange.svg?style=flat-square)](#contributors-)
[![All Contributors](https://img.shields.io/badge/all_contributors-6-orange.svg?style=flat-square)](#contributors-)
<!-- ALL-CONTRIBUTORS-BADGE:END -->
[![mqtt-smarthome](https://img.shields.io/badge/mqtt-smarthome-blue.svg?style=flat-square)](https://github.com/mqtt-smarthome/mqtt-smarthome)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=flat-square)](https://github.com/semantic-release/semantic-release)
Expand Down Expand Up @@ -49,6 +62,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
<td align="center"><a href="https://mi.o-o.im"><img src="https://avatars0.githubusercontent.com/u/7872104?v=4" width="100px;" alt=""/><br /><sub><b>Matthias Burgfried</b></sub></a><br /><a href="https://github.com/svrooij/sonos2mqtt/commits?author=matthias-burgfried" title="Code">💻</a></td>
<td align="center"><a href="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/mqtt-fan"><img src="https://avatars1.githubusercontent.com/u/32242849?v=4" width="100px;" alt=""/><br /><sub><b>mqtt-fan</b></sub></a><br /><a href="https://github.com/svrooij/sonos2mqtt/commits?author=mqtt-fan" title="Code">💻</a></td>
<td align="center"><a href="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/roth"><img src="https://avatars3.githubusercontent.com/u/716931?v=4" width="100px;" alt=""/><br /><sub><b>Martin Roth</b></sub></a><br /><a href="https://github.com/svrooij/sonos2mqtt/commits?author=roth" title="Documentation">📖</a></td>
<td align="center"><a href="http:https://dgmltn.com"><img src="https://avatars3.githubusercontent.com/u/698270?v=4" width="100px;" alt=""/><br /><sub><b>Doug Melton</b></sub></a><br /><a href="https://github.com/svrooij/sonos2mqtt/issues?q=author%3Adgmltn" title="Bug reports">🐛</a></td>
</tr>
</table>

Expand All @@ -59,13 +73,24 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification.
Contributions of any kind welcome!

[badge_sponsor]: https://img.shields.io/badge/Sponsor-on%20Github-red
[badge_issues]: https://img.shields.io/github/issues/svrooij/sonos2mqtt
[badge_docker]: https://img.shields.io/docker/pulls/svrooij/sonos2mqtt
[badge_build]: https://github.com/svrooij/sonos2mqtt/workflows/Run%20tests%20and%20publish/badge.svg
[badge_docker]: https://img.shields.io/docker/pulls/svrooij/sonos2mqtt
[badge_discord]: https://img.shields.io/discord/782374564054564875?style=flat-square
[badge_issues]: https://img.shields.io/github/issues/svrooij/sonos2mqtt?style=flat-square
[badge_npm]: https://img.shields.io/npm/v/sonos2mqtt?style=flat-square
[badge_sonos-cli]: https://img.shields.io/badge/sonos-cli-blue?style=flat-square
[badge_sonos-docs]: https://img.shields.io/badge/sonos-api-blue?style=flat-square
[badge_sonos-mqtt]: https://img.shields.io/badge/sonos-mqtt-blue?style=flat-square
[badge_sonos-typescript]: https://img.shields.io/badge/sonos-typescript-blue?style=flat-square
[badge_sponsor]: https://img.shields.io/badge/Sponsor-on%20Github-red?style=flat-square

[link_sponsor]: https://github.com/sponsors/svrooij
[link_issues]: https://github.com/svrooij/sonos2mqtt/issues
[link_build]: https://github.com/svrooij/sonos2mqtt/actions
[link_discord]: https://discord.gg/VMtG6Ft36J
[link_docker]: https://hub.docker.com/r/svrooij/sonos2mqtt

[link_issues]: https://github.com/svrooij/sonos2mqtt/issues
[link_npm]: https://www.npmjs.com/package/sonos2mqtt
[link_sonos-cli]: https://github.com/svrooij/sonos-cli
[link_sonos-docs]: https://svrooij.io/sonos-api-docs
[link_sonos-mqtt]: https://svrooij.io/sonos2mqtt
[link_sonos-typescript]: https://svrooij.io/node-sonos-ts
[link_sponsor]: https://github.com/sponsors/svrooij
1 change: 1 addition & 0 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
<td align="center"><a href="https://mi.o-o.im"><img src="https://avatars0.githubusercontent.com/u/7872104?v=4" width="100px;" alt=""/><br /><sub><b>Matthias Burgfried</b></sub></a><br /><a href="https://github.com/svrooij/sonos2mqtt/commits?author=matthias-burgfried" title="Code">💻</a></td>
<td align="center"><a href="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/mqtt-fan"><img src="https://avatars1.githubusercontent.com/u/32242849?v=4" width="100px;" alt=""/><br /><sub><b>mqtt-fan</b></sub></a><br /><a href="https://github.com/svrooij/sonos2mqtt/commits?author=mqtt-fan" title="Code">💻</a></td>
<td align="center"><a href="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/roth"><img src="https://avatars3.githubusercontent.com/u/716931?v=4" width="100px;" alt=""/><br /><sub><b>Martin Roth</b></sub></a><br /><a href="https://github.com/svrooij/sonos2mqtt/commits?author=roth" title="Documentation">📖</a></td>
<td align="center"><a href="http:https://dgmltn.com"><img src="https://avatars3.githubusercontent.com/u/698270?v=4" width="100px;" alt=""/><br /><sub><b>Doug Melton</b></sub></a><br /><a href="https://github.com/svrooij/sonos2mqtt/issues?q=author%3Adgmltn" title="Bug reports">🐛</a></td>
</tr>
</table>

Expand Down
55 changes: 37 additions & 18 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,23 @@ permalink: /

# Sonos2mqtt

[![Run build and publish][badge_build]][link_build]
[![Sonos2mqtt][badge_sonos-mqtt]][link_sonos-mqtt]
[![npm][badge_npm]][link_npm]
[![Sonos api documentation][badge_sonos-docs]][link_sonos-docs]
[![Sonos typescript this library][badge_sonos-typescript]][link_sonos-typescript]
[![Sonos cli][badge_sonos-cli]][link_sonos-cli]
[![Join us on Discord][badge_discord]][link_discord]

[![github issues][badge_issues]][link_issues]
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-5-orange.svg?style=flat-square)](#contributors-)
<!-- ALL-CONTRIBUTORS-BADGE:END -->
[![npm](https://img.shields.io/npm/v/sonos2mqtt.svg?style=flat-square)](https://www.npmjs.com/package/sonos2mqtt)
[![docker pulls][badge_docker]][link_docker]
[![mqtt-smarthome](https://img.shields.io/badge/mqtt-smarthome-blue.svg?style=flat-square)](https://github.com/mqtt-smarthome/mqtt-smarthome)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=flat-square)](https://github.com/semantic-release/semantic-release)
[![Downloads/week](https://img.shields.io/npm/dw/sonos2mqtt.svg?style=flat-square)](https://npmjs.org/package/sonos2mqtt)
[![License](https://img.shields.io/npm/l/sonos2mqtt.svg?style=flat-square)](https://github.com/svrooij/sonos2mqtt/blob/master/package.json)
[![Support me on Github][badge_sponsor]][link_sponsor]
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-6-orange.svg?style=flat-square)](#contributors-)
<!-- ALL-CONTRIBUTORS-BADGE:END -->

This node application is a bridge between the Sonos and a mqtt server. The status of all your sonos devices will be published to mqtt and you can control the sonos speakers over mqtt.

This library is in no way connected to [Sonos](//en.wikipedia.org/wiki/Sonos). It's just a library to control their speakers from your mqtt server.

Expand All @@ -43,29 +50,28 @@ This library is in no way connected to [Sonos](//en.wikipedia.org/wiki/Sonos). I

## Sonos library (typescript/node)

This app uses [node-sonos-ts](https://svrooij.github.io/node-sonos-ts) to talk to the sonos speakers. And can easily be integrated in all kind of other apps.
This app uses [node-sonos-ts][link_sonos-typescript] to talk to the sonos speakers. And can easily be integrated in all kind of other apps.

## Text-to-speech server

[sonos-tts-polly](https://github.com/svrooij/node-sonos-tts-polly) is a perfect companion for this library. It will act as a [text-to-speech](https://static.svrooij.nl/node-sonos-ts/sonos-device/notifications-and-tts.html#text-to-speech) server. Generating mp3s for some text and playing it on all your speakers.
[sonos-tts-polly](https://github.com/svrooij/node-sonos-tts-polly) is a perfect companion for this library. It will act as a [text-to-speech](https://svrooij.io/node-sonos-ts/sonos-device/notifications-and-tts.html#text-to-speech) server. Generating mp3s for some text and playing it on all your speakers.

All [sponsors][link_sponsor] get a hosted TTS endpoint, for instant text to speech support.

## Sonos CLI

Not really an mqtt guy/girl? I also created a small [sonos cli](https://github.com/svrooij/sonos-cli) to control your speakers from the command line.
Not really an mqtt guy/girl? I also created a small [sonos cli][link_sonos-cli] to control your speakers from the command line.

```shell
npm i -g @svrooij/sonos-cli
sonos zones --save
sonos control office next
```

## Beer or Coffee

I'm a big fan of beer and coffee. To provide something extra to everybody who is sponsoring me, I'll provide a hosted TTS server for all my sponsors.

This bridge and the [sonos package](https://github.com/svrooij/node-sonos-ts) took me a lot of hours to build, so I invite everyone using it to at least have a look at my [Sponsor page](https://github.com/sponsors/svrooij). Even though the sponsoring tiers are monthly you can also cancel anytime :wink:
This bridge and the [sonos package][link_sonos-typescript] took me a lot of hours to build, so I invite everyone using it to at least have a look at my [Sponsor page][link_sponsor]. Even though the sponsoring tiers are monthly you can also cancel anytime :wink:

## Special thanks

Expand All @@ -85,6 +91,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
<td align="center"><a href="https://mi.o-o.im"><img src="https://avatars0.githubusercontent.com/u/7872104?v=4" width="100px;" alt=""/><br /><sub><b>Matthias Burgfried</b></sub></a><br /><a href="https://github.com/svrooij/sonos2mqtt/commits?author=matthias-burgfried" title="Code">💻</a></td>
<td align="center"><a href="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/mqtt-fan"><img src="https://avatars1.githubusercontent.com/u/32242849?v=4" width="100px;" alt=""/><br /><sub><b>mqtt-fan</b></sub></a><br /><a href="https://github.com/svrooij/sonos2mqtt/commits?author=mqtt-fan" title="Code">💻</a></td>
<td align="center"><a href="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/roth"><img src="https://avatars3.githubusercontent.com/u/716931?v=4" width="100px;" alt=""/><br /><sub><b>Martin Roth</b></sub></a><br /><a href="https://github.com/svrooij/sonos2mqtt/commits?author=roth" title="Documentation">📖</a></td>
<td align="center"><a href="http:https://dgmltn.com"><img src="https://avatars3.githubusercontent.com/u/698270?v=4" width="100px;" alt=""/><br /><sub><b>Doug Melton</b></sub></a><br /><a href="https://github.com/svrooij/sonos2mqtt/issues?q=author%3Adgmltn" title="Bug reports">🐛</a></td>
</tr>
</table>

Expand All @@ -95,12 +102,24 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification.
Contributions of any kind welcome!

[badge_sponsor]: https://img.shields.io/badge/Sponsor-on%20Github-red
[badge_issues]: https://img.shields.io/github/issues/svrooij/sonos2mqtt
[badge_docker]: https://img.shields.io/docker/pulls/svrooij/sonos2mqtt
[badge_build]: https://github.com/svrooij/sonos2mqtt/workflows/Run%20tests%20and%20publish/badge.svg
[badge_docker]: https://img.shields.io/docker/pulls/svrooij/sonos2mqtt
[badge_discord]: https://img.shields.io/discord/782374564054564875?style=flat-square
[badge_issues]: https://img.shields.io/github/issues/svrooij/sonos2mqtt?style=flat-square
[badge_npm]: https://img.shields.io/npm/v/sonos2mqtt?style=flat-square
[badge_sonos-cli]: https://img.shields.io/badge/sonos-cli-blue?style=flat-square
[badge_sonos-docs]: https://img.shields.io/badge/sonos-api-blue?style=flat-square
[badge_sonos-mqtt]: https://img.shields.io/badge/sonos-mqtt-blue?style=flat-square
[badge_sonos-typescript]: https://img.shields.io/badge/sonos-typescript-blue?style=flat-square
[badge_sponsor]: https://img.shields.io/badge/Sponsor-on%20Github-red?style=flat-square

[link_sponsor]: https://github.com/sponsors/svrooij
[link_issues]: https://github.com/svrooij/sonos2mqtt/issues
[link_build]: https://github.com/svrooij/sonos2mqtt/actions
[link_docker]: https://hub.docker.com/r/svrooij/sonos2mqtt
[link_discord]: https://discord.gg/VMtG6Ft36J
[link_docker]: https://hub.docker.com/r/svrooij/sonos2mqtt
[link_issues]: https://github.com/svrooij/sonos2mqtt/issues
[link_npm]: https://www.npmjs.com/package/sonos2mqtt
[link_sonos-cli]: https://github.com/svrooij/sonos-cli
[link_sonos-docs]: https://svrooij.io/sonos-api-docs
[link_sonos-mqtt]: https://svrooij.io/sonos2mqtt
[link_sonos-typescript]: https://svrooij.io/node-sonos-ts
[link_sponsor]: https://github.com/sponsors/svrooij
Loading

0 comments on commit 9a9bbe8

Please sign in to comment.