Uit Hack42
Ga naar: navigatie, zoeken
Regel 54: Regel 54:
 
Draait op kleintje.space.hack42.nl
 
Draait op kleintje.space.hack42.nl
 
doe even een mosquitto_sub -h localhost -t 'hack42/#' -v om te kijken wat er nu al is.
 
doe even een mosquitto_sub -h localhost -t 'hack42/#' -v om te kijken wat er nu al is.
 +
 +
=== Outputs ===
 +
 +
* hack42.nl/state [open|closed] spacestate
 +
* hack42.nl/wlan/clientcount <aantal wlan clients connected totaal>
 +
* hack42.nl/wlan/<apnaam> <aantal wlan clients per ap>
 +
* hack42.nl/sensors/1wire/<1wireID> <temperatuur> °C
 +
* hack42.nl/<ruimtenaam>/output/portX [open|closed] Output state
 +
* hack42.nl/<ruimtenaam>/input/portX [open|closed] Input states
 +
 +
=== Inputs ===
 +
Schrijf hiernaar:
 +
* hack42.nl/<ruimtenaam>/input/O<portnummer> [open|closed] open of close een output, per locatie kan verschillen wat de actie is en de timer die erop staat.
  
 
== Linux server ==
 
== Linux server ==
 
Kleintje: Paar GB ram, disks in raid en draait opensuse. Voor speciale dingen is er de mogelijkheid tot KVM.
 
Kleintje: Paar GB ram, disks in raid en draait opensuse. Voor speciale dingen is er de mogelijkheid tot KVM.
 +
 +
 +
== Per Ruimte (Geinstalleerd)==
 +
=== Stookkelder ===
 +
* Atmega328p
 +
* 2x 1wire bus (2,3) - normaal en parasite power enabled
 +
: op bus 2 zitten 8 sensoren op de buizen van/naar het gebouw / kachel
 +
* 4x relais (6,7,8,9) - 5V relais die 24V schakelen
 +
: Op kleintje in de software staat de default timer op 5 seconden.
 +
* 2x input (4,5) - door arduino naar +5V getrokken, sluiten = verbinden met Ground
 +
=== Stookhok ===
 +
* Atmega328p
 +
* 3x 1wire bus (2.3.4)
 +
: Op bus 2 zitten 2 sensoren op de kachel
 +
* 4x input (5,6,7,8)
 +
* 4x output (24V via ULN) (10,11,12,13)
 +
 +
== Wishlist ==
 +
=== Lounge ===
 +
* 3x 1wire bus
 +
: koelkast / febo
 +
: ruimte (2x)
 +
: aquarium
 +
* 1x analog input (potmeter voor de schuifdeur)\
 +
* 5x analog input (air quality sensoren)
 +
* 5x input (deuren + ramen)
 +
* 6x output (24V, radiatoren, verlichting koelkast en febo, scherm kassa, ...)
 +
 +
=== Keuken / gang1e (oost) ===
 +
* 4x 1wire bus
 +
: Koffie/Vaatwasser
 +
: Koelkast/Vriezers
 +
: Ruimte / Oven / Kookplaat
 +
* 8x digital input
 +
: Deuren / Spacestate / Doorloop sensor / ramen / nooduitgang
 +
* 4x 24V output
 +
: Keukenstroom / ....
 +
* 6x analog input
 +
: air quality sensors keuken
 +
 +
=== Vergader / Lezingen ===
 +
* 2x 1wire bus
 +
: Buiten
 +
: Binnen
 +
* 6x 24V output
 +
: Radiotoren, museumpower, ...
 +
* 4x input
 +
: Ramen / balkondeuren
 +
 +
=== Hal West + Museum (roze kamer) ===
 +
* 4x 1wire bus
 +
: Buiten
 +
: Binnen
 +
: Binnen
 +
: Binnen
 +
* 8x digital input
 +
: Ramen / deuren / wcraam / ...
 +
* 6x analog input
 +
: Air quality sensors toilet :)
 +
 +
=== GamingBieb ===
 +
* 2x 1wirebus
 +
: Binnen
 +
* 8x digital input
 +
: Deuren / ramen
 +
* 4x 24V
 +
: Schakelen hardware / radiatoren
 +
 +
=== Flexlab ===
 +
* 2x 1wirebus
 +
: Binnen
 +
* 8x digital input
 +
: Ramen / deuren
 +
* 4x 24V
 +
: Soldeerbouten schakelen / radiatoren
 +
* 6x analog input
 +
: Air quality sensors
 +
 +
 +
=== Cleanroom ===
 +
* 3x 1wirebus
 +
: Binnen / Buiten / Laserafvoer
 +
* 8x digital input
 +
: Ramen / deuren
 +
* 4x 24V
 +
: Schakelen hardware / radiatoren
 +
* 6x analog input
 +
: Air quality sensors
 +
 +
=== Maaklab ===
 +
* 2x 1wirebus
 +
: Binnen
 +
* 8x digital input
 +
: Ramen / deuren
 +
* 4x 24V
 +
: Schakelen hardware / radiatoren
 +
* 6x analog input
 +
: Air quality sensors
 +
 +
=== Fotostudio ===
 +
* 2x 1wirebus
 +
: Binnen
 +
* 8x digital input
 +
: (balkon) Deuren / ramen
 +
* 4x 24V
 +
: Schakelen hardware / radiatoren
 +
 +
=== Maaklab / Storage ===
 +
* 4x 1wirebus
 +
: Binnen / Buiten
 +
* 8x digital input
 +
: (balkon) Deuren / ramen
 +
* 4x 24V
 +
: Schakelen hardware / radiatoren
 +
 +
=== Gang 2e West ===
 +
* 4x 1wirebus
 +
: Douche / Toilet / Gang
 +
* 6x digital input
 +
: (balkon) Deuren / ramen
 +
* 4x 24V
 +
: Schakelen hardware / radiatoren
 +
* 6x analog input
 +
: Air quality sensors toilet :)
 +
 +
=== Stofhok / gang 2e (oost) ===
 +
* 4x 1wire bus
 +
: Binnen / Trappenhuis / Stokhok
 +
* 8x digital input
 +
: Deuren / Doorloop sensor / ramen / nooduitgang
 +
* 4x 24V output
 +
: Keukenstroom / ....
 +
* 6x analog input
 +
: air quality sensors stokhok
 +
 +
 +
=== Barakken 1 ===
 +
* 4x 1wire bus
 +
* 8x digital input
 +
* 4x 24V output
 +
 +
 +
=== Barakken 2 ===
 +
* 4x 1wire bus
 +
* 8x digital input
 +
* 4x 24V output
 +
 +
=== Barakken 1 ===
 +
* 4x 1wire bus
 +
* 8x digital input
 +
* 4x 24V output
 +
 +
=== Serverruimte / Bar ===
 +
* 4x 1wire bus
 +
* 8x digital input
 +
* 4x 24V output
 +
 +
=== Entree / Hal ===
 +
* 2x 1wire bus
 +
* 12x digital input
 +
: Brandalarm?
 +
* 4x 24V output
 +
 +
=== Gang 1e ===
 +
* 2x 1wire bus
 +
* 12x digital input
 +
* 2x 24V output
 +
 +
=== Trappenhuis beneden ===
 +
* 3x 1wire bus
 +
* 8x digital input
 +
* 2x 24V output

Versie van 26 okt 2016 10:21

Distributed space monitoring.

Om de space te automatiseren is er de volgende infrastructuur aanwezig:

  • Een patchrack met 24V en USB2TTL (5V)
  • Arduino's
  • Een MQTT server
  • Een linux server (met mogelijkheid voor virtuele machines)

Het patchrack

Bestaat uit 24 netwerkpoorten met:

24V+ op Blauw/Blauw-wit
Ground (24V) op Zwart/Zwart-wit
5V op Oranje
GND op Oranje-Wit
TX op Groen-Wit (op je arduino moet dit op RX)
RX op Groen (op je arduino is dit dus TX)

De 5V is beperkt tot maximaal 500mA

24V is beperkt tot

poort 1,2,7,8,13,19: 1A
poort 3-6,9-12: 0.25A
poort 14-18,20-24: 0.4A

De opbouw bestaat uit 4 keer het volgende in 1U 19:

En 1 keer:

  • USB Uplink kabel naar de linux PC
  • 1 stekkerblok voor de 4 voedingen

Arduino

Dit zijn hele goedkope ATMEGA168P arduino's, programmeren op 5V 16MHz in de IDE.

Serieele snelheid (om terug te melden aan de linuxdoos wat je metingen zijn of commando's te ontvangen): maximaal 57600, ruim daarboven doet 't 't niet zo goed meer.

aansluitspul voor de arduino's

  • DS18B20
  • DHT11
  • DHT22
  • MQ-gas sensoren
  • Ledjes
  • Read-Switches
  • Lift-deur Sensoren
  • 1Wire button readers (voor de doorduino's, die hebben beter arduino's).
  • microswitch
  • LDR

MQTT

Draait op kleintje.space.hack42.nl doe even een mosquitto_sub -h localhost -t 'hack42/#' -v om te kijken wat er nu al is.

Outputs

  • hack42.nl/state [open|closed] spacestate
  • hack42.nl/wlan/clientcount <aantal wlan clients connected totaal>
  • hack42.nl/wlan/<apnaam> <aantal wlan clients per ap>
  • hack42.nl/sensors/1wire/<1wireID> <temperatuur> °C
  • hack42.nl/<ruimtenaam>/output/portX [open|closed] Output state
  • hack42.nl/<ruimtenaam>/input/portX [open|closed] Input states

Inputs

Schrijf hiernaar:

  • hack42.nl/<ruimtenaam>/input/O<portnummer> [open|closed] open of close een output, per locatie kan verschillen wat de actie is en de timer die erop staat.

Linux server

Kleintje: Paar GB ram, disks in raid en draait opensuse. Voor speciale dingen is er de mogelijkheid tot KVM.


Per Ruimte (Geinstalleerd)

Stookkelder

  • Atmega328p
  • 2x 1wire bus (2,3) - normaal en parasite power enabled
op bus 2 zitten 8 sensoren op de buizen van/naar het gebouw / kachel
  • 4x relais (6,7,8,9) - 5V relais die 24V schakelen
Op kleintje in de software staat de default timer op 5 seconden.
  • 2x input (4,5) - door arduino naar +5V getrokken, sluiten = verbinden met Ground

Stookhok

  • Atmega328p
  • 3x 1wire bus (2.3.4)
Op bus 2 zitten 2 sensoren op de kachel
  • 4x input (5,6,7,8)
  • 4x output (24V via ULN) (10,11,12,13)

Wishlist

Lounge

  • 3x 1wire bus
koelkast / febo
ruimte (2x)
aquarium
  • 1x analog input (potmeter voor de schuifdeur)\
  • 5x analog input (air quality sensoren)
  • 5x input (deuren + ramen)
  • 6x output (24V, radiatoren, verlichting koelkast en febo, scherm kassa, ...)

Keuken / gang1e (oost)

  • 4x 1wire bus
Koffie/Vaatwasser
Koelkast/Vriezers
Ruimte / Oven / Kookplaat
  • 8x digital input
Deuren / Spacestate / Doorloop sensor / ramen / nooduitgang
  • 4x 24V output
Keukenstroom / ....
  • 6x analog input
air quality sensors keuken

Vergader / Lezingen

  • 2x 1wire bus
Buiten
Binnen
  • 6x 24V output
Radiotoren, museumpower, ...
  • 4x input
Ramen / balkondeuren

Hal West + Museum (roze kamer)

  • 4x 1wire bus
Buiten
Binnen
Binnen
Binnen
  • 8x digital input
Ramen / deuren / wcraam / ...
  • 6x analog input
Air quality sensors toilet :)

GamingBieb

  • 2x 1wirebus
Binnen
  • 8x digital input
Deuren / ramen
  • 4x 24V
Schakelen hardware / radiatoren

Flexlab

  • 2x 1wirebus
Binnen
  • 8x digital input
Ramen / deuren
  • 4x 24V
Soldeerbouten schakelen / radiatoren
  • 6x analog input
Air quality sensors


Cleanroom

  • 3x 1wirebus
Binnen / Buiten / Laserafvoer
  • 8x digital input
Ramen / deuren
  • 4x 24V
Schakelen hardware / radiatoren
  • 6x analog input
Air quality sensors

Maaklab

  • 2x 1wirebus
Binnen
  • 8x digital input
Ramen / deuren
  • 4x 24V
Schakelen hardware / radiatoren
  • 6x analog input
Air quality sensors

Fotostudio

  • 2x 1wirebus
Binnen
  • 8x digital input
(balkon) Deuren / ramen
  • 4x 24V
Schakelen hardware / radiatoren

Maaklab / Storage

  • 4x 1wirebus
Binnen / Buiten
  • 8x digital input
(balkon) Deuren / ramen
  • 4x 24V
Schakelen hardware / radiatoren

Gang 2e West

  • 4x 1wirebus
Douche / Toilet / Gang
  • 6x digital input
(balkon) Deuren / ramen
  • 4x 24V
Schakelen hardware / radiatoren
  • 6x analog input
Air quality sensors toilet :)

Stofhok / gang 2e (oost)

  • 4x 1wire bus
Binnen / Trappenhuis / Stokhok
  • 8x digital input
Deuren / Doorloop sensor / ramen / nooduitgang
  • 4x 24V output
Keukenstroom / ....
  • 6x analog input
air quality sensors stokhok


Barakken 1

  • 4x 1wire bus
  • 8x digital input
  • 4x 24V output


Barakken 2

  • 4x 1wire bus
  • 8x digital input
  • 4x 24V output

Barakken 1

  • 4x 1wire bus
  • 8x digital input
  • 4x 24V output

Serverruimte / Bar

  • 4x 1wire bus
  • 8x digital input
  • 4x 24V output

Entree / Hal

  • 2x 1wire bus
  • 12x digital input
Brandalarm?
  • 4x 24V output

Gang 1e

  • 2x 1wire bus
  • 12x digital input
  • 2x 24V output

Trappenhuis beneden

  • 3x 1wire bus
  • 8x digital input
  • 2x 24V output