giuseppecastaldo / ha-addons

Home Assistant Whatsapp Add-on
Apache License 2.0
49 stars 18 forks source link

How to send video file? #18

Closed chinedu40 closed 1 year ago

chinedu40 commented 1 year ago

What is the code necessary to send a video (mp4) file?

giuseppecastaldo commented 1 year ago

What is the code necessary to send a video (mp4) file?

View documentation. It is necessary to specify video file url.

chinedu40 commented 1 year ago

I did this:

service: whatsapp.send_message data: clientId: default to: XXXXXXXXX@s.whatsapp.net body: video: url: snapshots/snapshots_camera.camera.mp4

Upon receiving the message the play button is there but you are not able to play the video.

giuseppecastaldo commented 1 year ago

I did this:

service: whatsapp.send_message

data:

clientId: default

to: XXXXXXXXX@s.whatsapp.net

body:

video:

  url: snapshots/snapshots_camera.camera.mp4

Upon receiving the message the play button is there but you are not able to play the video.

Url must be public, try to move your file in www/ folder and access from https:///local/..

chinedu40 commented 1 year ago

Same thing happens when i change it to url: http://XXX.XXX.XX.XX:8123/local/tmp/filename.mp4

Then video sends, but when you click play there is no video shown.

giuseppecastaldo commented 1 year ago

Same thing happens when i change it to url: http://XXX.XXX.XX.XX:8123/local/tmp/filename.mp4

Then video sends, but when you click play there is no video shown.

Is this url accessible from external network?

chinedu40 commented 1 year ago

Sorry I think this was my error.

I was using the home assistant camera record service. I had to uncheck the box that is titled Lookback. After that it works as described.