Skip to content

feat: refresh card based on IDLE or STREAMING state changes#622

Open
fuatakgun wants to merge 6 commits into
AlexxIT:masterfrom
fuatakgun:master
Open

feat: refresh card based on IDLE or STREAMING state changes#622
fuatakgun wants to merge 6 commits into
AlexxIT:masterfrom
fuatakgun:master

Conversation

@fuatakgun

@fuatakgun fuatakgun commented Dec 7, 2023

Copy link
Copy Markdown
Contributor

There are some cameras out there which are only streaming intermittently, rather than continuously so WebRTC custom card waits for next reconnect (0 to 30 seconds).

With this PR, webrtc will be forced to refresh itself if the underlying camera entity's state changes into IDLE or STREAMING.

IDLE and STREAMING are defined in home assistant camera entity.

https://github.com/home-assistant/core/blob/dev/homeassistant/components/camera/__init__.py#L96

Looking forward to hearing your feedback.

@AlexxIT

AlexxIT commented Dec 7, 2023

Copy link
Copy Markdown
Owner

I get the idea what you want to fix. But I don't like the solution. It can have a lot of side effects.

@fuatakgun

Copy link
Copy Markdown
Contributor Author

Understood, any suggestion?

@AlexxIT

AlexxIT commented Dec 7, 2023

Copy link
Copy Markdown
Owner

Maybe easiest way to change reconnect timeout via card config for this cameras. Such a thing is not difficult to implement

this.RECONNECT_TIMEOUT = 30000;

@fuatakgun

Copy link
Copy Markdown
Contributor Author

Works for me, but would it go back to rendering the poster when the stream stops?

@AlexxIT

AlexxIT commented Dec 7, 2023

Copy link
Copy Markdown
Owner

I don't know. Haven't tested this case. Maybe something should be fixed for this

@ronaldt80

Copy link
Copy Markdown

Hi, what's the status of this PR? Would be great if this feature can be incorporated.

@ilanbiala

Copy link
Copy Markdown

Is this functionality already implemented through a separate PR and this PR can be closed?

@ChayoteJarocho

Copy link
Copy Markdown

Hey @fuatakgun is this something that could possibly be fixed either on the eufy addon side or the eufy integration side?

@AlexxIT 's concern is valid because all other camera brands work fine, but the Eufy ones suck.

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.

5 participants