AlexxIT / WebRTC

Home Assistant custom component for real-time viewing of almost any camera stream using WebRTC and other technologies.
https://github.com/AlexxIT/Blog
MIT License
1.54k stars 181 forks source link

Telegram bot action: Send photo - Can't send file with kwargs #764

Closed tOOmki closed 4 weeks ago

tOOmki commented 1 month ago

I try to send a screenshot using the Telegram bot action: Send photo. Every time in the HA logs I have:

Can't send file with kwargs: {'authentication': 'digest', 'parse_mode': 'html', 'url': 'http://192.168.1.228:1984/api/frame.jpeg?src=camera.garaz_brama_profile000_mainstream'}
Can't send file with kwargs: {'url': 'http://192.168.1.228:1984/api/frame.jpeg?src=camera.garaz_brama_profile000_mainstream'}
Can't send file with kwargs: {'url': 'http://192.168.1.228:1984/api/frame.jpeg?src=camera.garaz_brama_profile000_mainstream', 'authentication': 'bearer_token'}

I tried frame.mp4 and frame.jpeg - no difference.

Camera Reolink E1 Pro

AlexxIT commented 1 month ago

Are you sure you has this camera in the go2rtc config?

tOOmki commented 1 month ago

obraz The first link is onwif integration, but it doesn't support url.

The generated links work in the browser, but not when sending via Telegram.

AlexxIT commented 1 month ago

Maybe your Hass can't get this url, but your browser can

tOOmki commented 1 month ago

Camera preview in the tab works.

AlexxIT commented 1 month ago

Don't understand what you mean

tOOmki commented 1 month ago

I mean that the camera preview works on the tab. What did you mean: "Hass can't get this url"?

AlexxIT commented 1 month ago

Perhaps Hass can't get this URL: http://192.168.1.228:1984/api/frame.jpeg?src=camera.garaz_brama_profile000_mainstream. Or you are writing the service call incorrectly.

tOOmki commented 4 weeks ago

Onwif integration helped. Sending a photo directly to Telegram doesn't work either. That's why I save the snapshot to disk and then send it.