IOTDB Bridge for TCP (Connected Lights)
See the samples for details how to add to your project.
All the clever bits of connecting to TCP Lighting come from here:
- https://github.com/stockmopar/connectedbytcp
- http://home.stockmopar.com/connected-by-tcp-unofficial-api
- http://home.stockmopar.com/updated-connected-by-tcp-api/
Then:
$ npm install -g homestar ## may require sudo
$ npm install homestar-tcp
$ homestar configure homestar-tcp
Set the light to half-bright
const iotdb = require('iotdb')
const things = iotdb.connect("TCPConnectedLight")
things.set(":brightness", 50)
e.g.
{
"on": true,
"brightness": 75
}