This is an experimental project while learning the Aurelia framework and its capabilities.
The app offers a UI to control the Philips Hue lights.
The application uses the excellent Aurelia Framework and uses the default Aurelia-CLI code setup.
For state management I used the awesome Redux, integrated with Aurelia with few facilities provided by the aurelia-redux-plugin. You will find all that in the code.
The communication with the Hue Bridge uses the jsHue library, which provides convenient methods to interact with the bridge.
During development, we use the SteveyO Hue Emulator to simulate the bridge device.
Clone the repository and from the project folder run:
npm install
You will need the Java Runtime Environment installed on your machine to run the emulator. To check if you have java installed open a terminal window and run:
java --version
If you get the version number output, you are ready to go, otherwise follow the next steps to install the JRE.
You will need to install the Java JRE in your environment to run the Java-based emulator. You don't need the JDK; just the JRE should do.
This installation step is only necessary the very first time.
Once you have Java JRE sorted, you can go into your project folder and run:
npm run emulator
The HUE emulator should start. You need to click the Start button in the emulator window.
The default configuration will make the emulator API endpoints available on http://localhost:8000
.
To run the app, open a new terminal window and from the project root run:
npm start
This command will initiate the build provided out of the box with the Aurelia-CLI. Once completed, the app will be available at http://localhost:9000.
You need to be running the emulator and click the Start button before you can browse the app.
The app uses the jsHue library. There is nothing to install about this, but if you want to generate the documentation for the library follow these steps.
- Build the documentation with:
npm run docs:build
- Serve the documentation with:
npm run docs:serve
- Browse the documentation at the URL shown in the console, usually http://localhost:8080
Happy Coding!