3.0.0 • Published 9 years ago

node-enocean-dimmer v3.0.0

Weekly downloads
8
License
GPL-3.0
Repository
github
Last release
9 years ago

node-enocean-dimmer

a dimmer for eltako devices (FUD14, FUD14-800 W, FUD61NP, FUD61NPN, FUD71, FSG14/1-10V, FSG71/1-10V, FSUD-230V) the dimmer implements an EEP similar to A5-38-08 (as per the Eltako documentation).
It is intended for use with node-enocean

installation

npm install node-enocean-dimmer

usage with promises

var enocean      = require("node-enocean")
var Dimmer      = require("node-enocean-dimmer");
enocean.listen( "/dev/ttyUSB0" )

enocean.on( "ready" , function( ) {
	var dimmer = new Dimmer( enocean , process.argv[ 2 ]  )
	dimmer.speed = "80"
	switch( process.argv[ 3 ] ) {
	case "teach" :
		dimmer.teach( ).then(enocean.close)
	break
	case "off":
		dimmer.off( ).then(enocean.close)
	break
	default:
		dimmer.setValue( process.argv[ 3 ]).then(enocean.close)
	break;
	}
})

usage with async await

var enocean      = require("node-enocean")
var Dimmer      = require("node-enocean-dimmer");
enocean.listen( "/dev/ttyUSB0" )

enocean.on( "ready" , async function( ) {
	var dimmer = new Dimmer( enocean , process.argv[ 2 ]  )
	dimmer.speed = "80"
	switch( process.argv[ 3 ] ) {
	case "teach" :
		await dimmer.teach( )
	break
	case "off":
		await dimmer.off( )
	break
	default:
		await dimmer.setValue( process.argv[ 3 ])
	break;
	}
	enocean.close()
})

the dimmer implements the following interfaces:

.setValue(x) sets the brightness level x must be in the range 0 - 100
.teach() send a learn telegram to teach in the sensor
.off() send a switch off event to the connected devices
.speed sets the dimming speed. Value must be two characters with a value between 01 and ff (hex) where 01 is fast and ff is slow.

3.0.0

9 years ago

2.2.1

10 years ago

2.2.0

10 years ago

2.1.1

10 years ago

2.1.0

10 years ago

2.0.0

10 years ago

1.1.1

10 years ago

1.1.0

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago