felipecrs / hass-expose-camera-stream-source

Allows to import Home Assistant cameras into go2rtc and Frigate
MIT License
100 stars 4 forks source link

frigate as seperate server with go2rtc #37

Closed Ostedtinkerer closed 4 months ago

Ostedtinkerer commented 5 months ago

Hi! Great project!

Is this possible to achieve with a frigate instance outside of homeassistant?

I'm running frigate within proxmox as an lxc, with go2rtc.

Frigate and homeassistant does have different local ip's.

felipecrs commented 5 months ago

Yes, you can adapt from When go2rtc is running via docker.

Ostedtinkerer commented 5 months ago

I got that working! Thanks!

I'm now running into a "permission denied" prompt within go2rtc webui. Script is updated according to docs and so are docker. with mapping and env.

do you have a clue?

In configuration.yaml i've set add-on line.

felipecrs commented 5 months ago
chmod +x path/to/script.sh

No?

Ostedtinkerer commented 5 months ago

I have made it executeable.

Sendt fra Outlook til Androidhttps://aka.ms/AAb9ysg


From: Felipe Santos @.> Sent: Wednesday, June 12, 2024 10:13:08 PM To: felipecrs/hass-expose-camera-stream-source @.> Cc: Ostedtinkerer @.>; Author @.> Subject: Re: [felipecrs/hass-expose-camera-stream-source] frigate as seperate server with go2rtc (Issue #37)

chmod +x path/to/script.sh

No?

— Reply to this email directly, view it on GitHubhttps://github.com/felipecrs/hass-expose-camera-stream-source/issues/37#issuecomment-2163819687, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ATQHF4EGCD7IU66O4NWH253ZHCTVJAVCNFSM6AAAAABJG2PAZKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRTHAYTSNRYG4. You are receiving this because you authored the thread.Message ID: @.***>

felipecrs commented 5 months ago

That's what permission denied error usually means. If it didn't work, try:

- echo:/config/get_ha_stream.sh camera.my_camera
+ echo:bash /config/get_ha_stream.sh camera.my_camera
felipecrs commented 5 months ago

Well, try executing the script by yourself. If it's outputting a stream URL, the script and this integration is working fine.

What is the camera's integration?

Ostedtinkerer commented 5 months ago

I will try that tomorrow.

I will let you know. Thanks!

Sendt fra Outlook til Androidhttps://aka.ms/AAb9ysg


From: Felipe Santos @.> Sent: Wednesday, June 12, 2024 10:17:48 PM To: felipecrs/hass-expose-camera-stream-source @.> Cc: Ostedtinkerer @.>; Author @.> Subject: Re: [felipecrs/hass-expose-camera-stream-source] frigate as seperate server with go2rtc (Issue #37)

That's what permission denied error usually means. If it didn't work, try:

— Reply to this email directly, view it on GitHubhttps://github.com/felipecrs/hass-expose-camera-stream-source/issues/37#issuecomment-2163826450, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ATQHF4CUTEBH66C4T4PW2FTZHCUGZAVCNFSM6AAAAABJG2PAZKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRTHAZDMNBVGA. You are receiving this because you authored the thread.Message ID: @.***>

Ostedtinkerer commented 5 months ago

The camera integration is tuya. There official integration. Should i use localtuya?

when i run the script in cmdline i get this result. --- bash ./get_ha_stream.sh

./get_ha_stream.sh: line 2: $'\r': command not found : invalid optionsh: line 3: set: - set: usage: set [-abefhkmnptuvxBCEHPT] [-o option-name] [--] [-] [arg ...] ./get_ha_stream.sh: line 4: $'\r': command not found ./get_ha_stream.sh: line 5: HA_TOKEN: "XXXXXXXXXXXXXX"

it looks like something is wrong with the script. i've copied the script, and changed ha-token, and updated ip. Should there be any other changes?

felipecrs commented 5 months ago

I think you are working on Windows and the line breaks in your script are CRLF, which Linux doesn't understand. Try opening the script in VSCode and replacing the line breaks from CRLF to LF. You can search online about this too.

Ostedtinkerer commented 5 months ago

it is correct that im on windows. I use MobaXterm for ssh access to my frigate machine. Frigate runs a debian12 lxc.

felipecrs commented 5 months ago

As a personal (and off-topic) advice, I find VSCode's Remote SSH feature a lot more useful than MobaXTerm.

Ostedtinkerer commented 5 months ago

I will surely look into that.

I now have managed to delete the errors from before. I can now run script with bash.

What can be the cause of that? Sorry to bother you guys.

felipecrs commented 5 months ago

If you want to write the token in the script, here's how it should be:

- HA_TOKEN="${HA_TOKEN:?"HA_TOKEN is not set, make sure to have this environment variable set with your Home Assisant long-lived token."}"
+ HA_TOKEN='your token contents here'
felipecrs commented 4 months ago

Closing as I don't think there's anything to be done here.