Code Monkey home page Code Monkey logo

smarthome's Introduction

SmartHome

SmartHome is a edge computing project applied to smart houses to test and compare performances between edge solution and traditionnal cloud computing solutions. This was realized for a course at the UQAC (University of Quebec at Chicoutimi) by : Timothée Corsini, Damien LIEHN and Thomas PIOT.

The project is composed of 3 applications :

  • The sensors are Python applications that can generate simulated data and send them to a server to be processed. Sensors are also able to turn on/off some of simulated equipment (heat, clim).
  • The Edge Server Application is a REST API in C# with ASP.NET Core 3 wich can receive HTTP requests. This application is made to process data received from sensors and to send statistics to the Cloud Server Application when asked.
  • The Cloud Server Application is a Python application that can get statistics from the Edge Server Application.

Setup the applications

Setup Edge Application Edge Workflow

The Edge Application is the central one, without this application, all other applications won't work because each of them interact with the edge server. To setup this application, you should install ASP.NET Core 3, then follow these steps :

  1. Run dotnet restore to install all dependencies
  2. Install PostgreSQL 9 (or above)
  3. Create a postgres database called edge
  4. Run the SQL script into your new database
  5. Copy/Paste the appSettings.json configuration file and rename the copy appSettings.Production.json
  6. Change the ConnectionString by replacing connection information
  7. Run dotnet publish --configuration Release
  8. Run dotnet run bin/Release/netcoreapp3.1/Edge.dll

On Windows you can also run directly the application using Visual Studio (Skipping step 7 and 8). Simply open the .sln project file, setup the database and run the application. If done correctly, you should see a web interface (Swagger) to test the API. By the way, at step 5 you should rename the file appSettings.Development.json if you're running under Visual Studio.

Setup Cloud Application Cloud Workflow

Follow these steps to run Cloud Application :

  1. Install PostgreSQL 9 (or above)
  2. Create a postgres database called cloud
  3. Download and install Python 3 (3.6 or above is highly recommended)
  4. Run pip install -r requirements.pip
  5. Run python main.py (i.e. run the main.py script)

Setup Sensors Sensors Workflow

Follow these steps to run Sensors :

  1. Download and install Python 3 (3.6 or above is highly recommended)
  2. Run pip install -r requirements.pip
  3. Run python main.py (i.e. run the main.py script)

smarthome's People

Contributors

tcorsini avatar tfchdj avatar ttgc avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.