-
-
Notifications
You must be signed in to change notification settings - Fork 396
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
Duplicate priorities-update in certain circumstances #993
Comments
@dermotduffy |
@Paulchen-Panther Verified fixed in your PR. Thanks! |
@Paulchen-Panther This still appears to be a problem (brand new build from head): Subscribe (in 1 terminal): $ telnet hyperion 19444
Escape character is '^]'.
{"command": "serverinfo", "subscribe": ["priorities-update"]} Send a color command (in another terminal): echo '{"origin": "Home Assistant", "priority": 128, "color": [10,100,255], "command": "color"}' | nc hyperion 19444 Output I get (in the first terminal), two identical calls back: {"command":"priorities-update","data":{"priorities":[{"active":true,"componentId":"COLOR","origin":"Home Assistant@IP","priority":128,"value":{"HSL":[0,1,0.5196154713630676],"RGB":[10,100,255]},"visible":true},{"active":false,"componentId":"V4L","origin":"System","priority":240,"visible":false}],"priorities_autoselect":true}}
{"command":"priorities-update","data":{"priorities":[{"active":true,"componentId":"COLOR","origin":"Home Assistant@IP","priority":128,"value":{"HSL":[0,1,0.5196154713630676],"RGB":[10,100,255]},"visible":true},{"active":false,"componentId":"V4L","origin":"System","priority":240,"visible":false}],"priorities_autoselect":true}} |
No problem. I'll look again. |
Could you please test PR #1062 ? Many Thanks. |
Thanks @Paulchen-Panther . That works in that only a single color priority is produced (hurray!), however I notice that the problem of no priority update on effect is back again: Subscribe (in 1 terminal):
Send an effect update (in another terminal):
I'd expect a priority update, yet I receive none. |
thanks for the feedback. I hadn't tested the effect. take care of that. |
@dermotduffy |
Sorry to be the bearer of bad news -- now it works for effect, but is back to broken for color. The below is output from a single color set command: {"command":"priorities-update","data":{"priorities":[{"active":true,"componentId":"COLOR","origin":"Home Assistant@IP","priority":12,"value":{"HSL":[0,1,0.5313801765441895],"RGB":[16,100,255]},"visible":true},{"active":true,"componentId":"EFFECT","origin":"My Fancy App@IP","owner":"Red mood blobs","priority":50,"visible":false},{"active":true,"componentId":"COLOR","origin":"Home Assistant@IP","priority":128,"value":{"HSL":[0,1,0.5313801765441895],"RGB":[16,100,255]},"visible":false},{"active":false,"componentId":"V4L","origin":"System","priority":240,"visible":false}],"priorities_autoselect":true}}
{"command":"priorities-update","data":{"priorities":[{"active":true,"componentId":"COLOR","origin":"Home Assistant@IP","priority":12,"value":{"HSL":[0,1,0.5313801765441895],"RGB":[16,100,255]},"visible":true},{"active":true,"componentId":"EFFECT","origin":"My Fancy App@IP","owner":"Red mood blobs","priority":50,"visible":false},{"active":true,"componentId":"COLOR","origin":"Home Assistant@IP","priority":128,"value":{"HSL":[0,1,0.5313801765441895],"RGB":[16,100,255]},"visible":false},{"active":false,"componentId":"V4L","origin":"System","priority":240,"visible":false}],"priorities_autoselect":true}} |
Hmm. Thanks @Paulchen-Panther . That gif shows what I would have expected. Let me play around and make sure I'm not making some user error on my side. Report back shortly. |
(Same happens with effects -- it appears the correct number of updates are generated, but only if the new priority "wins"). |
Give it another try on PR #1062 ? |
Build verification:
|
Thanks @Paulchen-Panther . I have tried another fresh rebuild, and all sorts of various settings, priorities, removing my hyperion.db, etc. Here is my main finding: It only fails to work if the new priority is the same as the old priority AND the new priority is the lowest/active priority. In all other cases it works correctly, This still does not not match what your gif is showing (where you use priority 100, and don't appear to have a lower priority in the serverinfo output), so right now I have no explanation for the difference we are seeing. |
I see exactly the same in your example as in my example. First a new priority 100 (color) is registered and an output appears. Then I overwrite the Prio 100 with a different color. The Prio 100 is also the currently active color for me. |
[This was reproducible for me]
If you still cannot reproduce it, do you happen to have an arml7:buster hyperiod binary I could try from your build, just to rule out something weird happening in the build process? |
Thank you for the detailed description. I'll get back to you if there are any improvements. |
@Paulchen-Panther I dug into this a little this evening, and discovered the same thing it seems you did: an uninitialized variable. I'm guessing we were getting different values, and this was causing the different behavior we were seeing. Either way: I've done a new build with your latest fix on #1062 and it looks good to me! |
@Paulchen-Panther Unrelated: Given the volume of fixes there's been on the API code (thank you!), would it be at all possible to get a new official Hyperion build after this change is in? (I have a number of parts of the Home Assistant integration work ready that depend on these fixes being in an official build). Thank you for considering. |
I will advise me internally with the other members. |
@Paulchen-Panther Quick check: do you have any news on a release ETA as discussed here? Just want to know roughly, so I can plan accordingly. Thank you! |
2.0.0-alpha.7
Bug report
Under certain circumstances a spurious priorities-update API response is generated.
Steps to reproduce
What is expected?
At most two priority updates (one priority becoming non-visible, another becoming visible).
What is actually happening?
Note the last two updates are identical.
A similar effect can be seen on clear:
... will then produce two identical updates ...
System
Hyperion Server:
Hyperion Server OS:
The text was updated successfully, but these errors were encountered: