Skip to content
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


= Powerbars for TechInc =

We have multiple powerbars, controllable over serial. Each of these bars has
power sockets that can be turned on/off individually. The plan is to use these
throughout to space to be able to remotely control the lights and other

== Design ==

Since we don't care about where the bars are and how many we have, the most
basic component we consider in a socket. A socket can be turned on or off.
A socket can be part of a group. As such, a group consists of a set of sockets.
Groups can be turned on or off as a whole. Finally, there will be presets,
which consist of a two sets of groups, one set that needs to be turned off,
one that needs to be turned on.

=== Bars ===

Each powerbar has a number of sockets.

=== Sockets ===

Each socket can be turned off and on individually.

=== Groups ===

Each group contains a set of sockets and thus allows turning off or on a set of

=== Prefixes ===

A preset contains a set of groups to turn off and a set of groups to turn on.

== Security ==

The plan is to use serial cables to connect the bars together,
but optionally we can put a cheap device with serial in front of
every powerbar and have them communicate over HTTPS.
The inter-device communication (where required) will happen over HTTPS, using
certificates for authentication.

ACL's will be used, to "secure" certain groups if deemed necessary.

The main supported API is listed below. Some other interfaces (with possibly
access to all components) will follow.

== API ==

export MLP_HOST=
export MLP_PORT=5000

a BAR and SOCKET are number, a group and a preset are strings

=== Sockets ===

    curl -d state=$STATE http://$MLP_HOST:$MLP_PORT/$BAR/$SOCKET


    curl -d state=Off http://$MLP_HOST:$MLP_PORT/AUX/W_LIGHT_TABLE

=== Groups ===

    curl -d state=Off http://$MLP_HOST:$MLP_PORT/group/table

=== Prefix ===

    curl -d "" http://$MLP_HOST:$MLP_PORT/preset/alloff

== Examples ==



TechInc Powerbars



No releases published
You can’t perform that action at this time.