Adding camera picture to push notification

Hi everyone,

I have a camera and would like to send a notification with a picture of a camera. I have a generic camera entity or from my cctv the link in witch I can receive a pic. I have no idea how to do that. Any suggestions?

Thanks

See if this will wok for you. Change the entity in the data section to your camera

[{"id":"eee87d98697d1aa3","type":"inject","z":"f80b6c338afd5483","name":"","props":[{"p":"payload"},{"p":"entity_id","v":"light1","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"on","payloadType":"str","x":1570,"y":360,"wires":[["e3774f41205b8832"]]},{"id":"e3774f41205b8832","type":"api-call-service","z":"f80b6c338afd5483","name":"Notify Phone","server":"6b1110b5.183a4","version":5,"debugenabled":false,"domain":"notify","service":"mobile_app_pixel_3","areaId":[],"deviceId":[],"entityId":[],"data":"{\t   \"title\":\"Title\",\t   \"message\":\"message body\",\t   \"data\":{\t       \"image\": $entities('camera.xvr_mailbox_main').attributes.entity_picture\t   }\t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1770,"y":360,"wires":[["369b3bc42a7cfbd4"]]},{"id":"6b1110b5.183a4","type":"server","name":"Home Assistant","version":4,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":false,"heartbeat":false,"heartbeatInterval":"30","areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m"}]

Unfortunately this did not work. Can I provide anything to help find the problem? Debugging did not give me any information.

Thanks

Then you will need to take a snapshot and save it to your drive

[{"id":"6e1081c0fbaae08c","type":"api-call-service","z":"40e1f8faee5dae4f","name":"Take Snapshot","server":"6b1110b5.183a4","version":5,"debugenabled":false,"domain":"camera","service":"snapshot","areaId":[],"deviceId":[],"entityId":["camera.xvr_mailbox_main"],"data":"{\"filename\":\"/media/camera/mailbox/snap.jpg\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"{\"image\":$entities('camera.xvr_mailbox_main').attributes.entity_picture}","valueType":"jsonata"}],"queue":"none","x":1900,"y":500,"wires":[["42c411f9a99c5f27","32cba6c3a32321cf"]]},{"id":"6b1110b5.183a4","type":"server","name":"Home Assistant","version":4,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":false,"heartbeat":false,"heartbeatInterval":"30","areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m"}]

Then to attach it to a message this need to be added to config.yaml

homeassistant:
  allowlist_external_dirs:
    - '/media'

to attach it to a message

[{"id":"fb49a9086bc1c299","type":"api-call-service","z":"40e1f8faee5dae4f","name":"Notify Phone","server":"6b1110b5.183a4","version":5,"debugenabled":false,"domain":"notify","service":"mobile_app_pixel_3","areaId":[],"deviceId":[],"entityId":[],"data":"{\"title\":\"mailbox - Notification\",\"message\":\"front door\",\"data\":{\"image\":\"/media/local/camera/mailbox/snap.jpg\",\"ttl\":0,\"priority\":\"high\"}}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":2470,"y":500,"wires":[[]]},{"id":"6b1110b5.183a4","type":"server","name":"Home Assistant","version":4,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":false,"heartbeat":false,"heartbeatInterval":"30","areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m"}]