Skip to content

Commit

Permalink
Document MPD streaming
Browse files Browse the repository at this point in the history
  • Loading branch information
mrueg committed Jan 27, 2025
1 parent 0f415c8 commit 338f0d7
Showing 1 changed file with 28 additions and 8 deletions.
36 changes: 28 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,31 +15,33 @@ You can add these to your home assistant installation in the addons store.

### Ingress

We currently use the Home-Assistant ingress to access this addon from within Home-Assistant.
We currently use the Home Assistant ingress to access this addon from within Home-Assistant.
If you need direct access to your Teddycloud, you can activate the ports (8443/https, 80/http) in the config of the addon.
Those are disabled by default to make sure that only users of Home-Assistant can access the Teddycloud UI.
Those are disabled by default to make sure that only users of Home Assistant can access the Teddycloud UI.

### Port 443

Teddycloud exposes the API that the Toniebox accesses on Port 443.
If your Home-Assistant install listens already on this port, or you use a reverse proxy like NGINX, you will need to change those to another port as the Toniebox can only access the API on port 443.
If your Home Assistant install listens already on this port, or you use a reverse proxy like NGINX, you will need to change those to another port as the Toniebox can only access the API on port 443.

### Storage / Backups

Certificates are stored under `/config/teddycloud/certs` and configuration is stored under `/config/teddycloud/config`.
Data is stored under `/data/`.

If you need to extract any of this (e.g. the certificates and keys to add it to your Toniebox), the easiest way is to download it from a backup that Home-Assistant generates for you.
If you need to extract any of this (e.g. the certificates and keys to add it to your Toniebox), the easiest way is to download it from a backup that Home Assistant generates for you.

### MQTT / Home-Assistant Integration
### Home Assistant Integration

#### MQTT / Dashboard

Teddycloud is able to send information about the current state of its connected boxes via MQTT.
Home-Assistant can listen on the MQTT topic and generate resources that you can use to visualize the Toniebox in your Home-Assistant Dashboard.
Home Assistant can listen on the MQTT topic and generate resources that you can use to visualize the Toniebox in your Home Assistant Dashboard.

- Install a [MQTT broker addon](https://github.com/home-assistant/addons/tree/master/mosquitto) in your Home-Assistant install.
- Install a [MQTT broker addon](https://github.com/home-assistant/addons/tree/master/mosquitto) in your Home Assistant install.
- Configure the broker by adding a username and password to the local users.
- Enable MQTT in the Teddycloud settings and provide the URL and port to your MQTT broker, credentials and a topic prefix.
- If the connection is successful, a Teddycloud Server device and a Toniebox device should appear in your Home-Assistant devices list.
- If the connection is successful, a Teddycloud Server device and a Toniebox device should appear in your Home Assistant devices list.

You can now use this to visualize the state of your Toniebox in a dashboard ([Source](https://forum.revvox.de/t/example-ha-dashboard-page-shown-in-37c3-talk/191)).
Make sure to replace the ${TONIEBOX_ID} and the ${TONIEBOX_NAME} with what is in your devices list.
Expand Down Expand Up @@ -82,6 +84,24 @@ Make sure to replace the ${TONIEBOX_ID} and the ${TONIEBOX_NAME} with what is in
name: Enable Cloud Operation
```

#### Music-Assistant / Streaming (experimental)

If you use [Music Assistant](https://www.music-assistant.io/), you can stream audio to your Toniebox with the following approach:

- Install [Music Assistant Addon](https://www.music-assistant.io/).
- Install [MPD Addon](https://github.com/Poeschl-HomeAssistant-Addons/mpd).
- Configure MPD Addon and enable HTTPD output.
- Check if mpd shows up as a media_player device.
- Associate the MPD media player within Music Assistant using the HomeAssistant MediaPlayer provider.
- In the Teddycloud UI, select the Tonie that should connect the Toniebox to the Stream.
- Set the Source to the MPD stream and save the change.
- Play audio in Music Assistant and select MPD as the output.
- The Toniebox now should play the selected audio.

Caveat:

There might still be issues when skipping tracks and/or if the connection gets lost.

## About TeddyCloud

[TeddyCloud](https://github.com/toniebox-reverse-engineering/teddycloud) is an alternative server for your Toniebox, allowing you to host the
Expand Down

0 comments on commit 338f0d7

Please sign in to comment.