Notification IOS companion with picture dynamic path

Hi,

recently added plex is installed I have this is sensor state:

I want to notify companion on IOS with title and picture with node-red

I can’t get the image notification to work

all result of state_Changed:

{"payload":"Online","data":{"entity_id":"sensor.plex_recently_added_movies","old_state":{"entity_id":"sensor.plex_recently_added_movies","state":"Online","attributes":{"data":[{"title_default":"$title","line1_default":"$episode","line2_default":"$release","line3_default":"$number - $rating - $runtime","line4_default":"$genres","icon":"mdi:eye-off"},{"airdate":"2024-03-17T10:21:56Z","aired":"2024-02-14","release":"$day, $date $time","flag":true,"title":"Madame Web","episode":"","runtime":117,"studio":"Columbia Pictures","genres":"Action, Adventure","rating":"★ 1.2","poster":"/local/upcoming-media-card-images/plex/Plex_Recently_Added_Movies/p389.jpg","fanart":"/local/upcoming-media-card-images/plex/Plex_Recently_Added_Movies/f389.jpg"}],"friendly_name":"Plex Recently Added Movies"},"context":{"id":"01HSP9KEADP1EC7GBB0EJF6S0K","parent_id":null,"user_id":null},"last_changed":"2024-03-23T18:36:37.581Z","last_updated":"2024-03-23T18:36:37.581Z","timeSinceChangedMs":2655030},"new_state":{"entity_id":"sensor.plex_recently_added_movies","state":"Online","attributes":{"data":[{"title_default":"$title","line1_default":"$episode","line2_default":"$release","line3_default":"$number - $rating - $runtime","line4_default":"$genres","icon":"mdi:eye-off"},{"airdate":"2024-03-17T10:21:56Z","aired":"2024-02-14","release":"$day, $date $time","flag":true,"title":"Madame Web","episode":"","runtime":117,"studio":"Columbia Pictures","genres":"Action, Adventure","rating":"★ 1.2","poster":"/local/upcoming-media-card-images/plex/Plex_Recently_Added_Movies/p389.jpg","fanart":"/local/upcoming-media-card-images/plex/Plex_Recently_Added_Movies/f389.jpg"}],"friendly_name":"Plex Recently Added Movies"},"context":{"id":"01HSP9KEADP1EC7GBB0EJF6S0K","parent_id":null,"user_id":null},"last_changed":"2024-03-23T18:36:37.581Z","last_updated":"2024-03-23T18:36:37.581Z","timeSinceChangedMs":2655030}},"topic":"sensor.plex_recently_added_movies","_msgid":"eb54dcc5bf93473a"}

and the config node notify to ios:

{
    "title": "🍿 New Movie",
    "message": "{{{data.new_state.attributes.data[1].title}}}",
    "data": {
        "attachement": {
            "url": "{{{data.new_state.attributes.data[1].poster}}}",
            "content-type": "jpg",
            "hide-thumbnail": false
        }
    }
}

thank for your help :slight_smile:

is the file in www? If you use the direct path and not use a variable does it work?

Is work.

the problem is the url path is necesarry to add www and add this repository on configuratoin.yaml:

homeassistant:
  allowlist_external_dirs:
    - /config/www

and the flow node-red:

[{"id":"7e23155b79f3cb5a","type":"server-state-changed","z":"49ca914ab16c9173","name":"New movies","server":"f45f852d.f4e938","version":5,"outputs":1,"exposeAsEntityConfig":"","entityId":"sensor.plex_recently_added_movies","entityIdType":"exact","outputInitially":false,"stateType":"str","ifState":"","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":false,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":110,"y":80,"wires":[["8135885ab172e2d2","9cbcfb4306feab8f"]]},{"id":"8135885ab172e2d2","type":"api-call-service","z":"49ca914ab16c9173","name":"Groupe iPhone parent","server":"f45f852d.f4e938","version":5,"debugenabled":false,"domain":"notify","service":"mobiles_parents","areaId":[],"deviceId":[],"entityId":[],"data":"{\"title\":\"🍿 Nouveau films ajouter\",\"message\":\"{{{data.new_state.attributes.data.1.title}}}\",\"data\":{\"image\":\"{{{data.new_state.attributes.data.1.poster}}}\"}}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":340,"y":60,"wires":[[]]},{"id":"083506cd5af2edcf","type":"api-call-service","z":"49ca914ab16c9173","name":"matrix notification -> whatsapp","server":"f45f852d.f4e938","version":5,"debugenabled":false,"domain":"notify","service":"matrix_notify_test","areaId":[],"deviceId":[],"entityId":[],"data":"{\"message\":\"Nouveau film : {{{data.new_state.attributes.data.1.title}}}\",\"target\":\"!SpZZ:matrix.domain.org\",\"data\":{\"images\":[\"{{{data.new_state.attributes.data.1.poster}}}\"]}}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":750,"y":120,"wires":[[]]},{"id":"9cbcfb4306feab8f","type":"change","z":"49ca914ab16c9173","name":"change url local to /config/www/ for poster","rules":[{"t":"change","p":"data.new_state.attributes.data.1.poster","pt":"msg","from":"/local","fromt":"str","to":"/config/www","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":410,"y":120,"wires":[["083506cd5af2edcf"]]},{"id":"373badbf2657f678","type":"server-state-changed","z":"49ca914ab16c9173","name":"New TV","server":"f45f852d.f4e938","version":5,"outputs":1,"exposeAsEntityConfig":"","entityId":"sensor.plex_recently_added_tv","entityIdType":"exact","outputInitially":false,"stateType":"str","ifState":"","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":false,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":90,"y":260,"wires":[["5dee7a1bdc309cdc","aaac5fbe16d6d5a1"]]},{"id":"5dee7a1bdc309cdc","type":"api-call-service","z":"49ca914ab16c9173","name":"Groupe iPhone parent","server":"f45f852d.f4e938","version":5,"debugenabled":false,"domain":"notify","service":"mobiles_parents","areaId":[],"deviceId":[],"entityId":[],"data":"{\"title\":\"🍿 Nouvelles  épisodes ajouter\",\"message\":\"{{{data.new_state.attributes.data.1.title}}}\",\"data\":{\"image\":\"{{{data.new_state.attributes.data.1.poster}}}\"}}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":340,"y":240,"wires":[[]]},{"id":"01657a12d0bf4411","type":"api-call-service","z":"49ca914ab16c9173","name":"matrix notification -> whatsapp","server":"f45f852d.f4e938","version":5,"debugenabled":false,"domain":"notify","service":"matrix_notify_test","areaId":[],"deviceId":[],"entityId":[],"data":"{\"message\":\"Nouvel épisode ajouté : {{{data.new_state.attributes.data.1.title}}}\",\"target\":\"!SdPxRpZZ:matrix.domain.org\",\"data\":{\"images\":[\"{{{data.new_state.attributes.data.1.poster}}}\"]}}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":890,"y":280,"wires":[[]]},{"id":"aaac5fbe16d6d5a1","type":"change","z":"49ca914ab16c9173","name":"change url local to /config/www/ for poster","rules":[{"t":"change","p":"data.new_state.attributes.data.1.poster","pt":"msg","from":"/local","fromt":"str","to":"/config/www","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":390,"y":280,"wires":[["11d07decd8f9c384"]]},{"id":"11d07decd8f9c384","type":"change","z":"49ca914ab16c9173","name":"change title","rules":[{"t":"set","p":"data.new_state.attributes.data.1.title","pt":"msg","to":"$split(data.new_state.attributes.data[1].title, \":\")[0] & \": \" & data.new_state.attributes.data[1].episode\t","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":650,"y":280,"wires":[["01657a12d0bf4411"]]},{"id":"f45f852d.f4e938","type":"server","name":"Home Assistant","version":5,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":"30","areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m","enableGlobalContextStore":true}]```