Skip to content
This repository has been archived by the owner on Aug 6, 2018. It is now read-only.

AoLab/JLamp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

18.20 Plug

Introduction

This project contains web service functions required for turning the lamps on and off.

How to ...

Note for eclipse users

Because this project uses oracle sun related java packages it's access by default is disabled and the autocompletion does not appear. In order to fix this problem visit this stackoverflow question. Second Answer :)

REST API

OnI Request [Depricated]

Turn the lamp on for the specified interval

  • URL: /lamp/OnI
  • Method: POST
  • JSON params:
Parameter Value Description
id String[2] the id of the destination lamp
command Integer the interval in which lamp is on

Turn Request

Turn the lamp on or off generally (No interval specified)

  • URL: /lamp/turn
  • Method: POST
  • JSON params:
Parameter Value Description
id String[2] the id of the destination lamp
status Boolean true for on and false for off
  • Success response : Code: 200

  • Error response :

    Status codes Description
    400 Bad Request The specified parameters are not valid
    404 Not Found The specified path was not found
    501 Not Implemented The specified method was not valid

Boot Request

Boot the system and connect 18.20-Plug into Kaa

  • URL: /lamp/boot
  • Method: POST

Status Request

Get status of Lamp

  • URL : /lamp/status

  • Method : POST

  • JSON params :

    Parameter Value Description
    id string Target lamp identificaiton
  • Success response : Code: 200

  • Error response :

    Status codes Description
    400 Bad Request The specified parameters are not valid
    404 Not Found The specified path was not found
    501 Not Implemented The specified method was not valid

Contributors

Releases

No releases published

Packages

No packages published

Languages