Feature Request: DS2408 as Output

Awesome BrewPi Development Team:

I needed a bunch of outputs, they weren’t going to be switched too often, and I needed them to run over 1W so I could keep the fermenters in a different room from the BrewPi, so I used a DS2408 and wired it to inexpensive relays. The plan being to use it to control two pumps, an AC window unit for my glycol, and a space heater just in case the room gets colder than the set point of the beer. I hooked it up, BrewPi recognized it, but it assumes that since it’s a DS2408 that it is one of the motorized valve units. I’ve got two questions:

1.) How hard would it be for me to change the code temporarily to make this work?
2.) Can you include this natively in the next release?

Thank you so much for your continued work!


1.) I cannot judge your C++ skills. It wouldn’t be too hard to create a new controller that inherits from OneWireSwitch. Similar to the DS2413 code.

I noticed that the functions in DS2408.h are just plain wrong (copied from an older implementation of DS2413), but there are not used in the valve controller code. The valve controller does use the DS2408 class, but only the functions inherited from OneWireSwitch.

Most of the work would be refactoring the device manager and web interface, so that a DS2408 can be a valve controller or a 8 channel output module.

2.) It is low priority, because our DS2413 boards offer the exact same functionality, just with 2 outputs.

@y2klightning - if you are able to code this up, feel free to submit a PR. We are always open to contributions from the community. We review all PRs received and evaluate them for potential inclusion in future releases.

1 Like