1.5.5 • Published 3 years ago
harmony-websocket v1.5.5
harmony-websocket
Websocket implementation for Harmony Hub
Getting started
const Harmony = require('harmony-websocket');
const harmony = new Harmony();
harmony.on('open', () => {
console.log('open');
});
harmony.on('close', () => {
console.log('close');
});
harmony.on('stateDigest', (data) => {
console.log(data);
});
harmony.on('automationState', (data) => {
console.log(data);
});
harmony.connect(ip)
// .then(() => harmony.getConfig())
// .then(response => console.log(response))
.then(() => harmony.getActivities())
.then(response => console.log(response))
// .then(() => harmony.getCurrentActivity())
// .then(response => console.log(response))
// .then(() => harmony.startActivity(activityId))
// .then(response => console.log(response))
// .then(() => harmony.getActivityCommands(activityId))
// .then(response => console.log(response))
// .then(() => harmony.getDevices())
// .then(response => console.log(response))
// .then(() => harmony.getDeviceCommands(DeviceId))
// .then(response => console.log(response))
// .then(() => harmony.getAutomationCommands())
// .then(response => console.log(response))
// .then(() => harmony.sendCommand('{"command":"command","type":"IRCommand","deviceId":"DeviceId"}'))
// .then(response => console.log(response))
// .then(() => harmony.sendCommandWithDelay('{"command":"command","type":"IRCommand","deviceId":"DeviceId"}', 50))
// .then(response => console.log(response))
// .then(() => harmony.sendAutomationCommand({
// "hueId" : {
// "on" : "true"
// }
// }))
// .then(response => console.log(response))
// .then(() => harmony.close())
.catch(e => console.error(e.message));
License
This project is licensed under the MIT License - see the LICENSE.md file for details
1.5.5
3 years ago
1.5.4
3 years ago
1.5.3
4 years ago
1.5.2
4 years ago
1.5.1
4 years ago
1.5.0
5 years ago
1.4.0
5 years ago
1.3.0
5 years ago
1.2.0
5 years ago
1.1.0
5 years ago
1.0.9
5 years ago
1.0.8
5 years ago
1.0.7
5 years ago
1.0.6
5 years ago
1.0.5
5 years ago
1.0.4
5 years ago
1.0.3
5 years ago
1.0.2
5 years ago
1.0.1
5 years ago
1.0.0
5 years ago