Skip to content

Commit

Permalink
Merge pull request #206 from svrooij/feature/certificates
Browse files Browse the repository at this point in the history
Feature/certificates
  • Loading branch information
svrooij committed Mar 30, 2024
2 parents 351fe5d + 9cebf38 commit 4a91208
Show file tree
Hide file tree
Showing 17 changed files with 809 additions and 723 deletions.
54 changes: 54 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
name: Bug report
about: Create a report to help us fix something unexpected from happening.
title: 'BUG: '
labels: bug
assignees: 'svrooij'

---

### What happened

<!--Add a brief description what happend-->

### What did you expect to happen

<!--Add a brief description what you expected to happen-->

### How to reproduce it (minimal and precise)

<!--Add executed example or minimal code to reproduce-->

1. Step 1
2. ...

<!-- or -->

```js

```

### Debug logging

<!--
You can get a lot of logging when you set the loglevel to debug.
Paste the logs in the code block (if applicable)
-->

```plain
```

### Environment

- sonos2mqtt version:
- OS:
- node version (`node -v`):

### Checklist

Please confirm the following before creating the issue.

- [ ] Environment specified
- [ ] Checked [issues](https://github.com/svrooij/sonos2mqtt/issues?q=is%3Aissue) for duplicates
- [ ] Debug log added
11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
blank_issues_enabled: false
contact_links:
- name: Questions
url: https://github.com/svrooij/sonos2mqtt/discussions/categories/q-a
about: For quick answers to your questions check out our community.
- name: Documentation
url: https://sonos2mqtt.svrooij.io
about: There is a lot of documentation available, make sure to check it out.
- name: Sonos library
url: https://github.com/svrooij/node-sonos-ts
about: Sonos2mqtt is just a mqtt wrapper around sonos-ts, documentation might overlap.
24 changes: 24 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: Feature request
about: Suggest an idea for sonos2mqtt
title: ''
labels: feature request
assignees: 'svrooij'

---

## Is your feature request related to a problem? Please describe

<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->

## Describe the solution you'd like

<!-- A clear and concise description of what you want to happen. -->

## Describe alternatives you've considered

<!-- A clear and concise description of any alternative solutions or features you've considered. -->

## Additional context

<!-- Add any other context or screenshots about the feature request here. -->
26 changes: 13 additions & 13 deletions .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: [16, 18]
node: [18, 20]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- name: Install depencencies
Expand All @@ -56,16 +56,16 @@ jobs:
released: ${{ steps.semantic.outputs.new_release_published }}
version: ${{ steps.semantic.outputs.new_release_version }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16
node-version: 20
- name: Install depencencies
run: npm ci
- name: Build library
run: npm run build
- name: Semantic Release
uses: cycjimmy/semantic-release-action@v3
uses: cycjimmy/semantic-release-action@v4
id: semantic
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -74,7 +74,7 @@ jobs:
if: steps.semantic.outputs.new_release_published == 'true'
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 20
registry-url: 'https://npm.pkg.github.com'
scope: 'svrooij'
- name: Publish To GitHub Package Registry
Expand All @@ -92,31 +92,31 @@ jobs:
needs: [npm-release]
if: needs.npm-release.outputs.released == 'true'
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

-
name: Set up QEMU (multi platform)
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
with:
platforms: all

-
name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
with:
version: latest

-
name: Login to DockerHub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

-
name: Login to GitHub Container Registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
FROM node:16-alpine3.15 as build
FROM node:lts-alpine as build
WORKDIR /usr/src/app
COPY package*.json tsconfig.json ./
RUN npm ci
COPY ./src ./src
RUN npm run build

FROM node:16-alpine3.15 as prod
FROM node:lts-alpine as prod
ARG BUILD_DATE=unknown
ARG BUILD_VERSION=0.0.0-development
ARG VCS_REF=not-set
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.npm
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# COPY ./src ./src
# RUN npm run build

FROM node:16-alpine3.15 as prod
FROM node:lts-alpine as prod
ENV SONOS2MQTT_RUNNING_IN_CONTAINER=true
WORKDIR /usr/src/app

Expand Down
13 changes: 4 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
[![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]
Expand All @@ -31,7 +30,7 @@ Check out the other bridges in the [software list](https://github.com/mqtt-smart

## Documentation

See: [https://svrooij.github.io/sonos2mqtt](https://svrooij.github.io/sonos2mqtt)
See: [https://sonos2mqtt.svrooij.io/](https://sonos2mqtt.svrooij.io)

## Node-sonos-ts

Expand Down Expand Up @@ -80,10 +79,8 @@ 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_build]: https://github.com/svrooij/sonos2mqtt/workflows/Run%20tests%20and%20release%20npm%20package/badge.svg
[badge_contrib]: https://img.shields.io/github/all-contributors/svrooij/sonos2mqtt?style=for-the-badge
[badge_docker]: https://img.shields.io/docker/pulls/svrooij/sonos2mqtt?style=for-the-badge
[badge_discord]: https://img.shields.io/discord/782374564054564875?style=for-the-badge
[badge_issues]: https://img.shields.io/github/issues/svrooij/sonos2mqtt?style=for-the-badge
[badge_npm]: https://img.shields.io/npm/v/sonos2mqtt?style=for-the-badge
[badge_sonos-cli]: https://img.shields.io/badge/sonos-cli-blue?style=for-the-badge
Expand All @@ -93,13 +90,11 @@ Contributions of any kind welcome!
[badge_sponsor]: https://img.shields.io/github/sponsors/svrooij?style=for-the-badge&logo=github


[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_sonos-docs]: https://sonos.svrooij.io/
[link_sonos-mqtt]: https://sonos2mqtt.svrooij.io/
[link_sonos-typescript]: https://sonos-ts.svrooij.io/
[link_sponsor]: https://github.com/sponsors/svrooij
4 changes: 4 additions & 0 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ services:
- SONOS2MQTT_DEVICE=192.168.50.4 # Service discovery doesn't work very well inside docker, so start with one device.
- SONOS2MQTT_MQTT=mqtt:https://emqx:1883 # EMQX is a nice mqtt broker
# - SONOS2MQTT_DISTINCT=true # if your want distinct topics
# - SONOS2MQTT_MQTT_CA_PATH=/path/to/ca.crt # If you use a self-signed certificate
# - SONOS2MQTT_MQTT_CERT_PATH=/path/to/cert.crt # If you want a secure connection
# - SONOS2MQTT_MQTT_KEY_PATH=/path/to/key.key # If you want a secure connection
# - SONOS2MQTT_MQTT_REJECT_UNAUTHORIZED=true # If you use official signed certificates
- SONOS_LISTENER_HOST=192.168.50.44 # Docker host IP
- SONOS_TTS_ENDPOINT=http:https://sonos-tts:5601/api/generate # If you deployed the TTS with the same docker-compose
depends_on:
Expand Down
9 changes: 3 additions & 6 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ permalink: /
[![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]
Expand Down Expand Up @@ -108,7 +107,6 @@ Contributions of any kind welcome!

[badge_contrib]: https://img.shields.io/github/all-contributors/svrooij/sonos2mqtt?style=for-the-badge
[badge_docker]: https://img.shields.io/docker/pulls/svrooij/sonos2mqtt?style=for-the-badge&logo=docker
[badge_discord]: https://img.shields.io/discord/782374564054564875?style=for-the-badge&logo=discord
[badge_issues]: https://img.shields.io/github/issues/svrooij/sonos2mqtt?style=for-the-badge&logo=github
[badge_npm]: https://img.shields.io/npm/v/sonos2mqtt?style=for-the-badge
[badge_sonos-cli]: https://img.shields.io/badge/sonos-cli-blue?style=for-the-badge&logo=sonos
Expand All @@ -117,12 +115,11 @@ Contributions of any kind welcome!
[badge_sonos-typescript]: https://img.shields.io/badge/sonos-typescript-blue?style=for-the-badge&logo=sonos
[badge_sponsor]: https://img.shields.io/github/sponsors/svrooij?style=for-the-badge&logo=github

[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_sonos-docs]: https://sonos.svrooij.io/
[link_sonos-mqtt]: https://sonos2mqtt.svrooij.io/
[link_sonos-typescript]: https://sonos-ts.svrooij.io/
[link_sponsor]: https://github.com/sponsors/svrooij
Loading

0 comments on commit 4a91208

Please sign in to comment.