forty2 / haiku-senseme Goto Github PK
View Code? Open in Web Editor NEWControl SenseME enabled devices from Haiku with Node.js
License: MIT License
Control SenseME enabled devices from Haiku with Node.js
License: MIT License
I have three L series fans which I updated recently via the iOS app. I'm unable to read some basic properties from them.
bigAssApi = require("haiku-senseme");
bigAssApi.SenseME
.on('founddevice', dev => {
console.log(`Found:\n name ${dev.name}\n id ${dev.id}\n type ${dev.type}\n i
p ${dev.ip}`);
console.log(` fan power: ${dev.fan.power.value}`);
console.log(` fan speed: ${dev.fan.speed.value}`);
console.log(` light power: ${dev.light.power.value}`);
console.log(` light brightness: ${dev.light.brightness.value}`);
})
.on('lostdevice', dev => {
console.log(`Lost: ${dev.name}`);
})
.discover();
Produces
$ node example.js
server listening 0.0.0.0:31415
Found:
name Fan
id 20:F8:5E:D3:54:88
type FAN,LSERIES
ip 192.168.7.78
fan power: undefined
fan speed: NaN
light power: undefined
light brightness: NaN
Found:
name Fan
id 20:F8:5E:E8:85:9F
type FAN,LSERIES
ip 192.168.7.105
fan power: undefined
fan speed: NaN
light power: undefined
light brightness: NaN
name Fan
id 20:F8:5E:F2:4C:E6
type FAN,LSERIES
ip 192.168.7.116
fan power: undefined
fan speed: NaN
light power: undefined
light brightness: NaN
I'm not sure if I'm using the module correctly, or if the update has broken this module, or something else.
$ node --version
v6.10.3
$ npm install haiku-senseme --save
npm WARN saveError ENOENT: no such file or directory, open '/home/pi/haiku-sense-me/package.json'
/home/pi/haiku-sense-me
└── [email protected]
npm WARN enoent ENOENT: no such file or directory, open '/home/pi/haiku-sense-me/package.json'
npm WARN haiku-sense-me No description
npm WARN haiku-sense-me No repository field.
npm WARN haiku-sense-me No README data
npm WARN haiku-sense-me No license field.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.