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

[WebInterface] /grab command is broken #23

Open
shaxxx opened this issue Sep 20, 2019 · 10 comments
Open

[WebInterface] /grab command is broken #23

shaxxx opened this issue Sep 20, 2019 · 10 comments

Comments

@shaxxx
Copy link

shaxxx commented Sep 20, 2019

DISCLAIMER: My dreambox is old and cannot run new webinterface, so there is no way to test this. I'm reporting this based on a code review and user experiences.

In a recent PR a34f4b2 /grab command was renamed with /screenshot (and some parameters changed).
My python is weak but as far I can see you did keep loadCompat overload available but this is never called in current implementation (default handler calls 'load'), and /grab controller is no longer working.
Please, do correct me if I'm wrong. Like I said, I'm reporting because users of my mobile app cannot use Screenshot command anymore on new Dreambox 900 UHD. You can see command here

https://github.com/shaxxx/EnigmaWeb.Dart/blob/9e7590c06bf72ea06015db63540ff763693ea882/lib/src/commands/screenshot_command.dart#L31

Same thing is used in webbouqueteditor plugin in this repository.

buffer.src = '/grab?format=jpg&r=720&' + what + '&filename=/tmp/' + downloadStart;

Now, can you please make /grab command available again?

@shaxxx
Copy link
Author

shaxxx commented Sep 24, 2019

Ok, after further investigation problem exists only with OE 2.6 image (Dreambox One).

Grab command gets response, but only OSD us visible (if there is any). Video is not visible. Screenshot in web application works as expected.
Again, this is something reported from users. Not something I can check.

@drecomx
Copy link
Contributor

drecomx commented Sep 24, 2019

DreamOS for One has version 4.4. You can get it with ip:port/web/about

@shaxxx
Copy link
Author

shaxxx commented Sep 24, 2019

Not sure I follow you.
You're suggesting to use /web/about to recognize image version and somehow workaround this (like using /screenshot command instead)?
Why? Grab command is not removed, it's broken. Again, cannot confirm it myself. But it's easy to test.

@drecomx
Copy link
Contributor

drecomx commented Sep 24, 2019

DreamOS will not use grab anymore in the future. So, I showed you a way to identify DreamOS' version and call the correct url. That's a simple if.

@shaxxx
Copy link
Author

shaxxx commented Sep 24, 2019

Thanks @dre. Not really sure why you decided to make breaking change. I realize grab was never part of the enigma2 API to begin with, but plenty of clients use it.
Why not just use /grab as another alias for /screenshot?
Translating parameters from one to another should be straightforward.

@drecomx
Copy link
Contributor

drecomx commented Sep 24, 2019

I didn't decide anything. But instead of discussing it's often easier to accept the situation and implement workarounds.

@shaxxx
Copy link
Author

shaxxx commented Sep 24, 2019

:) Makes sense.
Would it be too much if I asked to copy/paste output of /web/about from Dream OS here? You can leave out mac address.

@shaxxx
Copy link
Author

shaxxx commented Sep 25, 2019

After checking enigma2 and webinterface sources I found that neither /web/about or /web/deviceinfo contain any info about OE version. This information is available only in OpenWebif.
So I can't create workaround even if I wanted to.
And after seeing multiple commits regarding screenshot in enigma2 master lately I still believe this is bug, not intended behaviour.
And once again this is something I cant personally test.

@sreichholf
Copy link
Contributor

We cloud make /grab an alias to /screenshot to work around this for backwards compat.
Thx for the input!

@shaxxx
Copy link
Author

shaxxx commented Sep 25, 2019

If I may, I would propose additional feature request.
Ignore unsupported parameters.
For example, if I call /grab?foo=bar, this should still work, like there's no query parameters.
Currently this returns black picture.
Simply go trough parameters as you're going now, but when it's not recognized just skip it and go with next one.

This is actually another issue, but I didn't wan't to push my luck.

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