public void sendValue(int nodeId, int endpoint, int value) {
		ZWaveNode node = this.getNode(nodeId);
		ZWaveSetCommands zwaveCommandClass = null;
		SerialMessage serialMessage = null;
		
		for (ZWaveCommandClass.CommandClass commandClass : new ZWaveCommandClass.CommandClass[] { ZWaveCommandClass.CommandClass.SWITCH_MULTILEVEL, ZWaveCommandClass.CommandClass.SWITCH_BINARY, ZWaveCommandClass.CommandClass.BASIC }) {
			zwaveCommandClass = (ZWaveSetCommands)node.resolveCommandClass(commandClass, endpoint);
			if (zwaveCommandClass != null)
				break;
		}
		
		if (zwaveCommandClass == null) {
			logger.error("No Command Class found on node {}, instance/endpoint {} to request level.", nodeId, endpoint);
			return;
		}
			 
		serialMessage = node.encapsulate(zwaveCommandClass.setValueMessage(value), (ZWaveCommandClass)zwaveCommandClass, endpoint);
		
		if (serialMessage != null)
			this.sendData(serialMessage);
		
		// read back level on "ON" command
		if (((ZWaveCommandClass)zwaveCommandClass).getCommandClass() == ZWaveCommandClass.CommandClass.SWITCH_MULTILEVEL && value == 255)
			this.requestValue(nodeId, endpoint);
	}
public void sendValue ( int nodeId , int endpoint , int value ) { ZWaveNode node = this . getNode ( nodeId ) ; ZWaveSetCommands zwaveCommandClass = null ; SerialMessage serialMessage = null ; for ( ZWaveCommandClass . CommandClass commandClass : new ZWaveCommandClass . CommandClass [ ] { ZWaveCommandClass . CommandClass . SWITCH_MULTILEVEL , ZWaveCommandClass . CommandClass . SWITCH_BINARY , ZWaveCommandClass . CommandClass . BASIC } ) { zwaveCommandClass = ( ZWaveSetCommands ) node . resolveCommandClass ( commandClass , endpoint ) ; if ( zwaveCommandClass != null ) break ; } if ( zwaveCommandClass == null ) { logger . error ( "No Command Class found on node {}, instance/endpoint {} to request level." , nodeId , endpoint ) ; return ; } serialMessage = node . encapsulate ( zwaveCommandClass . setValueMessage ( value ) , ( ZWaveCommandClass ) zwaveCommandClass , endpoint ) ; if ( serialMessage != null ) this . sendData ( serialMessage ) ; if ( ( ( ZWaveCommandClass ) zwaveCommandClass ) . getCommandClass ( ) == ZWaveCommandClass . CommandClass . SWITCH_MULTILEVEL && value == 255 ) this . requestValue ( nodeId , endpoint ) ; }
Send value to node.
@param nodeId the node Id to send the value to.
@param endpoint the endpoint to send the value to.
@param value the value to send