Project for the 2015–2016 Programming Project Databases course at the University of Antwerp.
- Sibert Aerts
- Ken Bauwens
- Pieter Hendriks
- Jonathan Van der Cruysse
- Mauris Van Hauwe
To get SmartHomeWeb to work, you'll need the following:
- A CLR implementation. We recommend .NET on Windows and Mono on Linux/Mac.
- A C# 6.0 compiler: a recent version of
csc
for the .NET framework, ormcs
for Mono. - An MSBuild-compatible build system:
msbuild
for the .NET framework, orxbuild
for Mono. - A Python interpreter.
- The
requests
Python module. - SQLite3.
- The NuGet package manager.
Recent versions of Windows ship with the .NET framework pre-installed. csc
and msbuild
are bundled with Visual Studio.
On Debian-based Linux distributions, punching in the following command should install Mono, xbuild
, mcs
, sqlite3
, the requests
module, and the NuGet package manager:
$ sudo apt-get install mono-complete mono-devel sqlite3 python-requests nuget
Install Mono on Linux provides a more detailed guide on how to install Mono.
The server has not been tested on Mac OS X, so we can't certify it for that platform. Due to OS X's similarity to Linux, however, running it on Mac OS X may be worth a try.
One option is opening SmartHomeWeb backend/SmartHomeWeb/SmartHomeWeb.sln
in the Visual Studio GUI, and compiling it in Release mode from there. Alternatively, you can issue the following commands.
$ nuget restore backend\SmartHomeWeb\SmartHomeWeb.sln
$ msbuild /p:Configuration=Release backend\SmartHomeWeb\SmartHomeWeb.sln
Analogous to the Windows shell command:
$ nuget restore backend/SmartHomeWeb/SmartHomeWeb.sln
$ xbuild /p:Configuration=Release backend/SmartHomeWeb/SmartHomeWeb.sln
The following command should fill the database nicely, where 30
is the number of days you'd like to generate measurements for:
$ python init-db.py 30
An alternate approach would be to manually create a database (from a database dump, or
from backend/database/smarthomeweb.sql
), and move it to backend/database/smarthomeweb.db
.
The server can be started with the following command:
Windows:
$ backend\SmartHomeWeb\SmartHomeWeb\bin\Release\SmartHomeWeb.exe
Mono:
$ mono ./backend/SmartHomeWeb/SmartHomeWeb/bin/Release/SmartHomeWeb.exe
Note: it is imperative that you run these commands from the project's top-level folder. For example, it is unlikely that running mono SmartHomeWeb.exe
from backend/SmartHomeWeb/SmartHomeWeb/bin/Release
will work.
Pro tip: the server uses port TCP port 8088 for all of its communication, so it can be killed by the command below if its process is accidentally detached from the current terminal.
$ fuser -k -n tcp 8088