Skip to content

Commit

Permalink
docs: update FAQ and setup
Browse files Browse the repository at this point in the history
  • Loading branch information
duhow committed Dec 22, 2024
1 parent 69226e1 commit f646a63
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 2 deletions.
46 changes: 45 additions & 1 deletion docs/faq.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
# Frequent Asked Questions

Last updated: `2024-01-30`
Last updated: `2024-12-23`

### Can I use Mi Home app with the speaker patch?

No, by using default patching, all Xiaomi software gets removed and replaced with lots of
different software to play audio managed from multiple sources,
such as AirPlay, MPD, UPNP, Squeezelite (LMS), or Snapcast.

You can manage the speaker via SSH, or the web-ui API (still work in progress),
and connect it to Home Assistant to use as a Voice Assistant.

### How can I connect the speaker to a wireless (Wi-Fi) network?

Expand All @@ -17,7 +26,42 @@ The speaker will be in Bluetooth pairing mode for about 45 seconds.

Alternatively, use `/bin/bluetooth_pair` command.

### How can I manage the speaker?

Use your phone or computer and connect to the IP of the speaker to port 80 (as a website).
For example: http://192.168.1.40

### How can I rename the Bluetooth speaker name?

Edit the file `/data/bt/bluez/bluetooth/main.conf`, update the `Name` section.
Then run `/etc/init.d/bluetoothd restart`.

### There are errors when using the voice assistant (listener)

You can modify additional config in `/data/listener` file.

Perform the following checks:
- Check the STT service exists in Home Assistant and is available (query the Home Assistant API for more details).
- Check the STT language provided exists (eg. `en`, `ca-ES`). Value will change depending on the different provider selected.
- You can replace the token with a [long-lived token](https://my.home-assistant.io/redirect/profile/) in your Profile > Security.
- Check logs in `/tmp/stt.*`.

If you still have issues, you may open an issue with details to help troubleshoot it.

### How can I change the root password?

We are using busybox tools, and `passwd` will write a temporal file in a location which is read-only.
Instead, create your hashed password and update the file in `/etc/shadow` with it.

```sh
openssl passwd -5 "your password"
```

> [!NOTE]
> It's recommended that you also copy an `ssh-key` to your speaker to ensure you will remain having access via SSH.
```sh
curl https://github.com/your-user.keys > /root/.ssh/authorized_keys
chmod 600 /root/.ssh/authorized_keys
```

9 changes: 8 additions & 1 deletion docs/voice-assistant.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,14 @@ flowchart TD

## Setup

Create and configure the following files in the speaker:
Connect to the speaker IP at port 80 (HTTP): `http://192.168.1.40`

Follow the web configuration to connect your Speaker to your local Home Assistant installation.

Then configure STT provider, languages and wakeword.

If you want to follow the procedure manually or configure additional details,
create and configure the following files in the speaker:

`/data/listener`
```bash
Expand Down

0 comments on commit f646a63

Please sign in to comment.