0.27.0 • Published 4 years ago

@open-controller/lib v0.27.0

Weekly downloads
-
License
GPL-3.0-only
Repository
github
Last release
4 years ago

codecov GitHub Workflow Status Github Releases Downloads GitHub package.json version

Open Controller Lib

A library used to represent Open Controller homes for Open Controller clients. It is designed to retain all information in JSON form, for portability.

// structure

                                       _______________________
                                       |        Device       |     
House->Room[]->Controller[]->Widget[]->| Action|DynamicValue |
                                       |                     |
                                       -----------------------

// usage

 const device = new Device({
       name:"testDevice",
       actions:[
          new HttpAction({
               name:"on",
               method:"GET",
               base:"http://device.ip/",
               path:"turnOn"
           })
       ]
 })
 
 const controller = new Controller({
     name:"Test Controller",
     layout:[
       <Button action={device.getAction("on")} icon="power-on"/>
       //OR
       //new Button({
       //    action:device.getAction("on"),
       //    icon:"power-on"
       //})
    ]
})

const room = new Room({name:"Test Room",controllers:[controller]})
new House({name:"Test House",rooms:[room]})

// building

yarn
yarn build

// contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests and docs as appropriate.

Commit messages should follow the Conventional Commit Spec

// license

GPL-3.0

0.27.0

4 years ago

0.26.0

4 years ago

0.25.1

4 years ago

0.25.0

4 years ago

0.24.1

4 years ago

0.24.0

4 years ago

0.23.0

4 years ago

0.22.0

4 years ago

0.21.0

4 years ago

0.19.0

4 years ago

0.20.0

4 years ago

0.18.0

4 years ago