Skip to content

internet-of-shit/makeshift-node-iot-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Makeshift Node Iot Backend

This nodejs express app provides a simple yet powerful way to create a Iot Input&Output backend in minutes.

You only need to configure the default configuration for your project (in an intuitive yaml file) and it will automatically create a simple HTTP-Server with all nessesary endpoints and on top a WebSocket, which will receive changes on the configuration in a blink of an eye!

Getting started

npm install

npm start

Configuration

Your project can be defined in a /config.yml. You can modify the /sample.config.yml or use it as reference. This will be the default configuration of your project. With POST Endpoints these configurations can be changed by your devices.

# simple on / off logic
# controllable via endpoint: HTTP GET & POST /lamp1, resp. /lamp2
lamp1: true
lamp2: true

# nested objects
# controllable via endpoint: HTTP GET & POST /livingroom/lamp, resp. /kitchen/lamp
livingroom:
  lamp:
    brightness: 0.5
    power: true
  window: false
kitchen:
  lamp: false
  window: false

# you also can utilize datatypes
# controllable via endpoint: HTTP GET & POST /volume, etc..
volume: 0.1
brightness: 100
status: "online"

You'll also find a .env.sample which (after you renamed it to .env) basicly allows you to change the ports of your project and define other sensitive configurations.

Usecases

Raspberry Pi (a.k.a Homeserver Variant)

Hosting it (a.k.a having it "in the Cloud")

  • Might need to fork it and make your changes for configuraitons
  • You can use services like Heroku to host this app. (Free-Tier should be sufficient enough)
  • Connect devices via the internet with http://myiotbackend.herokuapp.com

Progress

  • configuration via yaml
  • build & retrieve current configuration via HTTP GET requests
  • create WebSocket, list connected devices, send current configration to connected devices
  • change current configuration via HTTP POST & PATCH requests
  • notify connected devices via WebSocket on changes
  • simple access-key-based authentification
  • persistent changed configuration (save current configuration to file system)

About

Create a simple I/O Iot backend with just a config file

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published