Search in sources :

Example 1 with ZWaveNodeNamingCommandClass

use of org.openhab.binding.zwave.internal.protocol.commandclass.ZWaveNodeNamingCommandClass in project openhab1-addons by openhab.

the class ZWaveNode method setLocation.

/**
     * Sets the node location.
     * If Node Naming Command Class is supported set location in the device,
     * else set it in locally in the binding
     *
     * @param location the location to set
     */
public void setLocation(String location) {
    ZWaveNodeNamingCommandClass commandClass = (ZWaveNodeNamingCommandClass) getCommandClass(CommandClass.NODE_NAMING);
    if (commandClass == null) {
        this.location = location;
        return;
    }
    SerialMessage m = commandClass.setLocationMessage(location);
    this.controller.sendData(m);
    m = commandClass.getLocationMessage();
    this.controller.sendData(m);
}
Also used : ZWaveNodeNamingCommandClass(org.openhab.binding.zwave.internal.protocol.commandclass.ZWaveNodeNamingCommandClass)

Example 2 with ZWaveNodeNamingCommandClass

use of org.openhab.binding.zwave.internal.protocol.commandclass.ZWaveNodeNamingCommandClass in project openhab1-addons by openhab.

the class ZWaveNode method setName.

/**
     * Sets the node name.
     * If Node Naming Command Class is supported set name in the device,
     * else set it in locally in the binding
     *
     * @param name the name to set
     */
public void setName(String name) {
    ZWaveNodeNamingCommandClass commandClass = (ZWaveNodeNamingCommandClass) getCommandClass(CommandClass.NODE_NAMING);
    if (commandClass == null) {
        this.name = name;
        return;
    }
    SerialMessage m = commandClass.setNameMessage(name);
    this.controller.sendData(m);
    m = commandClass.getNameMessage();
    this.controller.sendData(m);
}
Also used : ZWaveNodeNamingCommandClass(org.openhab.binding.zwave.internal.protocol.commandclass.ZWaveNodeNamingCommandClass)

Aggregations

ZWaveNodeNamingCommandClass (org.openhab.binding.zwave.internal.protocol.commandclass.ZWaveNodeNamingCommandClass)2