This Dezyne example is Martin Keesen’s submission for the Dezyne Challenge 2018.
The goal of this project is to create a Proof of Concept (POC) for Real Estate illumination, generate Python code from Dezyne models and deploy it to Raspberry Pi.
Light show to attract attention
Cost effective solution
Light show examples:
Patterns have the following possibilities:
Up to MaxLamps lamps
Up to MaxSteps steps
Each step can set Color of up to MaxLamps lamps
Color can be any of the colors possible within Hue system
Separate models for every possible part of the system
Interface and component models in separate files
Handles events Start System, Stop System, Heartbeat, Button trigger and all WebUI generated events
Starts and stops RaspBerry, Scheduler, Hue and WebUI
Relays Button trigger from RaspBerry to Scheduler
Relays Heartbeat to RaspBerry and Scheduler
Relays WebUI generated events to Scheduler and WebUI
Note: underscores in name used to make the component shown wider
Controls LEDs and button on RaspBerry PI.
Controls LEDs on RaspBerry PI, toggles it based on heartbeat, step_indicator.
Polls button to provide trigger for scheduler.
Instruct Hue to send light commands based on selected pattern
Support starting, stepping and stopping of schedule execution
Provides step trigger to Scheduler
Supports longer/shorter trigger intervals
Handles content of web pages used to control the system
Handles Flask webserver
Component to control Hue system
Provides IP address from store or from pinging an IP address range
Supports authentication sequence for Hue system
Instruct HueAddress to obtain IP address of Hue system.
Instruct HueAuthenticate to perform authentication of Hue system.
Obtains IP address (if available) from storage.
When storage contains no IP address scans IP range and pings addresses.
Handles authentication of Hue system.
When Hue system is connected and authenticated sends light commands to the Hue system
Below is the overview of HueDezyne project:
Dezyne generated code is stored in the Production/dzn directory.
Directory Production/hal contains system support code and the pattern files:
You can find some videos showing the behaviour of the system as it runs on a Raspberry Pi here:
Note that all of the diagrams included in this document have been produced in and exported from Dezyne. The System View and State Charts are part of the Dezyne editor. The Sequence Trace has been produced using the Dezyne simulation engine.
Enjoy this article? Don't forget to share.
Verum Software Tools BV
Laan van Diepenvoorde 6
5582 LA Waalre
Tel: +31 40 235 9090