-
Notifications
You must be signed in to change notification settings - Fork 54
SOFIE-47 | add automatic configuration of peripheral devices if there is only 1 studio #1569
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
base: release53
Are you sure you want to change the base?
Conversation
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
99355bc to
49c725c
Compare
… is only 1 studio
49c725c to
08dc25e
Compare
|
|
|
||
| const configId = unprotectString(deviceId) | ||
|
|
||
| await Studios.updateAsync(studio._id, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure how I feel about this creating a config object for itself when attaching..
There are 2 scenarios:
- blueprints provide config objects for each device. meaning the user will need to go to the settings to reassign it to the correct one and delete this temporary object
- blueprints done provide config objects. meaning this was helpful.
As the recommended approach for blueprints is 1, should we be prioritising that being smoother?
I dont know, Im curious what anyone else thinks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I too feel that this is a false friend in our "Configuration as Code" philosophy. I think we should probably re-think our "first run story": we should have the blueprints be the first thing that gets set up in a System, have them pre-populate the deviceSettings for a Studio and then, on first connection, the Peripheral Devices are matched to a known config.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I dont disagree with that, but even if blueprints are supposed to pre-generate the configurations, there will be cases where they havent so having a fallback to attach them with an empty config is still good.
So I am leaning towards leaving that larger rethinking until we have actually removed support for multiple studios; as that should in theory simplify these things even further
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| $push: { | ||
| [`peripheralDeviceSettings.deviceSettings.overrides`]: { | ||
| op: 'set', | ||
| path: configId, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While the risk is low, it is possible that this will replace an existing config with this empty one. I think this needs to make sure that configId isnt already defined before adding this override


About the Contributor
superfly.tv
Type of Contribution
This is a:
Feature
Current Behavior
Currently, a new device needs to be manually configured after first launch & discovery by Sofie
New Behavior
This PR adds automatic configuration of the new device, attaching it to the studio, but only if there is exactly 1 studio configured
Testing
Affected areas
This PR affects the behavior of Sofie after a new device connects for the first time
Time Frame
Not urgent, but we would like to get this merged into the in-development release
Other Information
Status