Notification volume level in Node red

Hello
I trying to figure out how to change the volume level for notifications in Node Red.
I know you can do something like this in Home Assistant…
action:
service: notify.mobile_app_<your_device_id_here>
data:
message: “command_volume_level”
title: 20
data:
channel: notification_stream

But how can I do this in node red?

Are you trying to control the volume on your mobile device, if so how are you doing this currently in HA?

You will do it exactly the same way with the call service node. All it does, it make the service call within HA. However, you need to translate your yaml to json. I recommend an online tool for this:

I haven’t had success yet and I have not tried it in home assistant directly. I am assuming it can be done because of this…

The first thing I notice from the document, is that volume control is only available on Android. I’m not able to test this as I have an iPhone, but I’d try the following in the Data section of the service node in NR:

{
    "service": "notify.mobile_app_<your_device_id_here>",
    "data": {
        "message": "command_volume_level",
        "title": 20,
        "data": {
            "channel": "notification_stream"
        }
    }
}

Thanks for this link!

So, I’ve tried and I cannot get it to turn on the volume. When I send the notification - nothing happens.

What does the debug node say?

It’s just exactly what was in the data line.

{“message”:“command_ringer_mode”,“title”:“normal”}

Sorry should have been clearer… What does your payload object in the debug node contain, as an example…

Screen Shot 2020-11-16 at 3.46.13 PM

Can you provide a screen shot per the above.

I actually got it working. The problem was the app never asked for permission like it was supposed to. I went in to “special access” and gave the home assistant app the notification access and now it works. I can adjust the volume and change the ringer mode to silent or vibrate or whatever.
Thanks

Good to hear that!

Any ideas what I’m doing wrong here? Debug is just returning a number, but my phone isn’t doing anything. When I set the service to “notify,” I literally just get a notification on the phone.

In the companion app settings, click on your server. There is a box that need to be checked to control the phone that way.