Library for free@home local device api
This api is unstable.
Npm packages for this project are available here.
To install this packages run:
npm install @busch-jaeger/free-at-home
The Documentation of this project is available here.
import { FreeAtHome } from '@busch-jaeger/free-at-home';
const freeAtHome = new FreeAtHome();
freeAtHome.activateSignalHandling();
async function main() {
const virtualSwitch = await freeAtHome.createSwitchingActuatorDevice("123switch", "Virtual Switch");
virtualSwitch.setAutoKeepAlive(true);
virtualSwitch.setAutoConfirm(true);
virtualSwitch.on('isOnChanged', (value) => {
console.log("switch state is:", (value) ? "on" : "off");
});
}
main();