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

All available streams created as default #36

Closed
TheDukeSr opened this issue Jun 28, 2021 · 5 comments
Closed

All available streams created as default #36

TheDukeSr opened this issue Jun 28, 2021 · 5 comments

Comments

@TheDukeSr
Copy link

TheDukeSr commented Jun 28, 2021

Current setup:
When adding a camera you have to choose what stream you want (main, sub, both).
My camera has 2 sub streams, and the 2nd has other resolution options then the 1st, so I use them both for diffrent scenarios.

2 problems:
A. The 2nd Substream is not available at all (for other cams maybe even 4 streams?).
B. When changing/adding a scenario, I have to remove/re-add the camera to enable or disable (sub)streams.

Possible solution
Allways create all available streams as entity.
Correct me if i'm wrong, but as long you just make a stream available in the config this will not cost any extra overhead as long it is not used in streaming?
For streams that have no activity, those can be created as DISabled entities automaticly when cam is added.
Or...
Show all possible streams as option to user to enable/disable when cam added (as select list/tick boxes), and create entities as disabled when not tagged by user.

Whatever option is choosen, at least create all cam streams as entitie so they can be enabled/disabled with a click of the mouse.
I've seen other Integrations create some disabled entities by default. So should be possible.

And for trigger entities the same request (see issue #38 ), so this whole integration works the same for streams as entity triggers.

My Substream options config screenprint

Regards, The Duke.

@TheDukeSr TheDukeSr changed the title All available streams active as default All available streams created as default Jun 29, 2021
@rroller
Copy link
Owner

rroller commented Jun 29, 2021

Great idea. I'll do this.

@tunip
Copy link

tunip commented Dec 24, 2021

May i ask what is the status of this feature request? Thanks

@rroller
Copy link
Owner

rroller commented Dec 26, 2021

I can't find a way to figure out the available streams. If I could find the available streams then I could add this. I'll do more digging today on this.

@rroller
Copy link
Owner

rroller commented Dec 26, 2021

Looks like I can use /cgi-bin/magicBox.cgi?action=getProductDefinition&name=MaxExtraStream to get the max number of substreams. Still trying to figure out how to know if the stream is enabled or not. I guess I could just add support for all streams, regardless if it is enabled or not. I'll give that a try.

@rroller
Copy link
Owner

rroller commented Dec 26, 2021

This is now released in https://github.com/rroller/dahua/releases/tag/0.9.29

All streams are released by default. Please let me know if you have any issues.

@rroller rroller closed this as completed Dec 26, 2021
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

No branches or pull requests

3 participants