elad-bar / ha-blueiris

Integration with Blue Iris Video Security Software
184 stars 43 forks source link

Camera cast #15

Closed brafster closed 4 years ago

brafster commented 5 years ago

Hi,

just recently started using you integration and it's really awesome!

Having an issue casting a camera via google home to a chromecast. I get the following message: "It looks like the stream is currently unavailable from the Front Yard". Any ideas?

brafster commented 5 years ago

Just another thing...

I also implemented the cast script. Also doesn't work. It starts the cast process, but all I see on screen is a blue cast icon and nothing further.

mjoshd commented 5 years ago

After much struggle, I was able to get this working today with the cast script! 😁

After using the blueiris.generate_advanced_configurations service to create the configuration templates I had to edit the URLs of the cameras.

I think the problem stems from the fact that with USERNAME:PASSWORD@ at the front as the URL, the URL seems to change after starting the stream; this behavior can be seen by pasting one of the URLs from the generated config into a Chrome tab.. the section at the front disappears when the stream starts.

I was able to combat this by appending the username and password to the end of the url as described below; in this way, the URL is not manipulated and the stream starts instantly, as desired.

In the generated config find the script section and change the URLs using the following format. Replace all sections defined in CAPITAL_LETTERS with info from your environment. From: http://USERNAME:PASSWORD@BLUE_IRIS_IP_ADDRESS:PORT/livestream.htm?cam=CAMERA_SHORT_NAME

To: http://BLUE_IRIS_IP_ADDRESS:PORT/mjpg/CAMERA_SHORT_NAME/video.mjpg?user=USERNAME&pw=PASSWORD

e.g. http://192.168.1.15:81/mjpg/BackYard/video.mjpg?user=hassioViewer&pw=SuperSecretPassword1234

@elad-bar, please consider implementing this format in the blueiris.generate_advanced_configurations service so the streaming options will work for everyone without having to modify the generated configs.

elad-bar commented 5 years ago

Fixed it according to your description, thanks!

elad-bar commented 5 years ago

As for the automatic update, I have plans to merge the new API that will create the component (lists and script) without additional configurations (just setting the server settings)