My Make Projects
Introduction

Lighthouse58 is a showcase based upon the LEGO ® (LEGO is a trademark of the LEGO Group) Lighthouse Point 31051 which build has been enhanced. Integrated are several objects with devices, e.g. Top Light, OLED display Weather Underground data, Motion Detector, Outdoor Light, Indoor Lights, Light Dimmers, Ambient Light, LED Status Indicators. The Control Unit hardware is a Raspberry Pi with TinkerForge Bricks & Bricklets.
The Lighthouse58 is controlled via

  • Node-RED Browser Dashboard.
  • Windows Client (developed with B4J).
  • Browser Dashboard (multi client control) running as a Server (developed with B4J) on the Control Unit.

Details to be found in the Lighthouse58 Concept (PDF).

Objectives
  • To develop a showcase
  • To control objects containing devices
    • An object is for example a house or a group of houses.
    • A device is for example a light, switch, servo motor, sensor (e.q. temperature, illuminance, contact, motion) or virtual (e.q. weather request).
    • Each device has a set of actions to control, e.g.light = on | off | state | blink(n).
  • To experiment with hardware, sensors, software
  • To build objects with devices
  • To design a messaging concept
  • To apply learning’s from previous experiments
  • To explore, learn & share
  • To have fun
Functionality
Lighthouse
  • Top Light Flashing based on the properties of the selected Lighthouse.
  • Information Display showing a clock & weather information (temperature, airpressure, beaufort, wind direction) measured at the nearest lighthouse lat/lon position.
  • Lighthouses configuration (Windows client), e.g. name, position, flash interval, flash on off RGB colors, refrence url.
  • Lighthouse show reference information in default browser (Windows client).
Pier
  • Motion Detector with Dashboard indicator start & stop time.
  • Outdoor light switch, dimmer and red, green or blue color setting.
Lightkeeper Cottage
  • Room light switch, dimmer and red, green or blue color setting.
Boathouse
  • Room light switch, dimmer and red, green or blue color setting.
Control Unit
  • Ambient Light measuring illuminance (in Lux). Depending darkness level, the Pier Outdoor Light is switched on (depending configuration setting).
  • Shutdown the Control Unit.
  • Shutdown the Control Unit via Dashboard or Micro Switch.
  • Status indicators (Trend, Alarm) for CPU °C, Dis Space Used, Memory Used
  • The Control Unit uses a Raspberry Pi 2B to control TinkerForge Bricks & Bricklets.
Weather
  • Weather Underground data every hour for the Lighthouse position and display in a browser Dashboard.
MQTT Console
  • MQTT Console for the Windows Client listing the TinkerForge MQTT messages.
Resources
Software
  • Browser Dashboard: developed with Node-RED - an open source visual programming tool by IBM.
  • The Node-RED addon Dashboard is used to control the Lighthouse58 via Browser.
  • Browser Dashboard: developed with B4J.
  • This solution runs as a Server on the Control Unit, uses the TinkerForge Brick MQTT Proxy and does not require Node-RED, but requires Java.
  • See also this post on the B4J forum.
    • Responsive design using the w3.css framework.
    • Multiple clients can control the dashboard. The state of the controls is updated in the browser for each connected client.
    • Request Weather Information from Weather Underground and display in Dialog.
    • Trigger Control Unit system check (displayed as status message in a label on each connected client) and shutdown.
    • Dialogs for showing the selected Lighthouse information and About box.
    • Server application runs on the Control Unit (Raspberry Pi). Access via Browser with URL http://ip-adress-raspberry-pi:51042.
    • Messaging based on MQTT using TinkerForge messages. No linkage with Node-RED, means the B4J solution runs without Node-RED.
    • Settings defined as a map stored in external settings file - the same file is used by the Windows Client.
    • Library TFMQTT is used to control the TinkerForge Bricklets. Libraries used: jcore,jserver,jrltfmqtt,jmqtt,json,jhttp,jstringutils,jkssh2.
Download
  • Lighthouse58 Concept (PDF format, created with Microsoft PowerPoint).
  • Windows Client B4J code (requires installation of B4J and additional libraries - see B4J source).
  • Server B4J code (requires installation of B4J and additional libraries - see B4J source).
To-Do List
  • NEW:Manage Lighthouses (add, update, delete) [Reviewed, but think to complex to realize - will probably skip].
  • NEW:Android Client (build with B4A). Status: Planned 2017.
  • UPD:Node-RED Dasboard design: for now, sticked to the standard given = keep simple. Working with Angular JS is too complex = need to learn more how to use. Status: Planned 2017.
  • UPD:Node-RED Dasboard design: explore how to integrate my favourite w3.css in ui_templates. Status: Planned 2017.
Changelog
  • 20161009: Server solution with B4J completed (see functionality).
  • 20161008: Server solution with B4J progressed (see functionality).
  • 20161006: Windows Client Dashboard completed. Started to develop the Server solution with B4J.
  • 20161001: Windows Client Dashboard developed with B4J: Enhanced with Lighthouse Configuration; Various internal improvements.
  • 20160929: Windows Client Dashboard developed with B4J: First version.
  • 20160921: Ambient Light controlling Pier Outdoor Light. Updated documentation.
  • 20160920: Reworked & enhanced the Control Unit (Status Trend&Alarm, Shutdown Micro Switch). Updated documentation.
  • 20160918: Reworked the messageing concept, out-/indoor lights switch, dimmer and color setting simplified. Updated documentation.
Lighthouse58, 2016-2017 by Robert W.B. Linn
Prototype
Control Unit
Circuit
Browser Dashboard (Node-RED)
Weather Flow & Dashboard (Node-RED)
Windows Client Dashboard (B4J)
Windows Client Dashboard (B4J) Lighthouse Configuration
Server Dashboard in Browser (B4J)