======= Room Automatisation ======= === Slides === Xro made a nice [[http://btittelbach.github.io/r3_sensors_light_power_talk/|presentation]] ====== Lüftungsanlage ====== nur im lokalen LAN/WLAN: * [[http://ventilation.realraum.at/]] * [[http://lüftung.realraum.at/]] * [[http://sucker.realraum.at/]] [[ventilation|Projekt Lüftung Dokumentation]] ====== Türschließmechanismus ====== [[torwaechter]] ====== Licht/Schaltanlage ====== nur im lokalen LAN/WLAN: * [[http://licht.realraum.at/ | Deckenlichter]] * [[http://licht.realraum.at/switch.html | Deckenlichter und Funksteckdosen (Breitbild-Version)]] * [[http://licht.realraum.at/ymhremote.html|Verstärker/Tuner Fernbedienung]] * [[http://realraum.github.io/r3pi-temperature/|Temperatursensor - Grafik]] nur im lokalen realraum Raum: * Deckenlichtschalter + Presetknöpfe, LOTHR, rechts neben Durchgang * Funkschalter beim LoTHR Waschbecken * Funkfernbedienung, TESLA rechts * Funkschalter MaSha, links neben der Tür === Automatiken === Previously configured by a fancy almost turing complete ini file, now simply hardcoded in [[https://github.com/realraum/door_and_sensors/blob/master/scripts/dostuff_switch_lights.py| dostuff_switch_lights.py]] running on realraum@mqtt.realraum.at. | **Cause** | **Effect** | | Niemand Anwesend | Alles Aus, Homepage Statusupdate | | Anwesenheit erkannt \\ Vor Sonnenuntergang | Tesla ein \\ Warmwasserboiler ein \\ CX-GangLEDs ein \\ Homepage Statusupdate | | Anwesenheit erkannt \\ Nach Sonnenuntergang | 50% Deckenlichter ein \\ Tesla ein \\ Warmwasserboiler ein \\ CX-GangLEDs ein \\ Abwaschlicht ein \\ LEDs bei Couch ein \\ Blaue Bar LEDS sein \\ Homepage Statusupdate | | Anwesenheit gegeben \\ Sonnenuntergang | CX-GangLEDs ein | | Anwesenheit gegeben \\ Sonnenaufgang | CX-GangLEDs aus | | Panic Button drücken| Random Ein/Aus aller Lichter, Random Verstärker Mute, Glados: What are you doing, Statusupdate auf der Homepage| ==== Sensors and Dataflow ==== realraum is littered with various sensors. As of 2015-11-21 they all communicate usinq [[http://mqtt.org|MQTT]], an Internet-of-Things Machine2Machine Messaging protocol using a central message broker running on mqtt.realraum.at (see [[intern:ip-adressen]]) which in turn currently runs on a RaspberryPI2. --> --> --> [[mqtt_topics|See List of MQTT topics]] <- <- <- (includes pictures of participating nodes) --> --> --> [[dataflow|Graph of nodes and dataflow]] <- <- <- ==== RF433 Transmitter ==== Our [[https://github.com/realraum/deckenlichtschalter/blob/master/teensy2/lightctrl/rf433.c| Code]] for controlling RF433 power outlets or switches or just controlling any cheap RF433 device via ATMega based µC. Usually some daemon [[https://github.com/realraum/deckenlichtschalter/tree/master/linux/golightctrl|(1:new)]], [[https://github.com/realraum/deckenlichtschalter/tree/master/linux/lightctrl|(2:old)]], [[https://github.com/realraum/door_and_sensors/blob/master/scripts/arduinosensors.py| (3:client for 1 or 2)]] sends 3 byte rfcodes via serial interface to the ATmega which modulates a pin connected to a transmitter extracted from [[http://www.pollin.de/shop/dt/NDgxODcyOTk-/Computer_und_Zubehoer/Hardware/Maeuse_Unterlagen_Joystick/PC_Funkfernbedienung_X10.html|cheap RF433 based remote X10]] In realraum there are currently two senders: - Teensy2 hidden inside lasercut Deckenlichtschalter box next to passageway. - OOOllldd Arduino on top of the shelf which also hosts the stereo next to the frontdoor. [[https://github.com/realraum/deckenlichtschalter/tree/master/linux/golightctrl|golightctrl]] running on realraum@licht.realraum.at takes care that there they don't send simultaneously. ==== Presence Decision and Related v2.0 ==== The [[https://github.com/realraum/door_and_sensors/blob/master/r3-metaevt-maker/presence.go|presence-meta-event-goroutine]] tries to diving if someone is present in realraum or not. Various scripts like [[https://github.com/realraum/door_and_sensors/blob/master/scripts/play-sound-status.py|play-sound-status.py]]((running on licht.realraum.at)) or [[https://github.com/realraum/door_and_sensors/blob/master/scripts/dostuff_switch_lights.py|dostuff_switch_lights.py]]((running on mqtt.realraum.at)) use this information to, guess what, play sounds or toggle the lights or power to boiler and tesla. {{:roomauto:presence_detection_algorithm.svg?900|Anwesenheits-Entscheidung v2.0}} {{:roomauto:presence_detection_algorithm.dia|Dia-Source}}, {{xro:presence_detection_algorithm.png?20|Old Decision Algorithm}} ==== Tür Hardware v1.8 State Diagramm ==== {{:xro:whiteboard_tuer_steuerung_v2.jpg?620|}} {{tag>project licht homeautomatisation go mqtt}}