I want to attach a video in a message. I use this code to create a video when the front door opens and the alarm is on.
- service: camera.record
target:
entity_id: "camera.grovkok"
data:
filename: '/media/cctv_grovkok/video.mp4'
duration: 30
That works perfect and I get a video then I trigger it. Then I use this code to send the video to my android phone. I have a delay so the video will stored.
- delay:
seconds: 59
- service: notify.mobile_app_pixel_6_pro
data:
message: Någon kom in
data:
url: "/lovelace/camera"
priority: high
video: '/media/local/cctv_grovkok/video.mp4'
I get the message but no video. If I convert the video on the internet and put I back in the same folder and trigger the automation I get the video in the message. Whats the problem? Can anyone help me?
2 Likes
what format are you converting it to?
sounds like HA core is not making the format android friendly, do you see any errors in the companion app logs?
04-10 18:22:55.647 10826 10826 D MessagingService: Found 0 frames for video notification
04-10 18:22:55.650 10826 10826 D MessagingService: Show notification with tag "null" and id "1811561647"
@dshokouhi
thats your issue, the format is not valid for the app as it cannot find a frame. When you converted the video did you leave it in teh same folder?
I get that error when I try to send a video that has been created in home assistant with the code above. Then I use the file (same video) that I have converted from mp4 to mp4 the logg says this.
04-10 18:47:57.030 10826 10826 D MessagingService: Found 19 frames for video notification
04-10 18:47:57.064 10826 10826 D MessagingService: Show notification with tag "null" and id "1812946270"
And the video is attached with the message.
The video is in the same folder in both case.
@dshokouhi
can you please file a bug in the android repo detailing everything here please?
please make sure to add back the issue template with all requested information