*** Example OpenHAB configuration *** * 1. Create a "things" file for the MQTT broker as (OpenHAB configuration directory)/things/mymqtt.things: * - https://www.openhab.org/docs/configuration/things.html Bridge mqtt:broker:mymqtt "My MQTT" [host="MQTT broker IP address or hostname"] * 2. Create a "things" file for the security system as (OpenHAB configuration directory)/things/vista.things: Thing mqtt:topic:mymqtt:vista "VISTA Security System" (mqtt:broker:mymqtt) @ "Home" { Channels: Type string : system_message "System" [stateTopic="vista/Get/SystemStatus"] Type switch : system_armed_away "System Armed Away" [stateTopic="vista/Get/SystemStatus", commandTopic="vista/Set/Cmd", on="A", off="D"] Type switch : system_armed_stay "System Armed Stay" [stateTopic="vista/Get/SystemStatus", commandTopic="vista/Set/Cmd", on="S", off="D"] Type switch : system_alarm "System Alarm" [stateTopic="vista/Get/SystemStatus", on="T", off="D"] Type switch : system_fire "System Fire" [stateTopic="vista/Get/Fire", on="1", off="0"] Type switch : panel_online "Panel Online" [stateTopic="vista/Get/Status", on="online", off="offline"] Type switch : panel_trouble "Panel Trouble" [stateTopic="vista/Get/Trouble", on="1", off="0"] Type contact : zone1 "Zone 1" [stateTopic="vista/Get/Zone/1", on="1", off="0"] Type contact : zone2 "Zone 2" [stateTopic="vista/Get/Zone/2", on="1", off="0"] Type contact : zone3 "Zone 3" [stateTopic="vista/Get/Zone/3", on="1", off="0"] } * 3. Create an "items" file for the security system as (OpenHAB configuration directory)/items/vista.items: * - https://www.openhab.org/docs/configuration/items.html String system_message "System [%s]" {channel="mqtt:topic:mymqtt:vista:system_message"} Switch system_armed_away "System Armed Away" {channel="mqtt:topic:mymqtt:vista:system_armed_away"} Switch system_armed_stay "System Armed Stay" {channel="mqtt:topic:mymqtt:vista:system_armed_stay"} Switch system_triggered "System Alarm" {channel="mqtt:topic:mymqtt:vista:system_alarm"} Switch system_fire "System Fire" {channel="mqtt:topic:mymqtt:vista:system_fire"} Switch panel_online "Panel Online" {channel="mqtt:topic:mymqtt:vista:panel_online"} Switch panel_trouble "Panel Trouble" {channel="mqtt:topic:mymqtt:vista:panel_trouble"} Contact zone1 "Zone 1" {channel="mqtt:topic:mymqtt:vista:zone1"} Contact zone2 "Zone 2" {channel="mqtt:topic:mymqtt:vista:zone2"} Contact zone3 "Zone 3" {channel="mqtt:topic:mymqtt:vista:zone3"}