egch / house-automation-js

A JavaScript application simulating house automation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

house-automation-js

A JavaScript application simulating house automation.

Requirements

A JavaScript application simulating house automation: pressing a button on a control panel would visually turn on a light, change the temperature or close the curtains. Some constraints:

  • Frameworks like React, Angular, Vue etc MUST NOT be used. Create your own architecture
  • You are allowed to use / create a build system. ES6 and Typescript are permitted
  • the solution has to be extensible and documented, so that we can develop our own components that react to events. The application will be executed on a plain HTTP server with no possibility to run code server side and is being viewed in 2 major browsers of your choice.

Description

This application has been built using plain Vanilla JS.

In order to have a decent layout the Bootstrap template has been used.

The application simulates the control of the ligths and temperatures in four rooms numerated from 1 to 4. Extensions are allowed by modifying the index.html file, i.e. introducing a new room or a new device to be monitored (for instances door or curtains.)

Third-party libraries

  • Bootstrap: Build responsive, mobile-first projects on the web with the world’s most popular front-end component library.

Setup

This application can be hosted on a plain HTTP server. I tested the application with Chrome using python as an HTTP server. The application can be seen online here

Download source code

The source code can be downloaded (zip) from here.

References/Acknowledgments

About

A JavaScript application simulating house automation

License:Apache License 2.0


Languages

Language:HTML 93.5%Language:JavaScript 6.5%