User interface of the monitor that controls some components of the Deep-Performance Dwelling.
Ensure you install these modules globally on your development machine:
Once you checked out this project, run this command in a Terminal window:
npm install
-
Run this command in a Terminal window:
webpack -d
-
Open a browser and load
index.html
file in thewww
directory.
Before deploying the monitor interface to the Raspberry Pi, ensure that the project is built locally:
-
Check out the project from the repository
-
Follow the following instructions of the Local development section above:
b. Installation
-
Run this command in a Terminal window:
webpack
. It will compile the interface assets into the appropriate directory.
Once you ensured that you have a build of the project, run this command in a Terminal window:
npm run package
In the case where there is no build, the command will fail.
The command above archive a .zip
file of the necessary assets into the assets/archives/
directory. The .zip
file is always appended with the date at which the file is created.
This archive is what needs to be deployed to the Raspberry Pi.
There are a few ways to deploy files onto the Raspberry Pi, however the most efficent one would be to use the scp
Unix command in a Terminal.
scp <local-file> <username>@<ip>:<remote-path>
Let's show an example. Let's assume the following:
- The Terminal window is opened from the root of the project directory;
- The Pi IP address is
10.10.10.10
; - The Pi credentials are still at the default settings*:
- Username:
pi
- Password:
raspberry
- Username:
The command would then read
scp assets/archives/dpd-monitor-2017-07-24.zip [email protected].:/home/pi/www
If the Terminal prompts for a password, use the one associated with the username.
* For security reasons, these credentials should be changed for a production environment.
From this point it's a simple matter of unarchiving the .zip
file in the /home/pi/www
directory of the Pi.