This is an old revision of the document!


Make Ceiling Lights great again

GitHubRepository

  • 6 Ceiling lights
    • 4 neon lights
    • 2 LED strip neon replacements
  • 2 5-wire 230V cables connect the lights to a self-made relay box
  • Each ceiling light
    • shares Earth and N
    • has it's separate L
  • relay box contains
    • 1x 4-channel opto-isolator relay 5V/230V , switchable with 3.3V IO, pull low to GND to switch
    • 1x 2-channel opto-isolator relay 5V/230V , switchable with 3.3V IO, pull low to GND to switch
  • Lasercut-Box with Light-Switches on wall
    • offers 6 2-way up/down switches
    • offers 3 push-buttons
    • --> 15 buttons
    • contains Teensy 3.0 µC (??)
    • contains RF433 transmitter
  • Teensy µC
    • reads 15 buttons
    • controls RF433 tx
    • has 6 unused gpio prepared to switch ceiling light directly
    • firmware takes rf433 cmds on /dev/ttyACM0
    • firmware reports buttons and takes gpio-to-set-states on /dev/ttyACM1
    • firmware also switches currently unconnected gpio directly
  • Relay-Box is connected to RaspberryPi1's GPIOS running as licht.realraum.at
    • 5V to VDD
    • 3V3 to VCC
    • gpio4, gpio23, gpio18, gpio17, gpio22, gpio21
  • RaspberryPi1
    • installed in carton box on shelf above passage
    • powered by USB-Multi-Charger
    • runs golightctrl
      • switches ceiling lights via GPIO
      • which provides Webserver to switch lights
      • reads Buttons from teensy
      • knows ceiling light states from GPIO
      • sends RF433 cmds directly via teensy or sends request to send to arduino on mursat shelf via MQTT

Current Problems

  • if raspberryPi1 dies or has problems, light can not be switched
  • teensy Firmware logic for gpios LOW == ON needs to be changed
  • switching ceiling light power on/off is probably incompatible with planned change of installing ESP8266 based H801 for each light

Working on it: xro

Plan is to install 2.5m RGB+CoolWhite and 3m WarmWhite LED Strip in each ceiling light and control them with a ESP8266 based H801 for each light. Thus we can choose colour and white-colour-temp for each light.

Status: All materials bought, awaiting delivery

TODO

  1. connect 2.5m RGB-CW and 3m WW LEDs to H801 and test with default firmware
  2. put test-setup in ceiling light and check for problems with WIFI reception. Test various installations to improve WIFI reception. e.g. put H801 outside light-metal-casing and under gypsum-ceiling plates or outside light-metal-casing and visible next to light.
  3. reflash and write new trusted firmware for H801, so that it can be controlled via MQTT and remembers a default light-setting

    • MQTT commands
    • action/ceilinglight1/light {r:int, g:int, b:int, cw:int, ww:int, ts:int}
    • action/ceilinglight1/defaultlight {r:int, g:int, b:int, cw:int, ww:int, ts:int}
  4. test thoroughly

  5. change golightctrl so it can control H801
  6. install in ceiling lights

Working on it: xro

Status: Concept

TODO

  1. connect Relay directly to Teensy µC
  2. change firmware to switch LOW for light-on
  3. change firmware to have 2 Modes
    • Direct-Mode: µC directly switches ceiling lights on button-presses and reports current state to golightctrl
    • Indirect-Mode: µC only reports button presses, does not directly switch ceiling lights, golightctrl tells µC which ceiling light to switch
  4. have firmware automatically switch back to Direct-Mode
    • if ttyACM gets closed
    • golightctrl fails to send SwitchToDirectMode-Cmd after 60s
  5. change golightctrl to
    • periodically send SwitchToDirectMode-Cmd
    • switch power of ceiling lights via µC
    • know ceiling light state from µC
    • send MQTT cmd to H801 to switch ceiling light off instead of cutting power (because faster and less weird when switching on again)
    • only cut power to ceiling lights when presence==false or people hit off-switch/webbutton multiple times or H801 MQTT keepalive times out or MQTT msg could not be delivered
realraum Graz, Brockmanngasse 15, 8010 Graz, realraum - Verein für Technik in Kultur und Gesellschaft
  • /var/lib/dokuwiki/data/attic/roomauto/deckenlichter.md.1483596279.txt.gz
  • Last modified: 2017-01-05 07:04
  • by xro