mqtt.cfg
wb.url=tcp://192.168.1.22:1883
wb.retain=true
wb.clientId=openHab2
wb.async=true
mqtt-eventbus - ничего не надо
items.conf
Number WB_Temperature “Температура [%.1f °C]” (wb,sensor5min) [ “CurrentTemperature” ] {mqtt="<[wb:/devices/wb-w1/controls/28-021564be82ff:state:default]"}
String WB_Contact16 “Контакт 16” (wb) { mqtt="<[wb:/devices/wb-gpio/controls/EXT1_DR16:state:MAP(wb_contact.map)]" }
Dimmer WB_Led “Лента” (wb) { mqtt="<[wb:/devices/led/controls/White:state:JS(wb_255_to_100.js)], >[wb:/devices/led/controls/White/on:command::JS(wb_100_to_255.js)]" }
Number WB_Led_Switch1 “Лента: Кнопка 1” (wb) { mqtt="<[wb:/devices/led/controls/Button 1:state:default], >[wb:/devices/led/controls/Button 1:command::default]" }
Number WB_Led_Switch2 “Лента: Кнопка 2” (wb) { mqtt="<[wb:/devices/led/controls/Button 2:state:default], >[wb:/devices/led/controls/Button 2:command::default]" }
Number WB_Led_Switch3 “Лента: Кнопка 3” (wb) { mqtt="<[wb:/devices/led/controls/Button 3:state:default], >[wb:/devices/led/controls/Button 3:command::default]" }
String WB_Led_RGB_Channel “Лента: RGB channel” (wb) { mqtt="<[wb:/devices/led/controls/RGB:state:default], >[wb:/devices/led/controls/RGB/on:command:*:default]" }
Color WB_Led_Color “Лента: Цвет” (wb)
Switch WB_Relay1_Channel1 “Реле 1: Канал 1” (wb) { mqtt="<[wb:/devices/relay1/controls/Relay 1:state:MAP(wb_relay_in.map)], >[wb:/devices/relay1/controls/Relay 1/on:command::MAP(wb_relay_out.map)]" }
Switch WB_Relay1_Channel2 “Реле 1: Канал 2” (wb) { mqtt="<[wb:/devices/relay1/controls/Relay 2:state:MAP(wb_relay_in.map)], >[wb:/devices/relay1/controls/Relay 2/on:command::MAP(wb_relay_out.map)]" }
Number WB_Sensor1_Temperature “Температура [%.1f °C]” (wb,sensor5min) {mqtt="<[wb:/devices/sensor1/controls/Temperature:state:default]"}
Number WB_Sensor1_Humidity “Влажность [%.1f %%]” (wb,sensor5min) {mqtt="<[wb:/devices/sensor1/controls/Humidity:state:default]"}
Number WB_Sensor1_SoundLevel “Шум [%.1f дБ]” (wb,sensor5min) {mqtt="<[wb:/devices/sensor1/controls/Sound Level:state:default]"}
Number WB_Sensor1_Lux “Освещенность [%.1f лк]” <sun_clouds> (wb,sensor5min) {mqtt="<[wb:/devices/sensor1/controls/Illuminance:state:default]"}
Number WB_Sensor1_CO2 “CO2 [%d ppm]” (wb,sensor5min) {mqtt="<[wb:/devices/sensor1/controls/CO2:state:default]"}
Number WB_Sensor1_AirQuality “Качество воздуха [%d ppb]” (wb,sensor5min) {mqtt="<[wb:/devices/sensor1/controls/Air Quality (VOC):state:default]"}
Number WB_Sensor1_CurrentMotion “Текущее Движение [%d]” (wb,sensor5min) {mqtt="<[wb:/devices/sensor1/controls/Current Motion:state:default]"}
Number WB_Sensor1_MaxMotion “Макс Движение [%d]” (wb,sensor5min) {mqtt="<[wb:/devices/sensor1/controls/Max Motion:state:default]"}
Switch WB_Sensor1_Buzzer “Пищалка” (wb) {mqtt="<[wb:/devices/sensor1/controls/Buzzer:state:MAP(wb_relay_in.map)], >[wb:/devices/sensor1/controls/Buzzer/on:command::MAP(wb_relay_out.map)]"}
Switch WB_Sensor1_GreenLED “Зеленая лампочка” (wb) {mqtt="<[wb:/devices/sensor1/controls/Green LED:state:MAP(wb_relay_in.map)], >[wb:/devices/sensor1/controls/Green LED/on:command::MAP(wb_relay_out.map)]"}
Switch WB_Sensor1_RedLED “Красная лампочка” (wb) {mqtt="<[wb:/devices/sensor1/controls/Red LED:state:MAP(wb_relay_in.map)], >[wb:/devices/sensor1/controls/Red LED/on:command::MAP(wb_relay_out.map)]"}
Dimmer WB_Sensor1_LedDuration “Led длительность” (wb) {mqtt="<[wb:/devices/sensor1/controls/LED Glow Duration (ms):state:default], >[wb:/devices/sensor1/controls/LED Glow Duration (ms):command::default]"}
Dimmer WB_Sensor1_LedPeriod “Led период” (wb) {mqtt="<[wb:/devices/sensor1/controls/LED Period (s):state:default], >[wb:/devices/sensor1/controls/LED Period (s):command:*:default]"}
items.conf.txt (4,4 КБ)
У меня, в конфиге, используются transformations:
wb_relay_out.map
1=ON
0=OFF
wb_contact.map
1=Закрыто
0=Открыто