Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi cam support #14

Open
wants to merge 51 commits into
base: main
Choose a base branch
from
Open

Multi cam support #14

wants to merge 51 commits into from

Conversation

neerdoc
Copy link

@neerdoc neerdoc commented Nov 26, 2024

Hello!

I've made an attempt at adding support for multiple cameras as per #9. It required me to restructure the code somewhat, especially for handling the messages from the eufy-ws-security add-on in one place and sending each packet from the camera to the correct output stream.

It is not possible to add a port range for an Add-on, so I had to add a lot of ports. Right now, I've added 45 ports which is enough for 15 cameras (someone had 11...).

Configuration is done by identifying each camera by its serial number. Unknown camera are listed in the log so it's easy to find the serial numbers.

Caveats:
Eufy cameras rely on P2P streaming. While "easy" to implement, it requires a lot of bandwidth and processing power, i.e., it does not scale well. Each new consumer requires another stream. As an example, my setup uses a Raspberry Pi 4 as the Home Assistant hardware and I have a single Eufy HomeBase 3 and 5 cameras in total. Streaming a single camera to a single consumer, e.g., the Home Assistant App on my phone works fine. Adding the Custom-WebRTC card for all cameras on a single dashboards crashes the Eufy HomeBase since it requires 5 simultaneous streams.

The CPU usage on my Raspberry is also quite high, about 40% just for this plugin (that is not including the ffmpeg conversion done my the go2rtc Add-on). I'm not quite sure why, perhaps I messed up the threads somehow when making the changes.

So, to sum up, I'm not sure it is very usable, at least not for an underpowered Raspberry PI setup, but perhaps someone can improve on it or maybe it works perfectly on a higher power setup.

What I would really like is a simple "all cameras view" in my dashboard in HA, like a CCTV setup. But unless Eufy creates this type of stream directly from their HomeBase I think it is hard to make it work simply because of how the Eufy cameras/HomeBase works. Even if I could create a single combined feed instead of individual feeds (which would definitely help my Raspberry), I'm not sure that the Eufy HomeBase could handle it.

@roflware
Copy link

Hi @neerdoc, do you have an example of multiple cameras in a go2rtc config? Also, do you know if this supports solar cameras?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants