// General Topic Pattern = (zwave)/(your node)/(Command Class name)/(Endpoint)/various Examples are using ZUI Gateway parameters "Named Topic", "Values Only" & "Exclude Location" ------------------ // Thermostats: There will be differences based on make and model // HA "climate" configs not supported -- see OH Docs 1) // Thermostat Modes (zwave/nodeID_xx/thermostat_mode) Fan Mode (/thermostat_fan_mode) // Mqtt Number channels - id: Main_Floor_Thermostat_Mode channelTypeUID: mqtt:number label: Main Floor Thermostat Mode description: Mode configuration: commandTopic: zwave/Thermostat-62/thermostat_mode/endpoint_0/mode/set formatBeforePublish: "%.0f" stateTopic: zwave/Thermostat-62/thermostat_mode/endpoint_0/mode --- ** Thermostat Mode Metadata-State description 0=Off 1=Heat 2=Cool ------------------ 2) // Thermostat Status (zwave/nodeID_xx/thermostat_operating_state) // Optional: Fan Status (/thermostat_fan_state) // Mqtt Number channels - id: Main_Floor_Thermostat_Status channelTypeUID: mqtt:number label: Main Floor Thermostat Status description: Status configuration: stateTopic: zwave/Thermostat-62/thermostat_operating_state/endpoint_0/state --- ** Thermostat Status Metadata-State description 0=Idle 1=Heating 2=Cooling ------------------ 3) // Thermostat Setpoints (zwave/nodeID_xx/thermostat_setpoint) // Heating = "setpoint/1" Cooling (if applicable) = setpoint/2 // Mqtt Number channels - id: Main_Floor_Heating_Setpoint channelTypeUID: mqtt:number label: Main Floor Heating Setpoint description: Heating Setpoint configuration: unit: °F min: 60 formatBeforePublish: "%.0f" max: 70 commandTopic: zwave/Thermostat-62/thermostat_setpoint/endpoint_0/setpoint/1/set stateTopic: zwave/Thermostat-62/thermostat_setpoint/endpoint_0/setpoint/1 - id: Main_Floor_Cooling_SetPoint channelTypeUID: mqtt:number label: Main Floor Cooling SetPoint description: Cooling SetPoint configuration: unit: °F min: 70 formatBeforePublish: "%.0f" max: 80 commandTopic: zwave/Thermostat-62/thermostat_setpoint/endpoint_0/setpoint/2/set stateTopic: zwave/Thermostat-62/thermostat_setpoint/endpoint_0/setpoint/2 ------------------ // Door and Window Alarms (zwave/nodeID_xx/notification) // Mqtt Contact Channels (problem with HA config) --- - id: Garage_Door channelTypeUID: mqtt:contact label: Garage Door Status description: Door configuration: stateTopic: zwave/Door-128/notification/endpoint_0/Access_Control/Door_state_simple transformationPattern: MAP:door.map --- ** Door.map 22=OPEN 23=CLOSED ------------------ // Dimmers (zwave/nodeID_xx/switch_multilevel) // Mqtt Dimmer channels // NOTE: ZUI uses "0" to "99" (full brightness) Rules may need to be adjusted // .sendCommand(100) will not work, nor will "If item=100", etc. --- - id: Office_Lights channelTypeUID: mqtt:dimmer label: Office Lights description: Dimmer configuration: commandTopic: zwave/Lights-2/switch_multilevel/endpoint_0/targetValue/set stateTopic: zwave/Lights-2/switch_multilevel/endpoint_0/currentValue ------------------ // Scene Control (zwave/nodeID_xx/central_scene) // NOTE: Not retained-use Mqtt string channel to avoid null warning with blank // (Options are 0 = 1 press, 1 = press and hold, or blank = default) // Mqtt string channels - id: Key_Fob_Scene_one_Text channelTypeUID: mqtt:string label: Key Fob Scene One Text description: Scene configuration: stateTopic: zwave/Controller-8/central_scene/endpoint_0/scene/001 --- ** Example DSL rule rule "Keyfob button square press-zwave-js-ui" when Item JSUI_Channels_Key_Fob_Scene_One_Text changed to "0" then var onoff = NookLights6_Dimmer.state as Number if( onoff !=99 ) { NookLights6_Dimmer.sendCommand (99) } // Note use of Dimmer "99" not "100" end ------------------ // Sensors Alarms (zwave/nodeID_xx/notification) // Mqtt Switch channels --- - id: Office_Motion channelTypeUID: mqtt:switch label: Office Motion description: Motion configuration: stateTopic: zwave/Motion-52/notification/endpoint_0/Home_Security/Motion_sensor_status transformationPattern: MAP:motion.map - id: Refrigerator_Flood channelTypeUID: mqtt:switch label: Refrigerator Flood Alarm description: Flood configuration: stateTopic: zwave/Flood-42/notification/endpoint_0/Water_Alarm/Sensor_status transformationPattern: MAP:motion.map --- ** Motion.map 0=OFF 2=ON // For the flood alarm 8=ON ------------------ // Multilevel Sensor Readings (zwave/nodeID_xx/sensor_multilevel) // Mqtt Number channels --- - id: Main_Floor_Humidity channelTypeUID: mqtt:number label: Main Floor Humidity description: Humidity configuration: stateTopic: zwave/Thermostat-62/sensor_multilevel/endpoint_2/Humidity - id: Nook_Luminance channelTypeUID: mqtt:number label: Nook Light Level description: Luminance configuration: stateTopic: zwave/Sensors-37/sensor_multilevel/endpoint_0/Illuminance - id: Main_Floor_Temperature channelTypeUID: mqtt:number label: Main Floor Temperature description: Temperature configuration: stateTopic: zwave/Thermostat-62/sensor_multilevel/endpoint_0/Air_temperature unit: °F ------------------ // Binary Switches (zwave/nodeID_xx/switch_binary) // Mqtt Switch channels --- - id: Office_Bath_Lights channelTypeUID: mqtt:switch label: Office Bath Lights description: Lights configuration: commandTopic: zwave/Lights-5/switch_binary/endpoint_0/targetValue/set stateTopic: zwave/Lights-5/switch_binary/endpoint_0/currentValue off: "false" on: "true" ------------------ // KWH and Watt Readings (zwave/nodeID_xx/meter) // Mqtt Number channels --- - id: Furnace_KWH channelTypeUID: mqtt:number label: Furnace KWH description: KWH configuration: stateTopic: zwave/Furnace_Refrigerator/meter/endpoint_1/value/65537 - id: Furnace_watts channelTypeUID: mqtt:number label: Furnace watts description: Watts configuration: stateTopic: zwave/Furnace_Refrigerator/meter/endpoint_1/value/66049 ------------------ // Battery Levels (zwave/nodeID_xx/battery) // Mqtt Number channel --- - id: Garage_Door_Battery channelTypeUID: mqtt:number label: Garage Door Status Battery description: Level configuration: stateTopic: zwave/Door-128/battery/endpoint_0/level unit: "%" ------------------ // Time stamp (i.e. keep track of Battery devices) // Note: ZUI uses Epoch time (converted with metadata) // Mqtt datetime channels --- - id: Last_front_door_motion channelTypeUID: mqtt:datetime label: Last Activity Front Door Motion Sensor description: Last Activity configuration: stateTopic: zwave/Motion-38/lastActive --- ** Metadata Pattern == %1$tb-%1$td %1$tl:%1$tM %Tp ------------------ // Change Device Configuration Parameter (zwave/nodeID_xx/configuration) // Mqtt Number channels - id: Office_TV_and_PC_Reporting channelTypeUID: mqtt:number label: Office TV and PC Watt Frequency description: Reporting configuration: commandTopic: zwave/Office_PC-TV_Meter/configuration/endpoint_0/Power_Report_Frequency/set stateTopic: zwave/Office_PC-TV_Meter/configuration/endpoint_0/Power_Report_Frequency ------------------ // Example API call (See Zwave-js-ui documentation for the full list) ** Refresh Command Class Values from rule (Can also do in ZUI using the refresh button). In this case Node 9 and CC = 50 (meter values) getActions('mqtt', 'mqtt:broker:f06f8352c2').publishMQTT('zwave/_CLIENTS/ZWAVE_GATEWAY-zwave-js-ui2/api/refreshCCValues/set', '{"args":[9,50]}') ------------------