Git Product home page Git Product logo

homenet-core's Introduction

Homenet Core

How to Use

...

Available Services

scene

Provides information on the available scenes, allows controlling and retrieving the currently active scene.

Scenes should be defined in the configuration.

Properties:

  • current:Object - Gets the current scene details
  • currentId:String - Gets the string name (ID) of the current scene
  • scenes:Array[Object] - Gets all of the available scenes

Methods:

  • set(id:String) - Set (change) the active scene by specifying the new ID
  • on(event:String, cb:Function) - Specify an event handler for the specified event (see below for events)
  • onChanged(cb:Function) - Specify an event handler for the 'changed' event

Events:

  • changed:Scene - fired when a scene changes

presence

Monitors for the presence of a device, person, zone or device.

Monitored items should be defined in the configuration.

Methods:

  • on(event:String, cb:Function) - Specify an event handler for the specified event (see below for events)

Events:

  • presence:Presence - Fired when the presence of a particular item is changed
  • {id}:Boolean - Fired when the presence of an item is changed, where {id} is the .id of the item being monitored

Note: both events will be fired. Use presence to listen for all events, or the ID to listen for the presence of a particular item.

zone

Provides information and access to the available zones.

Zones should be defined in the configuration.

Properties:

  • zones:Array[Zone] - Returns all available zones

Methods:

  • getZone(id:String) - Gets a specific zone specified by the ID

storage

Methods:

Both methods return a Q promise that resolve when the task is complete.

  • get(key:String):Promise[Object]
  • set(key:String,value:Object):Promise

logger

Methods:

  • getLogger(context:String):Logger - Gets a logger for the specified context

Models

Scene

tbd

Presence

{
    id: String,
    present: Boolean,
    category: String // person|device|zone|media
}

Logger

Methods:

  • log
  • info
  • warn
  • error
  • debug

homenet-core's People

Contributors

denwilliams avatar

Watchers

 avatar  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.