# IT-Syndikat Electrical Infrastructure

## Maintainer

* @all:       Keep shit operational. If something breaks off or looks dangerous,
              please fix it to the extend you feel capable of.
* @tyrolyean: Generic garbage based catch-all

## Installation History

The current electrical installation was constructed during the space moving and
renovation phase of 2023-09 to 2023-12. During this time, the distribution box,
the wires in the wall, including their support and mounting equeipment, all
outlets, and the network Infrastructure was constructed. Allthough having seen
some changes over the last 2ish years since it was first powered on, most of the
initial construction phase has proven to be working as of now. So here I go
documenting it.

## General

### Room Names

The electrical Infrastruture had the need to define room names before their
usage was entirely sorted out, which can take years in some cases inside this
community. At time of construction they were as shown in the picture below:

![Plan No. 19 of our space](pictures/pendl_19.svg "Confirmed Plan No. 19, as approved by Plenary session")

Electrical Documentation should always referr to rooms by the names in this
plan. If they do not, that is an error and should be fixed.

### Phase/Line position on outlets

Phase/Line position in our installation should be kept consistant, with Line
always beeing on the left hand side of any outlet, or on the top side, if
mounted sideways.

### TIA-568 Network Sockets

We do TIA-568 ***B*** for all network outlets on all network cables. Please do
not mix and match A and B inside the space. Please only use ***B***.

### Wire coloring scheme

For low voltage, meaning everything below 100V, we use the
[EGS wire coloring scheme](https://docs.escpe.net/en/master/egs/03-Electrical/doc.html#wire-coloring)

Please try to, wherever possible, adhere to this scheme. Things get confusing
real fast if you don't.

## Electrical Installation

### Wiring

Space wiring internally is 2.5mm² or higher for all outlet circuits, and 1.5mm²
for all lighting circuits. Lamp circuits are 1.5mm², as is emergency lighting
circuit. All wires are `YM-J`, which is the old austrian standard for
`AT-N05VV-U` after harmonisation.

Our supply line is 25mm² `Ye` and was provided by the space to the electricians
wiring up the building. Our Energy Meter is located in the cellar and is fused
at `13F1` inside there by three 50A NH00 fuses. We have been given either one
of the`TOP 24` or `TOP 23` unit designations inside the building. Yes
electricians do be confusing sometimes.

![13F1](pictures/13F1.jpg "Our Building side fuse")
![13Q1](pictures/13Q1.jpg "Our Building side limit switch")

#### Lamps

Most lamps are wired up to use all 3 phases, to evenly distribute power. We also
use this mechanism to enable each room to have 3 different lighting stages:

* Off: No phase is turned on
* ⅓: Only 1 of 3 phases is turned on
* ⅔: Only 2 of 3 phases are turned on
* Full: Both ⅓ and ⅔ are turned on

#### Plan

We did actually draw a plan of what is supposed to belong where:

##### Outlets

![Street-side](pictures/plan_1.jpg "Street-side outlet plan")
![Back-side](pictures/plan_2.jpg "Back-side outlet plan")

##### Cables

![Street-side](pictures/plan_3.jpg "Street-side outlet plan")
![Back-side](pictures/plan_4.jpg "Back-side outlet plan")

### Fusebox

Our fuse box is a 32TE wide by 7 rows high wall mounted unit originally
manufactured for [EAE Stöckl](https://eae.at/), which has been stripped down and
re-wired with our installation materials. Currently it looks like this:

![Swithbox closed](pictures/switchbox_closed.jpg "Closed up switchbox")

or if you want to see the internals:

![Swithbox open](pictures/switchbox_open.jpg "Opened up switchbox")

#### Logic components

There are currently 3 logic components installed for measurements and
HomeAssistant related switching operations:

* SM1: A [go-e Controller](https://go-e.com/en/products/go-e-controller) used
  for measuring power consumption inside the space
* A 32 Port Optocoupler board: Used to give Homeassistant hardware states
* A 32 Output Relay Board: Used to let Homeassistant switch circuits on and off

The optocoupler and relay boards are supplied with power from the power supply
located near the top of the unit, which in turn received power from `1F8`.

SM1 is powered via `3F8`.

### Light and schuko switching

#### Light

We operate an industrial style light switching circuit. The schematic below
is an examplary view of this, but basically, we use a self-holding relay which
one can alter the state with using push buttons at door entries. Our
home-assistant can interact with this in the same way as the button would, using
a Waveshare 32-channel modbus relay board, which is used to "emulate" button
presses. The state is pushed to home-assistant via a modbus attached
optocoupler board.

![Light circuitry](pictures/schem_light.jpg "An examplary schematic of one of our lighting circuits")
![Waveshare RTU](pictures/switchbox_r7.jpg "Front view of the Waveshare Modbus RTU")

The 3 Meanwell powersupplies on the right hand side of the picture above are
used to power our WS2812/SK6812 light installations, colloquially known as
"Blinkenshit".

#### Schuko

Schuko states are switched and set in the same way lights are. Each room is
wired up using `YM-J 5x2.5mm²` wires, the black one being the switched one and
the brown one being the permanent one. Black outlets are connected to the
switched black wire, whilest the white permanent ones are wired up to the brown
wire. The fifth grey wire is also connected together using wagos, but only
terminates in the last outlet of each branch, should the need ever arise for a
second variant of switched outlet.

![Outlets closed](pictures/outlets_closed.jpg "A view of 2 black and 2 white outlets")

Branch ends are, as shown in the picture above, labeled using their circuit
number and the `/E` tag, as is common practice in fire protection systems.

### Fuse plans and terminal block plans

#### Fuse numbers

![FP1](pictures/its_fuse_1.svg "Fuse plan page 1")
![FP2](pictures/its_fuse_2.svg "Fuse plan page 2")

#### Terminal block numbers

At the top of our fusebox reside Terminal Blocks consisting mostly of Phoenix
Contact `PTI-2,5` and `PT-1,5/QUATTRO` Push-In Terminal Blocks. All wires,
except for Blinkenshit and an ethernet cable, terminate on these blocks to
avoid the need to wire the box up internally after it has been installed, and
to ease with maintenance works.

![TP1](pictures/its_term_1.svg "Terminal plan page 1")
![TP2](pictures/its_term_2.svg "Terminal plan page 2")
![TP3](pictures/its_term_3.svg "Terminal plan page 3")
![TP4](pictures/its_term_4.svg "Terminal plan page 4")