Ios actionable notification via node-red (solved)

Im not sure if this is the right spot but maybe someone can help, please!

Im trying to get IOS actionable notifications working the new way. Im able to get them working in the developer tools tab but its not coming over the node-red side so very well.

When going through node-red i get the notification on phone with title, message, image, critical etc BUT i cant get any buttons to show up. When i tap on the notification a popup comes and goes “loading actions” but no buttons . When use developer tab in yaml it works on phone as intended.

using the call service node with notify.mobile_app_myphone, i get the notification but no actions. Any ideas? thanks!!

{
    "title": "title",
    "message": "ok",
    "data": {
        "actions": {
            "action": "DISARM",
            "title": "DISARM"
        }
    }
}

Use what you did in the dev tools and use a yaml to json converter

https://www.convertjson.com/yaml-to-json.htm

3 Likes

Thanks Kermit! solved! that fixes my issue.

My internal yaml to json skills are rather lacking :joy:

Any way you can post what you used that worked?

sensorName = flow.get('sensorName');
msg.payload = 

{
   "data": {
      "message": sensorName,
      "title": "Disarm Alarm",
      "data": {
         "actions": [
            {
               "action": "DISARM",
               "title": "Silence Alarm",
               "icon": "sfsymbols:bell.slash"
            },
            {
               "action": "WOOF",
               "title": "Release the hounds",
               "icon": "sfsymbols:flame"
            },
            
         ],
         "push": {
            "sound": {
               "name": "default",
               "critical": 1,
               "volume": 1
            }
         }
      }
   }
};



return msg;

2 Likes