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

Support for SBrick powered by BuWizz #43

Open
pdw-mb opened this issue Dec 31, 2020 · 0 comments · Fixed by vicocz/brickcontroller2#22 · May be fixed by #48 or #111
Open

Support for SBrick powered by BuWizz #43

pdw-mb opened this issue Dec 31, 2020 · 0 comments · Fixed by vicocz/brickcontroller2#22 · May be fixed by #48 or #111

Comments

@pdw-mb
Copy link
Contributor

pdw-mb commented Dec 31, 2020

Connecting an SBrick to a BuWizz output gets you a lot of ports for not a lot of space. Unfortunately, the BuWizz doesn't produce any output on the "permanent" pins of any of its ports unless a device is connected to it.

BC2 disconnects from a device as soon as you leave the device page, which makes it impossible to find the SBrick. This can be worked around by using the BuWizz app to power the device in the background whilst scanning for the SBrick, but it'd be nice to be able to do it all in BC2.

Simply commenting out this line makes it work for me:

I can now find my SBricks by doing a scan, selecting the BuWizz, leaving the device page and doing another scan.

I've also edited ConnectAsync to not attempt to connect if the device state is already Connected. Happy to turn this into a PR if that'd be useful.

I'm not sure if there's a downside to keeping these connections open. If so, perhaps it could be made an option for the case where a BuWizz is being used as a power supply.

EDIT:

It turns out that there's a further issue which is that it won't reliably connect to a creation with this configuration of devices. I assume that this is because ConnectDevicesAsync doesn't understand the dependencies and attempts to connect in an undetermined order. I've hacked it around a bit so that it connects BuWizz devices first, then connects all remaining devices in a second pass and this seems to fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant