New-ish app for pebble smartwatch

Hey, not sure how big the number of pebble users is still, but with the techy aspects of HA being quite obvious, I wouldnt be surprised if there were still quite a few people keeping their pebble alive as well :slight_smile:

Anyway, I yesterday accidently discovered that there is a rather new app available via the rebble app store. Contrary to the other (old) apps it actually works, and doesn’t require legacy API access. Anyway, here it is:

It’s pretty simple at this point in time (e.g. the sensor list for me is completely unusable as some of my integrations create dozens of sensors), but a quick light switching or script triggering it’s working fine.

One thing that supposedly works, but for which I don’t have the HA setup to go with yet: “newer” pebble watches had built-in microphones, and the app seems to support that in combination with HA. Pretty amazing, as it completely circumvents the whole “how good does a mic need to be to cover a whole room” challenge.

Is there anyone in here who is already working with the app and has the microphone working with the new HA voice stuff?

that’s it, just an FYI :slight_smile:

p.s.: I have no connection to the person(s) who built the app, I’m just happy it exists

4 Likes

Hi there,
I did install it and connect successfully. I am missing some documentation somehow as all my sensors, lights etc are empty. Any advice?

And my microphone works it recognized my speech but never takes an action.
Need to dive deeper into this.

For the microphone to work you need the rebble subscription, there is unfortunately no way to send the recorded voice locally (within your own network) directly to HA for processing.

I mostly use it with scripts, that is the most reliable option for me from playing around with it a bit.

Self-Hosted Speech-to-Text for Pebble Watches with Home Assistant

Just wanted to share that it’s now possible to use your self-hosted Speech-to-Text service with Pebble watches! I recently added support for integrating with wyoming-whisper instances (which I already use with Home Assistant).

How It Works

I contributed to rebble-asr by adding support for wyoming-whisper (my PR was accepted and merged). Wyoming-whisper is a speech recognition service that works with Home Assistant’s Wyoming protocol. This means you can now use the same STT service for both Home Assistant and your Pebble watch!

Requirements:

  • A web server within your network with a valid SSL certificate (easily set up with Let’s Encrypt)
  • The rebble-asr service running on that server

Setting Up:

  1. Host rebble-asr somewhere on your network
  2. Log in to the Rebble website
  3. Go to your account page
  4. Scroll to “Experimental Features for Developers”
  5. Click “I know what I am doing”
  6. Enter the custom JSON configuration (see below)
  7. Visit boot.rebble.io on your phone to apply the new settings

Configuration Example:

{
    "config": {
        "voice": {
            "languages": [
                {
                    "endpoint": "stt.example.com",
                    "six_char_locale": "eng-USA",
                    "four_char_locale": "en_US"
                }
            ],
            "first_party_uuids": [
                "XXXX"
            ]
        }
    }
}

Replace stt.example.com with your actual STT server address. The full configuration supports many languages - you can add multiple language entries to the JSON as needed.

New Home Assistant App for Pebble

I’m also working on a new Home Assistant app for Pebble watches:

With full support for Assist pipelines! :slight_smile:

It’s not on the app store yet, but you can download the pbw files from the GitHub Actions tab and sideload them. I have a few more things to iron out before publishing to the rebble app store. More details are available in the Pebble Discord thread: Discord

Even though I’m self-hosting the STT service, I still pay for Rebble services because they’re awesome and deserve the support!

3 Likes

To further explain:

The rebble-asr fork I mentioned above has support to do STT internally without wyoming-whisper or third party APIs. By default if the selected method fails it falls back to doing it this way. So if you want to self host but don’t want to run wyoming-whisper you can do that as well. Many options depending on what you want to do.

The new pebble watches shipping later this year will most likely do STT on the phone itself so this is more of a fix for legacy watches. My 9 year old Pebble Time is still going strong!

1 Like

Absolutely amazing, guess it’s time to setup the voice pipeline in HA again (after disappointing results with the atom echo a while ago). But one button push instead of relying on wake words makes this so much more interesting!

1 Like

One detail question: this is for the server running rebble-asr itself, i got that. If I configure a separate local wyoming server within the rebble-asr config (using “WYOMING_HOST=your_wyoming_host”), do you know if that server URL/address in turn also needs to be behind ssl? I’m trying to piece this all together at the moment, and would like to use the STT (actually: STP) service running as an addon within my HA instance, but so far I never bothered to setup https for my HA instance/server overall.

And additionally: i wasnt able to figure out how to use lets encrypt for a purely internal/LAN server. Do you have a go-to resource that explains things a bit by any chance? Thanks in advance for sharing :slight_smile:

If I configure a separate local wyoming server within the rebble-asr config (using “WYOMING_HOST=your_wyoming_host”), do you know if that server URL/address in turn also needs to be behind ssl?

Communication between rebble-asr and Wyoming is just like between Home Assistant and Wyoming - it doesn’t require SSL to work properly. The SSL requirement only applies when your phone communicates with the rebble-asr server using the endpoint you configured in the JSON.

And additionally: i wasnt able to figure out how to use lets encrypt for a purely internal/LAN server. Do you have a go-to resource that explains things a bit by any chance? Thanks in advance for sharing :slight_smile:

For my setup, I use a real public-facing address which allows me to obtain a legitimate SSL certificate. If you want to keep everything local-only (and use a VPN when away from home), you’d likely need to work with self-signed certificates and configure your phone to trust them. I chose to avoid that complexity by using a public endpoint.

My specific setup uses Cloudflare and their tunnel service. I run the cloudflared docker container which handles all traffic to my internal services. I have a domain with a wildcard DNS entry (something like *.random.example.net) that directs traffic to my letsencrypt docker container. This approach makes the service harder to discover, as I use something like pebble-stt.random.example.net for the rebble-asr endpoint. Someone would need to guess this specific hostname to find my instance - it’s not true security, but it does add a layer of obscurity. My letsencrypt docker container is configured to use Cloudflare as the DNS provider, which allows me to generate a wildcard SSL certificate for *.random.example.net, making it easy to add site-conf files to NGINX for exposing services under this wildcard.

For local resolution, my network uses Pi-hole as DNS, and Pi-hole is configured to locally resolve all requests to my example.net domain. This ensures that if my internet connection goes down, requests still reach my letsencrypt docker container because I have *.random.example.net set to point directly to the container’s LAN IP. When I’m away from home, requests route through Cloudflare to reach the public endpoint.

I should mention - not to dissuade you from setting this up yourself, but for others reading who might prefer a simpler solution - that Rebble offers a subscription for $6/month that includes their ASR service. Even though I self-host, I still pay for Rebble because they’re doing amazing work keeping these watches functional. Plus, the subscription gives you faster timeline sync, which is helpful if you automate timeline pins (by the way, I created node-red-pebble-timeline (node) - Node-RED to facilitate this).

I plan to do a more in-depth write up on my website about how to handle all of this and will share that here when I get around to it. I hope that answers all of your questions though.

1 Like

Okay, so here is how that played out for me when setting everything up:

What works:

  • I can voice-control my HA instance from my Pebble Time, completely local, re-using the speech-to-phrase addon on my HA instance
  • speech-to-phrase in the end from a technical side works like a less-capable speech-to-text service, so from a wyoming perspective it doesn’t make a difference if I use STT or STP via rebble-asr. ( @synesthesiam, just as feedback: the name “speech-to-phrase” initially made me believe that STP and STT work completely differently, especially from how they are used by other services. Took me a moment to figure out how it actually is :slight_smile: )
  • I had never used docker before, but despite the steap learning curve it was also just fun to figure things out step by step :slight_smile:

What doesn’t (fully) work:

  • the old Pebble app on my Android phone (Samsung S24, Android14) out of the box doesn’t use the local/manual DNS settings of my WiFi to resolve to the local IP which I added as a manual entry to PiHole. For now I have to use an extra app (PCAPdroid) that forces the traffic of the Pebble app through its local VPN, which as a side effect enforces the use of the Pihole DNS server. Very annoying overhead. Probably related to a network library used by the Pebble app, which prefers a Google DNS server over the manual DNS setting. Oh, and “Private DNS” needs to be switched off on the phone.

What kind of works:

  • SSL for rebble-asr by “reusing” the certificate of a public domain of mine, but without automatic certificate updates (see details further down)

My approach/setup:

the nginx.conf

user nginx;
worker_processes auto;

events {}

http {
include mime.types;
default_type application/octet-stream;

sendfile        on;
keepalive_timeout  65;

error_log  /var/log/nginx/error_log;
access_log  /var/log/nginx/access.log;

server {
    listen 443 ssl;
    server_name www.myexampledomain.com;
  
    ssl_certificate /etc/apache/ssl.crt/cert.pem;
    ssl_certificate_key /etc/apache/ssl.key/key.pem;
    ssl_protocols TLSv1.2 TLSv1.3;
    ssl_ciphers HIGH:!aNULL:!MD5;

    location / {
	    proxy_http_version 1.1;
	    proxy_cache_bypass $http_upgrade;
	    proxy_set_header Upgrade $http_upgrade;
	    proxy_set_header Connection $http_connection;
	    proxy_set_header Host $http_host;
	    proxy_set_header Authorization "";      

	    proxy_pass http://192.168.1.28:9999; <= replace with IP of your docker host
    }
}

}

The .env file for rebble-asr

ASR_API_PROVIDER=wyoming-whisper
WYOMING_HOST=192.168.1.13 <= replace with ip of your HA instance
WYOMING_PORT=10300

the JSON for rebble.io

{
“config”: {
“voice”: {
“languages”: [
{
“endpoint”: “www.myexampledomain.com”,
“six_char_locale”: “eng-GBR”,
“four_char_locale”: “en_GB”
}
],
“first_party_uuids”: [
“”
]
}
}
}

How I got the SSL certificate working:
My domain hoster uses LetsEncrypt for SSL, and shows the content of the cert.pem and key.pem files in the admin area. I copypasted that into the respective files on the docker host, those are the ones I’m using in the nginx.conf.
The problem with that approach: the certificate on the local nginx will not automatically get updated, so I’ll have to copy the content over every few months until I have figured out something easier.

Also needed: manually exposing the wyoming port of the speech-to-phrase addon in HA.

So once the docker containers are running, and the VPN app on my phone is started, and the ASR setting in rebble is rerouted to the local service, this is how it works for me:

Open points aka ideas to work around the certificate and dns problems:

  1. set the public A record for an unused (sub)domain to a local IP (192.168.1…)
    => even when the local DNS is ignored, the public one would still return the correct local IP. When someone for whatever reason calls that subdomain from outside my LAN it will not work, or point to a local server running in their LAN. Doesn’t bother me.
  2. automatically pull the certificate files to avoid the need for manual copypasting
1 Like

this sounds great, but my raspberry is busy with HA OS… I wonder if you could create an add-on for HAOS for the point 1 of the setting up.

You mean rebble-asr? I think i saw a discussion about that somewhere, i don’t think that works or makes sense. You can only define a URL of an endpoint for rebble-asr in the pebble app config, and that has to be behind ssl. As you cannot define the port separately, my guess is that it has to run on the default 443 port, which i THINK then has a high chance to mess with the setups of people who already run HA via ssl. Cleaner/easier is via a separate raspi, or mini-server

a bit confused here… my HA has ssl and is reachable on port 8123, and every container can be easily configured to respond to any wanted port. Buying another raspberry just for this seems expensive and overkill as the entire HAOS needs just a fraction of a raspberry5 power

This is a limitation of Pebble smart watches. They will only connect to ASR running on port 443 with a valid SSL certificate. It would be nice if it let you change the port since it basically just takes a URL string but any attempt to use a port other than 443 fails.

Supposedly the new Pebble app will support ASR on device (on the Phone) and should theoretically support older watches so honestly there isn’t much need for an HA addon since that will solve the issue and require zero setup.

That will make things easier indeed. I’d still love the option to reroute to a custom ASR, as I’m a big fan of the straightforwardness of how speech-to-phrase does recognition for non-standard-wording.