Giter VIP home page Giter VIP logo

home-manage-app's Introduction

home-manage-app

COMMANDS API

command: connector/subscribe

Descrtiption:

Subscribe prefered service (database or schedule) for notification identified by name "notification" from Device with specific "deviceID". If these notifications are for database service the device MUST first be registered in the database with database/registerDevice command. Notifications for the monitored Device shoul also be enabled!

parameters:
{ "Device": <String> , "notification": <String> , "service": <String> }

success response:
{ "command": "connector/subscribe", "status": "Ok", "result": "Subscribe Done!" }

error response:
{ "command": "connector/subscribe", "status": "ERROR", "result": "Can't subscribe for device!" }

example
{ "Device": "esp-Device", "notification": "uart/int", "service": "database"  }

command: connector/unsubscribe

Descrtiption:

Unsubscribe prefered service (database or schedule) for notification from Device with specific "deviceID".

parameters:
{ "Device": <String> , "service": <String> }

success response:
{ "command": "connector/unsubscribe", "status": "Ok", "result": "Unsubscribe Done!" }

error response:
{ "command": "connector/unsubscribe", "status": "ERROR", "result": "Can't unsubscribe for device!" }

example
{ "Device": "esp-Device", "service": "database"  }

command: connector/showSubs

Descrtiption:

Show all subscribed devices for all services. Doesn't take any parameters. The response is an array with subscription elements.

parameters:
{ }

success response:
{ "command": "connector/showSubs", "status": "OK", 
  "result": [ { "Device": <String>,
                "notification": <String>,
                "subID": <String>,
                "subService": <String>}]  }

error response:
{ "command": "connector/showSubs", "status": "ERROR", "result": "Error!" }

example
{ }

command: database/registerDevice

Descrtiption:

Register device from DeviceHive network into database service.

parameters:
{ "Device":<String>,"Class":<String>,"ClassVer":<String>,"Network":<String>}

success response:
{ "command": "database/registerDevice", "status": "OK", 
  "ressult": {"result": "Error msg or device already exists","status": "OK"}  }

error response:
{ "command": "database/registerDevice", "status": "ERROR", 
  "ressult": {"result": "Device succesfully registered!","status": "ERROR"}  }

example
{ "Device":"esp-Dev","Class":"esp_class","ClassVer":"1.0","Network":"playground"}

command: database/showDevices

Descrtiption:

Returns an array containing all the registered devices in database service.

parameters:
{ }

success response:
{ "command": "database/showDevices", "status": "OK", 
  "ressult": {"result": [ {} , {} ]}  }

example
{ }

home-manage-app's People

Watchers

James Cloos 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.