Part 3 - Configuration - Things, Items

The article will guide you through the basic setup of OpenHAB 3 on our model example of a smart house. We will explain what Things and Items mean - basic building units in OpenHAB. We will show some tips for bulk editing in Mian UI and how to "clicking" your house or apartment in this environment. An integral part is the setup of the link with MQTT commands, which is the basic communication protocol in our Pi-Home application project.

What we'll need

Raspberry Pi 4 B with case (optional DIN holder)

SSD disk (or better quality microSD card but this is not as reliable as SSD disc in production

Configuration

In the previous guide, we installed OpenHAB 3 and added some useful extensions for basic functionality. In this guide, we start with the home configuration. The basic model can be found under Settings-> Model. Use Add location to create the structure of your home. E.g. ground floor, first floor, garden. And add rooms to individual locations. Floor and rooms are Group types see example below:

PiHome - Vytvoření modelu domu

We have also created three sections for individual rooms: General, Sensors and Heating. Their Name are always GBxxx, GSxxx and GHxxx, where xxx is the label of the respective room in the house (see Pi-Home - Model house). We insert the lights, sockets, sensors, roller shutters, PIR and everything else into the rooms. Individual elements are called Items and they can be created in bulk - see next steps.

MQTT and connections with "Items" (lights, sockets, blinds, sensors etc.)

We have to decide how to connect our items with MQTT commnads to communicat with Arduino. In order to set the reaction to MQTT messages, we have to link the Items element to some Thing type of MQTT Binding. In this case, to communicate with Arduino, we use the Generic MQTT Thing type. Easier than creating lots of Thing for each light is to create one Thing for, say, all the lights and then under this Thing create as many Channels as we have lights. In Channels we set the pattern of the MQTT message (topic) to which the Channel will be respond. Items can be created in bulk from Channels . Are you already lost in this? :D Don't worry, when you click it will be clearer to you. Let's do it!

Go to the Settings->Thing tab and add a new item using the blue + icon at the bottom right. Select
and fill values based on example picture below:

OpenHAB MQTT Things

Click on the new added Lights Thing and switch to the Channels panel in the middle. Choose Add new Channel. Select On/Off Switch and set the MQTT topic to which the Channel will respond at the bottom.

OpenHAB MQTT Channel

OpenHAB Channel

You can create more Channels either by further clicking (boring), or faster, simply edit text, by copying and editing the new Channel in the Code tab which you will find on the far right. Note the coding of lights as Lxxx, where L=Light and xxx is the marking of the room in the house see. Pi-Home - Model House

OpenHAB Bulk Import

Our Code for Thing lights looks like code below. Feel free to copy and edit it

UID: mqtt:topic:pihome:lightsthing
label: Lights Thing
thingTypeUID: mqtt:topic
configuration: {}
bridgeUID: mqtt:broker:pihome
channels:
  - id: L011
    channelTypeUID: mqtt:switch
    label: Light Outside South
    description: null
    configuration:
      commandTopic: pihome/lights
      stateTopic: pihome/lights
      off: L011_off
      on: L011_on
  - id: L012
    channelTypeUID: mqtt:switch
    label: Light Outside East
    description: null
    configuration:
      commandTopic: pihome/lights
      stateTopic: pihome/lights
      off: L012_off
      on: L012_on
  - id: L013
    channelTypeUID: mqtt:switch
    label: Light Outside North
    description: null
    configuration:
      commandTopic: pihome/lights
      stateTopic: pihome/lights
      off: L013_off
      on: L013_on
  - id: L014
    channelTypeUID: mqtt:switch
    label: Light Outside West
    description: null
    configuration:
      commandTopic: pihome/lights
      stateTopic: pihome/lights
      off: L014_off
      on: L014_on
  - id: L021
    channelTypeUID: mqtt:switch
    label: Light Garage
    description: null
    configuration:
      commandTopic: pihome/lights
      stateTopic: pihome/lights
      off: L021_off
      on: L021_on
  - id: L022
    channelTypeUID: mqtt:switch
    label: Light Garage Desk
    description: null
    configuration:
      commandTopic: pihome/lights
      stateTopic: pihome/lights
      off: L022_off
      on: L022_on
  - id: L031
    channelTypeUID: mqtt:switch
    label: Light Pool
    description: null
    configuration:
      commandTopic: pihome/lights
      stateTopic: pihome/lights
      off: L031_off
      on: L031_on
  - id: L041
    channelTypeUID: mqtt:switch
    label: Light Gate
    description: null
    configuration:
      commandTopic: pihome/lights
      stateTopic: pihome/lights
      off: L041_off
      on: L041_on
  - id: L042
    channelTypeUID: mqtt:switch
    label: Light Garden
    description: null
    configuration:
      commandTopic: pihome/lights
      stateTopic: pihome/lights
      off: L042_off
      on: L042_on
  - id: L043
    channelTypeUID: mqtt:switch
    label: Light Christmas
    description: null
    configuration:
      commandTopic: pihome/lights
      stateTopic: pihome/lights
      off: L043_off
      on: L043_on
  - id: L111
    channelTypeUID: mqtt:switch
    label: Light Vestibule
    description: null
    configuration:
      commandTopic: pihome/lights
      stateTopic: pihome/lights
      off: L111_off
      on: L111_on
  - id: L112
    channelTypeUID: mqtt:switch
    label: Light Stairs GF
    description: null
    configuration:
      commandTopic: pihome/lights
      stateTopic: pihome/lights
      off: L112_off
      on: L112_on
  - id: L121
    channelTypeUID: mqtt:switch
    label: Light Toilet
    description: null
    configuration:
      commandTopic: pihome/lights
      stateTopic: pihome/lights
      off: L121_off
      on: L121_on
  - id: L122
    channelTypeUID: mqtt:switch
    label: Light Toilet Mirror
    description: null
    configuration:
      commandTopic: pihome/lights
      stateTopic: pihome/lights
      off: L122_off
      on: L122_on
  - id: L131
    channelTypeUID: mqtt:switch
    label: Light Office
    description: null
    configuration:
      commandTopic: pihome/lights
      stateTopic: pihome/lights
      off: L131_off
      on: L131_on
  - id: L141
    channelTypeUID: mqtt:switch
    label: Light Technical
    description: null
    configuration:
      commandTopic: pihome/lights
      stateTopic: pihome/lights
      off: L141_off
      on: L141_on
  - id: L151
    channelTypeUID: mqtt:switch
    label: Light Livin Room Center
    description: null
    configuration:
      commandTopic: pihome/lights
      stateTopic: pihome/lights
      off: L151_off
      on: L151_on
  - id: L152
    channelTypeUID: mqtt:switch
    label: Light Living Room TV
    description: null
    configuration:
      commandTopic: pihome/lights
      stateTopic: pihome/lights
      off: L152_off
      on: L152_on
  - id: L153
    channelTypeUID: mqtt:switch
    label: Light Living Room Bookcase
    description: null
    configuration:
      commandTopic: pihome/lights
      stateTopic: pihome/lights
      off: L153_off
      on: L153_on
  - id: L154
    channelTypeUID: mqtt:switch
    label: Light Dining Room
    description: null
    configuration:
      commandTopic: pihome/lights
      stateTopic: pihome/lights
      off: L154_off
      on: L154_on
  - id: L155
    channelTypeUID: mqtt:switch
    label: Light Kitchen
    description: null
    configuration:
      commandTopic: pihome/lights
      stateTopic: pihome/lights
      off: L155_off
      on: L155_on
  - id: L156
    channelTypeUID: mqtt:switch
    label: Light Kitchen Desk
    description: null
    configuration:
      commandTopic: pihome/lights
      stateTopic: pihome/lights
      off: L156_off
      on: L156_on
  - id: L161
    channelTypeUID: mqtt:switch
    label: Light Pantry
    description: null
    configuration:
      commandTopic: pihome/lights
      stateTopic: pihome/lights
      off: L161_off
      on: L161_on
  - id: L201
    channelTypeUID: mqtt:switch
    label: Light Hall
    description: null
    configuration:
      commandTopic: pihome/lights
      stateTopic: pihome/lights
      off: L201_off
      on: L201_on
  - id: L211
    channelTypeUID: mqtt:switch
    label: Light Bathroom Mirror
    description: null
    configuration:
      commandTopic: pihome/lights
      stateTopic: pihome/lights
      off: L211_off
      on: L211_on
  - id: L212
    channelTypeUID: mqtt:switch
    label: Light Bathroom
    description: null
    configuration:
      commandTopic: pihome/lights
      stateTopic: pihome/lights
      off: L212_off
      on: L212_on
  - id: L221
    channelTypeUID: mqtt:switch
    label: Light Guest room
    description: null
    configuration:
      commandTopic: pihome/lights
      stateTopic: pihome/lights
      off: L221_off
      on: L221_on
  - id: L231
    channelTypeUID: mqtt:switch
    label: Light Bedroom
    description: null
    configuration:
      commandTopic: pihome/lights
      stateTopic: pihome/lights
      off: L231_off
      on: L231_on
  - id: L241
    channelTypeUID: mqtt:switch
    label: Light Kids room
    description: null
    configuration:
      commandTopic: pihome/lights
      stateTopic: pihome/lights
      off: L241_off
      on: L241_on

Add all the lights and their specific MQTT. Finally, choose Add Equipment to Model, choose Expert mode below. You will see the text output to create Items. This import text can be slightly modified to tell you what icons you want to have on these elements, what groups they will be in, etc. For our model house, mass import of Items would look something like this:

//Lighs
Switch L111 "Light Vestibule"            <lightbulb>  (LightsThing,Lights,GB111) ["Switch","Light"]  { channel="mqtt:topic:pihome:lightsthing:L111" }
Switch L112 "Light Stairs GF"            <lightbulb>  (LightsThing,Lights,GB111) ["Switch","Light"]  { channel="mqtt:topic:pihome:lightsthing:L112" }
Switch L121 "Light Toilet"               <lightbulb>  (LightsThing,Lights,GB121) ["Switch","Light"]  { channel="mqtt:topic:pihome:lightsthing:L121" }
Switch L122 "Light Toilet Mirror"        <lightbulb>  (LightsThing,Lights,GB121) ["Switch","Light"]  { channel="mqtt:topic:pihome:lightsthing:L122" }
Switch L131 "Light Office"               <lightbulb>  (LightsThing,Lights,GB131) ["Switch","Light"]  { channel="mqtt:topic:pihome:lightsthing:L131" }
Switch L141 "Light Technical"            <lightbulb>  (LightsThing,Lights,GB141) ["Switch","Light"]  { channel="mqtt:topic:pihome:lightsthing:L141" }
Switch L151 "Light Livin Room Center"    <lightbulb>  (LightsThing,Lights,GB151) ["Switch","Light"]  { channel="mqtt:topic:pihome:lightsthing:L151" }
Switch L152 "Light Living Room TV"       <lightbulb>  (LightsThing,Lights,GB151) ["Switch","Light"]  { channel="mqtt:topic:pihome:lightsthing:L152" }
Switch L153 "Light Living Room Bookcase" <lightbulb>  (LightsThing,Lights,GB151) ["Switch","Light"]  { channel="mqtt:topic:pihome:lightsthing:L153" }
Switch L154 "Light Dining Room"          <lightbulb>  (LightsThing,Lights,GB151) ["Switch","Light"]  { channel="mqtt:topic:pihome:lightsthing:L154" }
Switch L155 "Light Kitchen"              <lightbulb>  (LightsThing,Lights,GB152) ["Switch","Light"]  { channel="mqtt:topic:pihome:lightsthing:L155" }
Switch L156 "Light Kitchen Desk"         <lightbulb>  (LightsThing,Lights,GB152) ["Switch","Light"]  { channel="mqtt:topic:pihome:lightsthing:L156" }
Switch L161 "Light Pantry"               <lightbulb>  (LightsThing,Lights,GB161) ["Switch","Light"]  { channel="mqtt:topic:pihome:lightsthing:L161" }
Switch L201 "Light Hall"                 <lightbulb>  (LightsThing,Lights,GB201) ["Switch","Light"]  { channel="mqtt:topic:pihome:lightsthing:L201" }
Switch L211 "Light Bathroom Mirror"      <lightbulb>  (LightsThing,Lights,GB211) ["Switch","Light"]  { channel="mqtt:topic:pihome:lightsthing:L211" }
Switch L212 "Light Bathroom"             <lightbulb>  (LightsThing,Lights,GB211) ["Switch","Light"]  { channel="mqtt:topic:pihome:lightsthing:L212" }
Switch L221 "Light Guest room"           <lightbulb>  (LightsThing,Lights,GB221) ["Switch","Light"]  { channel="mqtt:topic:pihome:lightsthing:L221" }
Switch L231 "Light Bedroom"              <lightbulb>  (LightsThing,Lights,GB231) ["Switch","Light"]  { channel="mqtt:topic:pihome:lightsthing:L231" }
Switch L241 "Light Kids room"            <lightbulb>  (LightsThing,Lights,GB241) ["Switch","Light"]  { channel="mqtt:topic:pihome:lightsthing:L241" }
Switch L011 "Light Outside South"        <lightbulb>  (LightsThing,Lights,GB101) ["Switch","Light"]  { channel="mqtt:topic:pihome:lightsthing:L011" }
Switch L012 "Light Outside East"         <lightbulb>  (LightsThing,Lights,GB101) ["Switch","Light"]  { channel="mqtt:topic:pihome:lightsthing:L012" }
Switch L013 "Light Outside North"        <lightbulb>  (LightsThing,Lights,GB101) ["Switch","Light"]  { channel="mqtt:topic:pihome:lightsthing:L013" }
Switch L014 "Light Outside West"         <lightbulb>  (LightsThing,Lights,GB101) ["Switch","Light"]  { channel="mqtt:topic:pihome:lightsthing:L014" }
Switch L021 "Light Garage"               <lightbulb>  (LightsThing,Lights,GB101) ["Switch","Light"]  { channel="mqtt:topic:pihome:lightsthing:L021" }
Switch L022 "Light Garage Desk"          <lightbulb>  (LightsThing,Lights,GB101) ["Switch","Light"]  { channel="mqtt:topic:pihome:lightsthing:L022" }
Switch L031 "Light Pool"                 <lightbulb>  (LightsThing,Lights,GB101) ["Switch","Light"]  { channel="mqtt:topic:pihome:lightsthing:L031" }
Switch L041 "Light Gate"                 <lightbulb>  (LightsThing,Lights,GB101) ["Switch","Light"]  { channel="mqtt:topic:pihome:lightsthing:L041" }
Switch L042 "Light Garden"               <lightbulb>  (LightsThing,Lights,GB101) ["Switch","Light"]  { channel="mqtt:topic:pihome:lightsthing:L042" }
Switch L043 "Light Christmas"            <lightbulb>  (LightsThing,Lights,GB101) ["Switch","Light"]  { channel="mqtt:topic:pihome:lightsthing:L043" }

This way you can create up to 50 lights at a time and save clicking with subsequent icon assignments, etc. Enter the modified code and confirm with the Add button on the top right. The corresponding number of lights in Items will be created. In addition, they will each be in the respective room, so you don't have to click them manually.

OpenHAB Created Items

Add Thing for sockets, blinds, sensors, buttons, etc. in the exact same way. Be careful with blinds, there will be also a "STOP" option. With buttons, we will only react to "push" action. Add individual Channels and create Items from them collectively. In our model house, we have created more than 150 elements in this way.

Below you will find the bulk imports we have used. You can save hours of texting with copy our lists of objects and edit it for your own situation. Always create Thing and the appropriate Channels first. Then generate Items.

Sockets

Switch S011 "Socket Gate"           <poweroutlet>  (SocketsThing,sockets,GB101) ["Switch","Oil"]  { channel="mqtt:topic:pihome:socketsthing:S011" }
Switch S012 "Socket Garage"         <poweroutlet>  (SocketsThing,sockets,GB101) ["Switch","Oil"]  { channel="mqtt:topic:pihome:socketsthing:S012" }
Switch S013 "Socket Water Tank"     <poweroutlet>  (SocketsThing,sockets,GB101) ["Switch","Oil"]  { channel="mqtt:topic:pihome:socketsthing:S013" }
Switch S014 "Socket Outside Socket" <poweroutlet>  (SocketsThing,sockets,GB101) ["Switch","Oil"]  { channel="mqtt:topic:pihome:socketsthing:S014" }
Switch S015 "Socket GreenHouse"     <poweroutlet>  (SocketsThing,sockets,GB101) ["Switch","Oil"]  { channel="mqtt:topic:pihome:socketsthing:S015" }
Switch S016 "Socket Reserve"        <poweroutlet>  (SocketsThing,sockets,GB101) ["Switch","Oil"]  { channel="mqtt:topic:pihome:socketsthing:S016" }
Switch S111 "Socket Vestibule"      <poweroutlet>  (SocketsThing,sockets,GB111) ["Switch","Oil"]  { channel="mqtt:topic:pihome:socketsthing:S111" }
Switch S121 "Socket Toilet"         <poweroutlet>  (SocketsThing,sockets,GB121) ["Switch","Oil"]  { channel="mqtt:topic:pihome:socketsthing:S121" }
Switch S131 "Socket Office"         <poweroutlet>  (SocketsThing,sockets,GB131) ["Switch","Oil"]  { channel="mqtt:topic:pihome:socketsthing:S131" }
Switch S141 "Socket HeatPump"       <poweroutlet>  (SocketsThing,sockets,GB141) ["Switch","Oil"]  { channel="mqtt:topic:pihome:socketsthing:S141" }
Switch S142 "Socket Technical"      <poweroutlet>  (SocketsThing,sockets,GB141) ["Switch","Oil"]  { channel="mqtt:topic:pihome:socketsthing:S142" }
Switch S151 "Socket Living room"    <poweroutlet>  (SocketsThing,sockets,GB151) ["Switch","Oil"]  { channel="mqtt:topic:pihome:socketsthing:S151" }
Switch S152 "Socket Dining room"    <poweroutlet>  (SocketsThing,sockets,GB151) ["Switch","Oil"]  { channel="mqtt:topic:pihome:socketsthing:S152" }
Switch S153 "Socket Oven"           <poweroutlet>  (SocketsThing,sockets,GB152) ["Switch","Oil"]  { channel="mqtt:topic:pihome:socketsthing:S153" }
Switch S154 "Socket Dishwasher"     <poweroutlet>  (SocketsThing,sockets,GB152) ["Switch","Oil"]  { channel="mqtt:topic:pihome:socketsthing:S154" }
Switch S155 "Socket Kitchen Desk"   <poweroutlet>  (SocketsThing,sockets,GB152) ["Switch","Oil"]  { channel="mqtt:topic:pihome:socketsthing:S155" }
Switch S161 "Socket Pantry"         <poweroutlet>  (SocketsThing,sockets,GB161) ["Switch","Oil"]  { channel="mqtt:topic:pihome:socketsthing:S161" }
Switch S201 "Socket Hall"           <poweroutlet>  (SocketsThing,sockets,GB201) ["Switch","Oil"]  { channel="mqtt:topic:pihome:socketsthing:S201" }
Switch S211 "Socket Bathroom"       <poweroutlet>  (SocketsThing,sockets,GB211) ["Switch","Oil"]  { channel="mqtt:topic:pihome:socketsthing:S211" }
Switch S221 "Socket Guest room"     <poweroutlet>  (SocketsThing,sockets,GB221) ["Switch","Oil"]  { channel="mqtt:topic:pihome:socketsthing:S221" }
Switch S231 "Socket Bedroom"        <poweroutlet>  (SocketsThing,sockets,GB231) ["Switch","Oil"]  { channel="mqtt:topic:pihome:socketsthing:S231" }
Switch S241 "Socket Kids Room"      <poweroutlet>  (SocketsThing,sockets,GB241) ["Switch","Oil"]  { channel="mqtt:topic:pihome:socketsthing:S241" }

Heating

Switch H111 "Heating Vestibule"   <radiator> (HeatingsThing,heatings,GH111) ["Control","Power"]  { channel="mqtt:topic:pihome:heatingsthing:H111" }
Switch H121 "Heating Toilet"      <radiator> (HeatingsThing,heatings,GH121) ["Control","Power"]  { channel="mqtt:topic:pihome:heatingsthing:H121" }
Switch H131 "Heating Office"      <radiator> (HeatingsThing,heatings,GH131) ["Control","Power"]  { channel="mqtt:topic:pihome:heatingsthing:H131" }
Switch H151 "Heating Living room" <radiator> (HeatingsThing,heatings,GH151) ["Control","Power"]  { channel="mqtt:topic:pihome:heatingsthing:H151" }
Switch H152 "Heating Dining room" <radiator> (HeatingsThing,heatings,GH152) ["Control","Power"]  { channel="mqtt:topic:pihome:heatingsthing:H152" }
Switch H201 "Heating Hall"        <radiator> (HeatingsThing,heatings,GH201) ["Control","Power"]  { channel="mqtt:topic:pihome:heatingsthing:H201" }
Switch H211 "Heating Bathroom"    <radiator> (HeatingsThing,heatings,GH211) ["Control","Power"]  { channel="mqtt:topic:pihome:heatingsthing:H211" }
Switch H221 "Heating Guest room"  <radiator> (HeatingsThing,heatings,GH221) ["Control","Power"]  { channel="mqtt:topic:pihome:heatingsthing:H221" }
Switch H231 "Heating Bedroom"     <radiator> (HeatingsThing,heatings,GH231) ["Control","Power"]  { channel="mqtt:topic:pihome:heatingsthing:H231" }
Switch H241 "Heating Kids room"   <radiator> (HeatingsThing,heatings,GH241) ["Control","Power"]  { channel="mqtt:topic:pihome:heatingsthing:H241" }

//Bulk creation of thermostats and heatings modes. We don't ned MQTT for heatings modes and thermostats so no Channels for them
Number H111SET "Thermostat Vestibule"   <temperature_hot> (HeatingsThing,GH111) ["Point","ColorTemperature"]  
Number H121SET "Thermostat Toilet"      <temperature_hot> (HeatingsThing,GH121) ["Point","ColorTemperature"]  
Number H131SET "Thermostat Office"      <temperature_hot> (HeatingsThing,GH131) ["Point","ColorTemperature"]  
Number H151SET "Thermostat Living room" <temperature_hot> (HeatingsThing,GH151) ["Point","ColorTemperature"]  
Number H152SET "Thermostat Dining room" <temperature_hot> (HeatingsThing,GH152) ["Point","ColorTemperature"]  
Number H201SET "Thermostat Hall"        <temperature_hot> (HeatingsThing,GH201) ["Point","ColorTemperature"]  
Number H211SET "Thermostat Bathroom"    <temperature_hot> (HeatingsThing,GH211) ["Point","ColorTemperature"]  
Number H221SET "Thermostat Guest room"  <temperature_hot> (HeatingsThing,GH221) ["Point","ColorTemperature"]  
Number H231SET "Thermostat Bedroom"     <temperature_hot> (HeatingsThing,GH231) ["Point","ColorTemperature"]  
Number H241SET "Thermostat Kids room"   <temperature_hot> (HeatingsThing,GH241) ["Point","ColorTemperature"]  

Number H111MODE "Mode Vestibule"   <heating> (HeatingsThing,GH111) ["Point","Current"]  
Number H121MODE "Mode Toilet"      <heating> (HeatingsThing,GH121) ["Point","Current"]  
Number H131MODE "Mode Office"      <heating> (HeatingsThing,GH131) ["Point","Current"]  
Number H151MODE "Mode Living room" <heating> (HeatingsThing,GH151) ["Point","Current"]  
Number H152MODE "Mode Dining room" <heating> (HeatingsThing,GH152) ["Point","Current"]  
Number H201MODE "Mode Hall"        <heating> (HeatingsThing,GH201) ["Point","Current"]  
Number H211MODE "Mode Bathroom"    <heating> (HeatingsThing,GH211) ["Point","Current"]  
Number H221MODE "Mode Guest room"  <heating> (HeatingsThing,GH221) ["Point","Current"]  
Number H231MODE "Mode Bedroom"     <heating> (HeatingsThing,GH231) ["Point","Current"]  
Number H241MODE "Mode Kids room"   <heating> (HeatingsThing,GH241) ["Point","Current"]

Buttons

Switch B111 "Button Vestibule 1"      <wallswitch> (ButtonsThing) ["Tampered","Level"]  { channel="mqtt:topic:pihome:buttonsthing:B111",expire="1s,command=OFF" }
Switch B112 "Button Vestibule 2"      <wallswitch> (ButtonsThing) ["Tampered","Level"]  { channel="mqtt:topic:pihome:buttonsthing:B112",expire="1s,command=OFF" }
Switch B121 "Button Toilet 1"         <wallswitch> (ButtonsThing) ["Tampered","Level"]  { channel="mqtt:topic:pihome:buttonsthing:B121",expire="1s,command=OFF" }
Switch B122 "Button Toilet 2"         <wallswitch> (ButtonsThing) ["Tampered","Level"]  { channel="mqtt:topic:pihome:buttonsthing:B122",expire="1s,command=OFF" }
Switch B131 "Button Office 1"         <wallswitch> (ButtonsThing) ["Tampered","Level"]  { channel="mqtt:topic:pihome:buttonsthing:B131",expire="1s,command=OFF" }
Switch B132 "Button Office 2"         <wallswitch> (ButtonsThing) ["Tampered","Level"]  { channel="mqtt:topic:pihome:buttonsthing:B132",expire="1s,command=OFF" }
Switch B133 "Button Office 3"         <wallswitch> (ButtonsThing) ["Tampered","Level"]  { channel="mqtt:topic:pihome:buttonsthing:B133",expire="1s,command=OFF" }
Switch B134 "Button Office 4"         <wallswitch> (ButtonsThing) ["Tampered","Level"]  { channel="mqtt:topic:pihome:buttonsthing:B134",expire="1s,command=OFF" }
Switch B141 "Button Technical room 1" <wallswitch> (ButtonsThing) ["Tampered","Level"]  { channel="mqtt:topic:pihome:buttonsthing:B141",expire="1s,command=OFF" }
Switch B142 "Button Technical room 1" <wallswitch> (ButtonsThing) ["Tampered","Level"]  { channel="mqtt:topic:pihome:buttonsthing:B142",expire="1s,command=OFF" }
Switch B151 "Button Living room 1"    <wallswitch> (ButtonsThing) ["Tampered","Level"]  { channel="mqtt:topic:pihome:buttonsthing:B151",expire="1s,command=OFF" }
Switch B152 "Button Living room 2"    <wallswitch> (ButtonsThing) ["Tampered","Level"]  { channel="mqtt:topic:pihome:buttonsthing:B152",expire="1s,command=OFF" }
Switch B153 "Button Living room 3"    <wallswitch> (ButtonsThing) ["Tampered","Level"]  { channel="mqtt:topic:pihome:buttonsthing:B153",expire="1s,command=OFF" }
Switch B154 "Button Living room 4"    <wallswitch> (ButtonsThing) ["Tampered","Level"]  { channel="mqtt:topic:pihome:buttonsthing:B154",expire="1s,command=OFF" }
Switch B155 "Button Living room 5"    <wallswitch> (ButtonsThing) ["Tampered","Level"]  { channel="mqtt:topic:pihome:buttonsthing:B155",expire="1s,command=OFF" }
Switch B156 "Button Living room 6"    <wallswitch> (ButtonsThing) ["Tampered","Level"]  { channel="mqtt:topic:pihome:buttonsthing:B156",expire="1s,command=OFF" }
Switch B157 "Button Living room 7"    <wallswitch> (ButtonsThing) ["Tampered","Level"]  { channel="mqtt:topic:pihome:buttonsthing:B157",expire="1s,command=OFF" }
Switch B158 "Button Living room 8"    <wallswitch> (ButtonsThing) ["Tampered","Level"]  { channel="mqtt:topic:pihome:buttonsthing:B158",expire="1s,command=OFF" }
Switch B159 "Button Kitchen 1"        <wallswitch> (ButtonsThing) ["Tampered","Level"]  { channel="mqtt:topic:pihome:buttonsthing:B159",expire="1s,command=OFF" }
Switch B160 "Button Kitchen 2"        <wallswitch> (ButtonsThing) ["Tampered","Level"]  { channel="mqtt:topic:pihome:buttonsthing:B160",expire="1s,command=OFF" }
Switch B161 "Button Pantry 1"         <wallswitch> (ButtonsThing) ["Tampered","Level"]  { channel="mqtt:topic:pihome:buttonsthing:B161",expire="1s,command=OFF" }
Switch B162 "Button Pantry 2"         <wallswitch> (ButtonsThing) ["Tampered","Level"]  { channel="mqtt:topic:pihome:buttonsthing:B162",expire="1s,command=OFF" }
Switch B201 "Button Hall 1"           <wallswitch> (ButtonsThing) ["Tampered","Level"]  { channel="mqtt:topic:pihome:buttonsthing:B201",expire="1s,command=OFF" }
Switch B202 "Button Hall 2"           <wallswitch> (ButtonsThing) ["Tampered","Level"]  { channel="mqtt:topic:pihome:buttonsthing:B202",expire="1s,command=OFF" }
Switch B211 "Button Bathroom 1"       <wallswitch> (ButtonsThing) ["Tampered","Level"]  { channel="mqtt:topic:pihome:buttonsthing:B211",expire="1s,command=OFF" }
Switch B212 "Button Bathroom 2"       <wallswitch> (ButtonsThing) ["Tampered","Level"]  { channel="mqtt:topic:pihome:buttonsthing:B212",expire="1s,command=OFF" }
Switch B213 "Button Bathroom 3"       <wallswitch> (ButtonsThing) ["Tampered","Level"]  { channel="mqtt:topic:pihome:buttonsthing:B213",expire="1s,command=OFF" }
Switch B214 "Button Bathroom 4"       <wallswitch> (ButtonsThing) ["Tampered","Level"]  { channel="mqtt:topic:pihome:buttonsthing:B214",expire="1s,command=OFF" }
Switch B221 "Button Guest room 1"     <wallswitch> (ButtonsThing) ["Tampered","Level"]  { channel="mqtt:topic:pihome:buttonsthing:B221",expire="1s,command=OFF" }
Switch B222 "Button Guest room 2"     <wallswitch> (ButtonsThing) ["Tampered","Level"]  { channel="mqtt:topic:pihome:buttonsthing:B222",expire="1s,command=OFF" }
Switch B223 "Button Guest room 3"     <wallswitch> (ButtonsThing) ["Tampered","Level"]  { channel="mqtt:topic:pihome:buttonsthing:B223",expire="1s,command=OFF" }
Switch B224 "Button Guest room 4"     <wallswitch> (ButtonsThing) ["Tampered","Level"]  { channel="mqtt:topic:pihome:buttonsthing:B224",expire="1s,command=OFF" }
Switch B231 "Button Bedroom 1"        <wallswitch> (ButtonsThing) ["Tampered","Level"]  { channel="mqtt:topic:pihome:buttonsthing:B231",expire="1s,command=OFF" }
Switch B232 "Button Bedroom 2"        <wallswitch> (ButtonsThing) ["Tampered","Level"]  { channel="mqtt:topic:pihome:buttonsthing:B232",expire="1s,command=OFF" }
Switch B233 "Button Bedroom 3"        <wallswitch> (ButtonsThing) ["Tampered","Level"]  { channel="mqtt:topic:pihome:buttonsthing:B233",expire="1s,command=OFF" }
Switch B234 "Button Bedroom 4"        <wallswitch> (ButtonsThing) ["Tampered","Level"]  { channel="mqtt:topic:pihome:buttonsthing:B234",expire="1s,command=OFF" }
Switch B241 "Button Kids room 1"      <wallswitch> (ButtonsThing) ["Tampered","Level"]  { channel="mqtt:topic:pihome:buttonsthing:B241",expire="1s,command=OFF" }
Switch B242 "Button Kids room 2"      <wallswitch> (ButtonsThing) ["Tampered","Level"]  { channel="mqtt:topic:pihome:buttonsthing:B242",expire="1s,command=OFF" }
Switch B243 "Button Kids room 3"      <wallswitch> (ButtonsThing) ["Tampered","Level"]  { channel="mqtt:topic:pihome:buttonsthing:B243",expire="1s,command=OFF" }
Switch B244 "Button Kids room 4"      <wallswitch> (ButtonsThing) ["Tampered","Level"]  { channel="mqtt:topic:pihome:buttonsthing:B244",expire="1s,command=OFF" }

Žaluzie

Rollershutter R111 "Shutter Vestibule"      <rollershutter>  (RollerShuttersThing,shutters,GB111) ["OpenState","Level"]  { channel="mqtt:topic:pihome:rollersthing:R111", expire="60s,command=STOP" }
Rollershutter R131 "Shutter Office East"    <rollershutter>  (RollerShuttersThing,shutters,GB131) ["OpenState","Level"]  { channel="mqtt:topic:pihome:rollersthing:R131", expire="60s,command=STOP" }
Rollershutter R132 "Shutter Office South"   <rollershutter>  (RollerShuttersThing,shutters,GB131) ["OpenState","Level"]  { channel="mqtt:topic:pihome:rollersthing:R132", expire="60s,command=STOP" }
Rollershutter R141 "Shutter Technical room" <rollershutter>  (RollerShuttersThing,shutters,GB141) ["OpenState","Level"]  { channel="mqtt:topic:pihome:rollersthing:R141", expire="60s,command=STOP" }
Rollershutter R151 "Shutter Living North1"  <rollershutter>  (RollerShuttersThing,shutters,GB151) ["OpenState","Level"]  { channel="mqtt:topic:pihome:rollersthing:R151", expire="60s,command=STOP" }
Rollershutter R152 "Shutter Living North2"  <rollershutter>  (RollerShuttersThing,shutters,GB151) ["OpenState","Level"]  { channel="mqtt:topic:pihome:rollersthing:R152", expire="60s,command=STOP" }
Rollershutter R153 "Shutter Living East"    <rollershutter>  (RollerShuttersThing,shutters,GB151) ["OpenState","Level"]  { channel="mqtt:topic:pihome:rollersthing:R153", expire="60s,command=STOP" }
Rollershutter R154 "Shutter Kitchen 1"      <rollershutter>  (RollerShuttersThing,shutters,GB152) ["OpenState","Level"]  { channel="mqtt:topic:pihome:rollersthing:R154", expire="60s,command=STOP" }
Rollershutter R155 "Shutter Kitchen 2"      <rollershutter>  (RollerShuttersThing,shutters,GB152) ["OpenState","Level"]  { channel="mqtt:topic:pihome:rollersthing:R155", expire="60s,command=STOP" }
Rollershutter R211 "Shutter Bathroom"       <rollershutter>  (RollerShuttersThing,shutters,GB211) ["OpenState","Level"]  { channel="mqtt:topic:pihome:rollersthing:R211", expire="60s,command=STOP" }
Rollershutter R221 "Shutter Guest room"     <rollershutter>  (RollerShuttersThing,shutters,GB221) ["OpenState","Level"]  { channel="mqtt:topic:pihome:rollersthing:R221", expire="60s,command=STOP" }
Rollershutter R231 "Shutter Bedroom"        <rollershutter>  (RollerShuttersThing,shutters,GB231) ["OpenState","Level"]  { channel="mqtt:topic:pihome:rollersthing:R231", expire="60s,command=STOP" }
Rollershutter R241 "Shutter Kids room"      <rollershutter>  (RollerShuttersThing,shutters,GB241) ["OpenState","Level"]  { channel="mqtt:topic:pihome:rollersthing:R241", expire="60s,command=STOP" }

Sensors of temperature, humidity, floor temperature

//Temp
Number ST111  "Temp Vestibule"   <temperature> (SensortempThing,temp_humidity,GS111) ["Measurement","Temperature"]  { channel="mqtt:topic:pihome:tempthing:ST111" }
Number ST121  "Temp Toilet"      <temperature> (SensortempThing,temp_humidity,GS121) ["Measurement","Temperature"]  { channel="mqtt:topic:pihome:tempthing:ST121" }
Number ST131  "Temp Office"      <temperature> (SensortempThing,temp_humidity,GS131) ["Measurement","Temperature"]  { channel="mqtt:topic:pihome:tempthing:ST131" }
Number ST141  "Temp Technical"   <temperature> (SensortempThing,temp_humidity,GS141) ["Measurement","Temperature"]  { channel="mqtt:topic:pihome:tempthing:ST141" }
Number ST151  "Temp Living room" <temperature> (SensortempThing,temp_humidity,GS151) ["Measurement","Temperature"]  { channel="mqtt:topic:pihome:tempthing:ST151" }
Number ST152  "Temp Kitchen"     <temperature> (SensortempThing,temp_humidity,GS152) ["Measurement","Temperature"]  { channel="mqtt:topic:pihome:tempthing:ST152" }
Number ST161  "Temp Pantry"      <temperature> (SensortempThing,temp_humidity,GS161) ["Measurement","Temperature"]  { channel="mqtt:topic:pihome:tempthing:ST161" }
Number ST201  "Temp Hall"        <temperature> (SensortempThing,temp_humidity,GS201) ["Measurement","Temperature"]  { channel="mqtt:topic:pihome:tempthing:ST201" }
Number ST211  "Temp Bathroom"    <temperature> (SensortempThing,temp_humidity,GS211) ["Measurement","Temperature"]  { channel="mqtt:topic:pihome:tempthing:ST211" }
Number ST221  "Temp Guest room"  <temperature> (SensortempThing,temp_humidity,GS221) ["Measurement","Temperature"]  { channel="mqtt:topic:pihome:tempthing:ST221" }
Number ST231  "Temp Bedroom"     <temperature> (SensortempThing,temp_humidity,GS231) ["Measurement","Temperature"]  { channel="mqtt:topic:pihome:tempthing:ST231" }
Number ST241  "Temp Kids room"   <temperature> (SensortempThing,temp_humidity,GS241) ["Measurement","Temperature"]  { channel="mqtt:topic:pihome:tempthing:ST241" }

//Hum
Number SH111 "Humidity Vestibule"   <humidity> (SensorsHumidityThing,temp_humidity,GS111) ["Measurement","Humidity"]  { channel="mqtt:topic:pihome:humiditything:SH111" }
Number SH121 "Humidity Toilet"      <humidity> (SensorsHumidityThing,temp_humidity,GS121) ["Measurement","Humidity"]  { channel="mqtt:topic:pihome:humiditything:SH121" }
Number SH131 "Humidity Office"      <humidity> (SensorsHumidityThing,temp_humidity,GS131) ["Measurement","Humidity"]  { channel="mqtt:topic:pihome:humiditything:SH131" }
Number SH141 "Humidity Technical"   <humidity> (SensorsHumidityThing,temp_humidity,GS141) ["Measurement","Humidity"]  { channel="mqtt:topic:pihome:humiditything:SH141" }
Number SH151 "Humidity Living room" <humidity> (SensorsHumidityThing,temp_humidity,GS151) ["Measurement","Humidity"]  { channel="mqtt:topic:pihome:humiditything:SH151" }
Number SH152 "Humidity Dining room" <humidity> (SensorsHumidityThing,temp_humidity,GS152) ["Measurement","Humidity"]  { channel="mqtt:topic:pihome:humiditything:SH152" }
Number SH161 "Humidity Pantry"      <humidity> (SensorsHumidityThing,temp_humidity,GS161) ["Measurement","Humidity"]  { channel="mqtt:topic:pihome:humiditything:SH161" }
Number SH201 "Humidity Hall"        <humidity> (SensorsHumidityThing,temp_humidity,GS201) ["Measurement","Humidity"]  { channel="mqtt:topic:pihome:humiditything:SH201" }
Number SH211 "Humidity Bathroom"    <humidity> (SensorsHumidityThing,temp_humidity,GS211) ["Measurement","Humidity"]  { channel="mqtt:topic:pihome:humiditything:SH211" }
Number SH221 "Humidity Guest room"  <humidity> (SensorsHumidityThing,temp_humidity,GS221) ["Measurement","Humidity"]  { channel="mqtt:topic:pihome:humiditything:SH221" }
Number SH231 "Humidity Bedroom"     <humidity> (SensorsHumidityThing,temp_humidity,GS231) ["Measurement","Humidity"]  { channel="mqtt:topic:pihome:humiditything:SH231" }
Number SH241 "Humidity Kids room"   <humidity> (SensorsHumidityThing,temp_humidity,GS241) ["Measurement","Humidity"]  { channel="mqtt:topic:pihome:humiditything:SH241" }

//Floor temp
Number SF111 "Floor temperature Vestibule"   <temperature> (SensorfloortempThing,temp_humidity,GS111) ["Measurement","Level"]  { channel="mqtt:topic:pihome:floortempthing:SF111" }
Number SF121 "Floor temperature Toilet"      <temperature> (SensorfloortempThing,temp_humidity,GS121) ["Measurement","Level"]  { channel="mqtt:topic:pihome:floortempthing:SF121" }
Number SF131 "Floor temperature Office"      <temperature> (SensorfloortempThing,temp_humidity,GS131) ["Measurement","Level"]  { channel="mqtt:topic:pihome:floortempthing:SF131" }
Number SF151 "Floor temperature Living room" <temperature> (SensorfloortempThing,temp_humidity,GS151) ["Measurement","Level"]  { channel="mqtt:topic:pihome:floortempthing:SF151" }
Number SF152 "Floor temperature Dining room" <temperature> (SensorfloortempThing,temp_humidity,GS152) ["Measurement","Level"]  { channel="mqtt:topic:pihome:floortempthing:SF152" }
Number SF201 "Floor temperature Hall"        <temperature> (SensorfloortempThing,temp_humidity,GS201) ["Measurement","Level"]  { channel="mqtt:topic:pihome:floortempthing:SF201" }
Number SF211 "Floor temperature Bathroom"    <temperature> (SensorfloortempThing,temp_humidity,GS211) ["Measurement","Level"]  { channel="mqtt:topic:pihome:floortempthing:SF211" }
Number SF221 "Floor temperature Guest room"  <temperature> (SensorfloortempThing,temp_humidity,GS221) ["Measurement","Level"]  { channel="mqtt:topic:pihome:floortempthing:SF221" }
Number SF231 "Floor temperature Bedroom"     <temperature> (SensorfloortempThing,temp_humidity,GS231) ["Measurement","Level"]  { channel="mqtt:topic:pihome:floortempthing:SF231" }
Number SF241 "Floor temperature Kids room"   <temperature> (SensorfloortempThing,temp_humidity,GS241) ["Measurement","Level"]  { channel="mqtt:topic:pihome:floortempthing:SF241" }

PIR sensors

//PIR
Switch SP111 "PIR Vestibule"      <motion> (SensorPIRThing,motions,GS111) ["Status","Presence"]  { channel="mqtt:topic:pihome:pirthing:SP111" }
Switch SP121 "PIR Toilet"         <motion> (SensorPIRThing,motions,GS121) ["Status","Presence"]  { channel="mqtt:topic:pihome:pirthing:SP121" }
Switch SP131 "PIR Office"         <motion> (SensorPIRThing,motions,GS131) ["Status","Presence"]  { channel="mqtt:topic:pihome:pirthing:SP131" }
Switch SP141 "PIR Technical room" <motion> (SensorPIRThing,motions,GS141) ["Status","Presence"]  { channel="mqtt:topic:pihome:pirthing:SP141" }
Switch SP151 "PIR Living room"    <motion> (SensorPIRThing,motions,GS151) ["Status","Presence"]  { channel="mqtt:topic:pihome:pirthing:SP151" }
Switch SP152 "PIR Dining room"    <motion> (SensorPIRThing,motions,GS152) ["Status","Presence"]  { channel="mqtt:topic:pihome:pirthing:SP152" }
Switch SP161 "PIR Pantry"         <motion> (SensorPIRThing,motions,GS161) ["Status","Presence"]  { channel="mqtt:topic:pihome:pirthing:SP161" }
Switch SP201 "PIR Hall"           <motion> (SensorPIRThing,motions,GS201) ["Status","Presence"]  { channel="mqtt:topic:pihome:pirthing:SP201" }
Switch SP211 "PIR Bathroom"       <motion> (SensorPIRThing,motions,GS211) ["Status","Presence"]  { channel="mqtt:topic:pihome:pirthing:SP211" }
Switch SP221 "PIR Guest room"     <motion> (SensorPIRThing,motions,GS221) ["Status","Presence"]  { channel="mqtt:topic:pihome:pirthing:SP221" }
Switch SP231 "PIR Bedroom"        <motion> (SensorPIRThing,motions,GS231) ["Status","Presence"]  { channel="mqtt:topic:pihome:pirthing:SP231" }
Switch SP241 "PIR Kids room"      <motion> (SensorPIRThing,motions,GS241) ["Status","Presence"]  { channel="mqtt:topic:pihome:pirthing:SP241" }

//BUlk creation of PIR modes (can handle the lights or not), no Channels for modes
Switch SP111_trigger "PIR Trigger Vestibule"      <motion> (SensorPIRThing,motions,GS111)       ["Point","Noise"]  
Switch SP121_trigger "PIR Trigger Toilet"         <motion> (SensorPIRThing,motions,GS121)       ["Point","Noise"]  
Switch SP161_trigger "PIR Trigger Pantry"         <motion> (SensorPIRThing,motions,GS161)       ["Point","Noise"]  
Switch SP211_trigger "PIR Trigger Bathroom"       <motion> (SensorPIRThing,motions,GS211)       ["Point","Noise"]  
Switch SP201_trigger "PIR Trigger Stairs"         <motion> (SensorPIRThing,motions,GS201,GS111) ["Point","Noise"]  
Switch SP141_trigger "PIR Trigger Technical"      <motion> (SensorPIRThing,motions,GS141)       ["Point","Noise"] 


Add comment

Nejlepší články z blogu

Nilan VP18 vs OpenHABRating: 
67.4%

We provide tutorial for the connection of the active Nilan recuperation unit, in our case the VP18 K WT type with OpenHAB 3. By communicating via Modbus it is possible to read the whole range of values, but mainly also to control the unit through OpenHAB. This allows us to remotely or programmatically change the performance and ventilation settings depending on the mode (night, cooking, etc.)

PiHome - Chytry dum mereni spotreby elektriny
Energy meter in smart homeRating: 
70.4%

We are providing a simple step-by-step tutorial how to install home energy meter. We did not find any MQTT device, so we buy Aeotec Home Energy Meter as we are already have a Z-Wave controlller in our smart home.

Centrální tablet pro chytrý dům
Wall tablet to controll your smart homeRating: 
100%

Wall tablet or older smartphone is perfectly suited as a central indicator of the state of the home, as well as controlling it. It usually replaces the video doorbell and as example, you can play your favorite music or read recipes on it during cooking in your kitchen. In the article, we describe a functional example of such a "wall" tablet and its settings in so-called kiosk mode so, display doesn't run at night and only reacts when someone is nearby.

Jablotron and smarthome synchronization
Connecting Jablotron with OpenHABRating: 
80%

In this article we will show you how to install Jablotron binding in OpenHAB. This binding helps us to synchronize states from Jablotron alarm to OpenHAB. Typically, you can force to switch off lights, close water pipe and circulation, switch off sockets or whatever you want to do when you leave home and set alarm.

Advanced disk cloningRating: 
0%

The classic disk cloning tool in linux is the dd command. This command creates a image of disk or extracts the contents from the image to disk. The dd tool needs to be handled carefully and you need to understand its use. We'll show a more advanced technique of creating a disc image that contains unallocated space. A classic example is when I have a Raspbian operating system installed on a 250 GB disc, but there's only a tiny boot partition (e.g. sda1) and my own operating system partition (sda2) which together have 15 GB. Instead of saving a 250 GB image, I would like to save only two partitions with 15 GB, so that the image is smaller and can be expanded to 16 or 32 GB flash.

iOS OpenVPN Connection SettingsRating: 
60%

In this article you will find detailed instructions on how to connect to OpenVPN from iOS devices.

Android OpenVPN Connection SettingsRating: 
80%

In this article you will find detailed instructions on how to connect to OpenVPN on Android.

OpenVPN on MikroTik routersRating: 
70%

If you have a smart-home, NAS, etc., it's a good idea to think about safe access to your network when you are not at home. Currently I recommend commercial router like Turris or a cheaper option of MikroTik routers. In the other hand, Raspberry Pi can be used as OpenVPN server too. In this article, we will show how to set up secure access to your home network from the internet using OpenVPN on MikroTik routers.

Video intercom Doorbird in OpenHABRating: 
0%

Native support for OpenHAB is provided by video intercom by Doorbird company. The solution is powered and connected by a UTP cable and has its own IP address to make it easier for you to install at the gate. OpenHAB is then able to import images from the intercom, visit history, manage gate opening on the button and by the phone, do not disturb feature during night, alarm feature etc. In the instructions we guide you how to use OpenHAB with Doorbird D101.