Aggressive Notification with Sound on Android not working?

Hello all,

I am currently trying to get my water sensor to trigger an alarm on my phone. I do receive a push notification, but there is no real “alarm”.

I am using the HA app with an Android phone.

I have set the configuration for the notification in the same way as in the documentation. However, only a push notification appears and no real alarm. I want my phone to ring aggressively even in silent mode.

service: notify.mobile_app_sm_g980f
data:
  message: Wasser Sensor Küche ausgelöst
  title: "Warning: Water leak"
  data:
    ttl: 0
    priority: high
    channel: alarm_stream

Is this no longer correct, or must be different?

the only thing, I found, that could make it more aggressive is this:

service: notify.mobile_app_sm_g980f
data:
  message: Wasser Sensor Küche ausgelöst
  title: "Warning: Water leak"
  data:
    ttl: 0
    priority: high
    channel: alarm_stream_max

you could also use TTS, then it will talk out of your pocket

service: notify.mobile_app_sm_g980f
data:
  title: "Wasser Sensor Küche ausgelöst"
  message: TTS
  data:
    ttl: 0
    priority: high
    channel: alarm_stream_max

according to the manual on GitHub there is also an alternative way to write this code, talking about beta users. It may be, that the documentation is out of date and that method has become standard now?

Have a look here:

Thank you, exactly the docs I had read before.

i have found out so far that without alarm stream i get a vibration and a ringing like a message.

with alarm_stream it becomes just the ringing like a message and with alarm_stream_max it is the alarm clock alarm.

But none of this bypasses silent mode. when my phone is set to vibration only, nothing comes.
Also it is just a ring, not an alarm over 30sec or something like this.

So I just tested this on my mobile, with volume up, with volume max down, with vibration only, with do not disturb mode. In all these possible settings it works fine. The settings are ignored and sound is coming thru.
With text message and also with TTS message.

So the code from that manual seems to be valid.
I’m testing on OnePlus 6T device with Android 11

TTS is not working at all.

alarm_stream → alarm till i stop it, not working when in vibration only mode
alarm_stream_max → just a ring, also not working in vibration mode
beta_settings - > not working at all

I’m using a Samsung Galaxy 2020 with Android 12.

If you check your notification channels in your app, does it create new channels?
For me, it does, so maybe the channels got different names in the german OS.

Also Max seems to be less aggressiv then without max

I see your are using a Samsung device. Not all those device support this feature, Samsung deliberately changed that to prevent sound. Nothing the app can do unfortunately.

1 Like

You could try in your notification automation to first set the volume to max and then send the alarm notification.

2 Likes

Make sure TTS is installed on the device and you can play the sample sound in device settings. Also make sure Google speech services is up to date and the default engine.

Only works for TTS and not normal notification.

1 Like

How is that done?

I tried the same settings on a xiaomi with android 11
this one is only vibrating.

So it seems there is no one to get the same result on all phones

Go to your device settings and check text to speech and make sure the sample can play, if not then make sure Google Speech services is installed and the default. May also need to download a language if not already done.

For your device, no it doesn’t seem like the manufacturer allows it. You’ll need to use a workaround to take your device out of silent/ do not disturb and then place it back once done.

2 Likes

Thank you, i found a workaround

action:
  - service: notify.mobile_app_sm_g980f
    data:
      message: command_volume_level
      title: "90"
      data:
        channel: ring_stream
  - service: notify.mobile_app_sm_g980f
    data:
      message: Help
      title: Help
      data:
        ttl: 0
        priority: high
        channel: alarm_stream

This will push the vol up before the notification. Seems to work for Galaxy 20.
Is there a way to change the actual sound? Right know it seems to be my alarm sound.
But in the HA App itself i only can pick short sounds.

1 Like

it defaults to your default alarm ring tone and anything else you change the channel to

Maybe i just don’t understand your awnswer.
But in the app it only allows me to change to a notification sound, not to an alarm sound.
Or is there a different way to change the channel sound?

changing the channel sound is an android thing, some devices may let you upload a different sound but thats up to the device and out of control of the app. Its an android setting.

I wish I had thought of that…

:neutral_face:

1 Like