Set Pixel 5 ringer mode to Silent, not DND

My Pixel 5’s three ringer modes match exactly what is in the Ringer Mode table in the docs: Normal, Silent, Vibrate. But the ringer mode command value of silent doesn’t trigger silent mode, it triggers DND.

Is there really no way to simply put my device in the real Silent mode? I have an automation that toggles my ringer mode when I join a Zoom. I want to suppress vibrations, which buzz my desk and are picked up by my desktop conference speaker. But I still want my notifications.

I’ve tried sending ringer-mode: vibrate, followed immediately by volume-level: 0. But frustratingly, when you send volume level 0, it turns vibrate back on. Even though manually turning it down to 0 on the phone itself leaves vibrate off.

Conversely, if I send volume level: 0 first, then follow with ringer-mode: normal, that bumps volume back up.

Am I missing something? Thanks.

can you share a sample of your automation?

edit: The app is indeed setting ringer mode to silent when used

Sure…

I’m using Node-Red. When my Mac’s mic sensor flips to on (signaling that I’ve joined a Zoom call), I send the following:

{
    "message": "command_ringer_mode",
    "data": {
        "command": "silent",
        "data": {
            "priority": "high",
            "ttl": "0"
        }
    }
}

Then, when the mic goes back off, I send:

{
    "message": "command_ringer_mode",
    "data": {
        "command": "vibrate",
        "data": {
            "priority": "high",
            "ttl": "0"
        }
    }
}

Works perfectly, except the silent command doesn’t actually map to the Silent ringer mode, it maps to DND mode, just like the docs say it does:

I don’t understand why it doesn’t map to the actual Android ringer mode of Silent.

just a fyi but priority and ttl should be nested in the same data element alongside command

If you look up above at the highlight code block it is indeed setting the ringer mode to silent

https://developer.android.com/reference/android/media/AudioManager#RINGER_MODE_SILENT

this is the actual API used

https://developer.android.com/reference/android/media/AudioManager#setRingerMode(int)

priority and ttl: good callout, thanks for that. I only added that a few minutes ago and hadn’t really tested.

as for ringer mode…i’m confused. Both the code and Android API docs indeed seem to be referencing the real silent mode, which has nothing to do with DND. And yet, not only do the Companion docs explicitly say that sending silent will in fact enable DND, but that’s actually what is happening on my device.

On the phone itself, if I click the volume rocker, I can toggle the ringer mode between Normal (bell icon), Silent (crossed-out bell icon), and Vibrate:

But I can’t seem to replicate this with the companion app. It’s either Normal, Vibrate, or DND.

Apologies if I’m missing something obvious. Cheers.

Does the state of the ringer mode sensor match and update when you send the command?

Yeah it appears to indeed go to a state of silent. But I suppose that’s expected, since there’s only 3 possible states and it couldn’t possibly be either normal or vibrate.

So I guess the issue is that the Android API goes a step further and also enables DND? Because it doesn’t appear as if the companion app is trying to do that.

Is this just a quirk of the API?

This is expected behavior per Google

https://issuetracker.google.com/issues/237819541#comment5

Looking online we may be able to mute the speakers but not sure if it works on all devices

https://stackoverflow.com/a/59953990

Edit: The method above would be on a per stream basis not sure how viable that is

Argh, yeah I feared that was the case. I found a similar thread here:

I just tried setting ringer mode to silent and then setting DND to off. But that turns vibrate back on. So frustrating. All I want is to disable vibrate for short periods of time, not suppress all my notifications.

Hopefully the Google devs will listen to the community on this one.

Thanks for the replies. Cheers.

1 Like

@dshokouhi Thought I’d circle back and provide an update here. Turns out there’s a (kinda hacky) way to toggle between vibrate and silent modes, without (ultimately) enabling DND…

I was looking into whether Tasker could invoke true silent mode, since it works locally, and found this blog post: Tasker Silent Mode on Pixel 5 | Wunter8 Dev

Not only did this guy have the exact same use case as I, but he seemed to have solved the very same problem. I replicated his Tasker action and sure enough, it works! And just like him, I have no idea why it does. I went back into Node-Red to see if I could make it work there, as well. If I send:

{
    "message": "command_dnd",
    "data": {
        "command": "alarms_only"
    }
}

then…

{
    "message": "command_dnd",
    "data": {
        "command": "priority_only"
    }
}

then wait 50ms…
then…

{
    "message": "command_dnd",
    "data": {
        "command": "off"
    }
}

…my Pixel indeed winds up in true silent mode. And then I can just send the vibrate command to undo it. So interesting how this works and I can’t imagine how that guy even figured it out. Because if I skip the priority and timeout, it doesn’t work. It only seems to happen in this very specific sequence.

I think I’m going to stick with Tasker so I can also use the NFC trigger, just like the author. That’s brilliant. But good to know there’s a way to do this in either platform.

Cheers.

2 Likes