hyperion.ng: Duplicate priorities-update in certain circumstances
2.0.0-alpha.7
- I confirm that this is an issue rather than a question.
Bug report
Under certain circumstances a spurious priorities-update API response is generated.
Steps to reproduce
- Subscribe to priorities-update (in one terminals):
$ echo '{"command":"serverinfo", "subscribe":["priorities-update"] }' | nc hyperion 19444
- Set an effect (in another terminal):
$ echo '{"origin": "Home Assistant", "priority": 128, "effect": {"name": "Cold mood blobs"}, "command": "effect"}' | nc hyperion 19444
- Observe the priority updates in the first terminal.
What is expected?
At most two priority updates (one priority becoming non-visible, another becoming visible).
What is actually happening?
{"command":"priorities-update","data":{"priorities":[{"active":false,"componentId":"EFFECT","origin":"Home Assistant@::ffff:10.100.0.20","owner":"Cold mood blobs","priority":128,"visible":false},{"active":true,"componentId":"V4L","origin":"System","owner":"V4L2:/dev/video0","priority":240,"visible":true}],"priorities_autoselect":true}}
{"command":"priorities-update","data":{"priorities":[{"active":true,"componentId":"EFFECT","origin":"Home Assistant@::ffff:10.100.0.20","owner":"Cold mood blobs","priority":128,"visible":true},{"active":true,"componentId":"V4L","origin":"System","owner":"V4L2:/dev/video0","priority":240,"visible":false}],"priorities_autoselect":true}}
{"command":"priorities-update","data":{"priorities":[{"active":true,"componentId":"EFFECT","origin":"Home Assistant@::ffff:10.100.0.20","owner":"Cold mood blobs","priority":128,"visible":true},{"active":true,"componentId":"V4L","origin":"System","owner":"V4L2:/dev/video0","priority":240,"visible":false}],"priorities_autoselect":true}}
Note the last two updates are identical.
A similar effect can be seen on clear:
$ echo '{"priority": 128, "command": "clear"}' | nc hyperion 19444
{"command":"clear","success":true,"tan":0}
… will then produce two identical updates …
{"command":"priorities-update","data":{"priorities":[{"active":true,"componentId":"V4L","origin":"System","owner":"V4L2:/dev/video0","priority":240,"visible":true}],"priorities_autoselect":true}}
{"command":"priorities-update","data":{"priorities":[{"active":true,"componentId":"V4L","origin":"System","owner":"V4L2:/dev/video0","priority":240,"visible":true}],"priorities_autoselect":true}}
System
Hyperion Server:
- Build: master (GitHub-f719f0b/838092e-1597257777)
- Build time: Aug 19 2020 04:01:56
- Git Remote: https://github.com/hyperion-project/hyperion.ng.git
- Version: 2.0.0-alpha.7
- UI Lang: auto (BrowserLang: en-US)
- UI Access: default
- Avail Capt: dispmanx,v4l2,framebuffer,qt
Hyperion Server OS:
- Distribution: Raspbian GNU/Linux 10 (buster)
- Arch: arm
- Kernel: linux (5.4.51+ (WS: 32))
- Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.135 Safari/53
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 25 (25 by maintainers)
Commits related to this issue
- Fix for issue #993 — committed to Paulchen-Panther/hyperion.ng by Paulchen-Panther 4 years ago
- Fix issues #1022, #1019, #997, #993, #992, #976, #969, #964, #980 (#1036) — committed to hyperion-project/hyperion.ng by Paulchen-Panther 4 years ago
I will advise me internally with the other members. Also a big thank you for the constant testing and feedback. 👍