https://github.com/jonathanvdc/smarthomeweb
https://github.com/jonathanvdc/smarthomeweb
Last synced: 14 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/jonathanvdc/smarthomeweb
- Owner: jonathanvdc
- Created: 2016-02-11T10:37:25.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-05-17T21:05:38.000Z (about 10 years ago)
- Last Synced: 2025-03-02T07:51:40.788Z (over 1 year ago)
- Language: Python
- Size: 16.6 MB
- Stars: 0
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SmartHome website
Project for the 2015–2016 *Programming Project Databases* course at the University of Antwerp.
## Build Status
[](https://travis-ci.org/jonathanvdc/smarthomeweb)
## Team
* Sibert Aerts
* Ken Bauwens
* Pieter Hendriks
* Jonathan Van der Cruysse
* Mauris Van Hauwe
## Getting SmartHomeWeb up-and-running
### Prerequisites
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, or `mcs` for Mono.
* An MSBuild-compatible build system: `msbuild` for the .NET framework, or `xbuild` for Mono.
* A Python interpreter.
* The `requests` Python module.
* SQLite3.
* The NuGet package manager.
#### Windows
Recent versions of Windows ship with the .NET framework pre-installed. `csc` and `msbuild` are bundled with Visual Studio.
#### Linux
On Debian-based Linux distributions, punching in the following command should install Mono, `xbuild`, `mcs`, `sqlite3`, the `requests` module, and the NuGet package manager:
```bash
$ sudo apt-get install mono-complete mono-devel sqlite3 python-requests nuget
```
[Install Mono on Linux](http://www.mono-project.com/docs/getting-started/install/linux/) provides a more detailed guide on how to install Mono.
#### Mac OS X
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.
### Step one: compiling SmartHomeWeb
#### Windows
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.
```bash
$ nuget restore backend\SmartHomeWeb\SmartHomeWeb.sln
$ msbuild /p:Configuration=Release backend\SmartHomeWeb\SmartHomeWeb.sln
```
#### Mono
Analogous to the Windows shell command:
```bash
$ nuget restore backend/SmartHomeWeb/SmartHomeWeb.sln
$ xbuild /p:Configuration=Release backend/SmartHomeWeb/SmartHomeWeb.sln
```
### Step two: initializing the database
The following command should fill the database nicely, where `30` is the number of days you'd like to generate measurements for:
```bash
$ 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`.
### Step three: running the server
The server can be started with the following command:
Windows:
```bash
$ backend\SmartHomeWeb\SmartHomeWeb\bin\Release\SmartHomeWeb.exe
```
Mono:
```bash
$ 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.
```bash
$ fuser -k -n tcp 8088
```