Giter Club home page Giter Club logo

opensmarthub's Introduction

#OpenSmartHub

##One hub to rule them all

Home automation is a growing space and every device has it's own way to interact with it. This allows you combine them, make new ones and let your home handle itself based on your preferences automatically.

Imagine this you're sitting at home on your sofa and it gets way too warm due to the afternoon sun shining through your window. No need to get up, because your window begins to open by itself in order to cool it down. An hour later it starts to drizzle (a summer storm) but luckily your smart hub knew that would happen and it closed your windows for you!

That's just one example of what the OpenSmartHub could do for you. The great thing about it is that you can add any device to be automated through the hub! Imagine automating your home lighting, water heaters, sprinklers, etc. based on your movement, usage, time of day, and weather. Your regular home can now become a smart home!

##How it works It uses Azure Websites, a local hub device (can be anything that runs Node.js), any of your smarthome or self-made devices, and WeatherUnderground API.

####The Azure Website:

  • This will act as a cloud based UI that can be accessed from anywhere given the right authentication credentials.
  • It is built using Node.js, Express, and Socket.io to provide a simple UI. None of which needs to be fiddled with just to use it.
  • This portion is optional and can also be run from the Local Hub Device if you don't care about access when outside your home network.

####Local Hub Device

  • Can be an old PC, Raspberry Pi, or Intel Edison. (Just needs to be able to run a Node.js application)
  • This will need to always stay on in order to interact with your devices and the cloud. (Which is why I suggest a small footprint machine like the Raspberry Pi)

####Devices

  • These are your smart home devices. They can be anything from a NEST thermostat, WeMo switches, SmartThings devices, or even your own self-made projects.

###How is it different? There are other open source automation projects but the key to the OpenSmartHub is that it is designed to be simple yet you can control every part! Easily follow step by step directions to get it set up and contribute!

##Get Started Using It

##Supported Devices

###Currently Supported Devices:

  • Spark maker projects (Button, Motion, RGB Strip)
  • WeMo
  • WeatherUnderground APIs for local astronomical and weather forecasts
  • Clock for time related triggers and data
  • Z-Wave Devices (With a USB Z-Wave Adapter)
  • Yamaha Receivers

###Near Future:

  • Amazon Echo

Want to see a device supported? You have the power to add it yourself!

##Device Creation Guidelines

##Gritty Details

###Config File contains:

Device Type Library - [Dictionary]

Name of type - [String]
Device Type - [Object]
  * Array of Parameter Types for creation - (Array of strings in order with int-, double-, bool-, etc. prefixed)
  * Data - [Dictionary]
    * Data -> {"name":"type"}
  * Triggers - [Dictionary]
    * Trigger -> {"name":[params]}
  * Actions - [Dictionary]
    * Action -> {"name":[params]}

Your Devices - [Dictionary]

Name your device - [String]
Device - [Object]
  * Device Type - [String] -> Links to an entry in the Device Type Library
  * Dictionary of parameters for creation of device (keys match the param types in the DeviceType)

Your Scenarios - [Array]

Scenario - [Object]
  * Description of Scenario - [String]
  * Trigger - [A single Trigger structure](Future: multiple triggers together)
    * Trigger: {device: "deviceName", trigger:"triggerName", customTrigger:"customTriggerName" params:{}}
  * List of Actions to perform - [Array of Action structures]
    * Action: {device: "deviceName", action: "actionName", params:{}}

###The result of the creation process using the config file above: Running Devices: Dictionary of your devices

* Custom name for device - [String]
* Device - [Object] created using the details from the config file
  * Dictionary of actions
    * name: "actionName", action: var representation of action
  * Dictionary of triggers
    * name: "triggerName"

Running Scenarios: Dictionary of your scenarios

* Custom name for scenario - [String]
* ID -> created from device.on("event") trigger function {
        builds the actions at runtime by looking at the config for the list of actions, the device and function (maps the device function), and the parameters
    }

Triggers can be made using a on("event") with a check inside (if statement that emits an event of special-naming when it is valid)

##Version History

##Links to Supporting Modules

opensmarthub's People

Contributors

anthony-ngu 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.