Инструменты пользователя

Инструменты сайта


интеграция_с_homeassistant

Это старая версия документа!


Контроллер LightHub прекрасно интегрируется в систему Home Assistant с использованием MQTT В настоящее время, реализованы и используются следующие интеграции:

* Реле и дискретные выключатели * Диммируемые одноцветные светильники * Диммируемые цветные светильники (RGB/RGBW) * Термостаты теплого пола * Кондиционер * Сенсоры температуры * Сенсоры влажности * Сенсоры CO2

# Sensors
sensor:
  # Weather prediction
  - platform: yr
  - platform: mqtt
    name: "CO2 Саша"
    icon: "mdi:periodic-table-co2"
    expire_after: 600
    state_topic: "myhome/sasha/airq/CO2"
    unit_of_measurement: 'ppm'
    availability_topic: "myhome/light-d2/$state"
    payload_available: "ready"
    payload_not_available: "disconnected"
  - platform: mqtt
    name: "TVOC Саша"
    expire_after: 600
    state_topic: "myhome/sasha/airq/TVOC"
    unit_of_measurement: 'ppm'
    availability_topic: "myhome/light-d2/$state"
    payload_available: "ready"
    payload_not_available: "disconnected"
  - platform: mqtt
    name: "Влажность Саша"
    icon: "mdi:water-percent"
    expire_after: 600
    state_topic: "myhome/sasha/humidity/H"
    unit_of_measurement: '%'
    availability_topic: "myhome/light-d2/$state"
    payload_available: "ready"
    payload_not_available: "disconnected"       
   
  - platform: mqtt
    name: "CO2"
    icon: "mdi:periodic-table-co2"
    expire_after: 600
    state_topic: "myhome/s_out/airq2/CO2"
    unit_of_measurement: 'ppm'
    availability_topic: "myhome/wemos/$state"
    payload_available: "ready"
    payload_not_available: "disconnected"
  - platform: mqtt
    name: "TVOC"
    expire_after: 600
    state_topic: "myhome/s_out/airq2/TVOC"
    unit_of_measurement: 'ppm'
    availability_topic: "myhome/wemos/$state"
    payload_available: "ready"
    payload_not_available: "disconnected"
  - platform: mqtt
    name: "Влажность"
    icon: "mdi:water-percent"
    expire_after: 600
    state_topic: "myhome/s_out/humidity2/H"
    unit_of_measurement: '%'
    availability_topic: "myhome/wemos/$state"
    payload_available: "ready"
    payload_not_available: "disconnected"    
  - platform: mqtt
    name: "Влажность спальня"
    icon: "mdi:water-percent"
    expire_after: 600
    state_topic: "myhome/s_out/A2_H"
    unit_of_measurement: '%'
  - platform: mqtt
    name: "CO2 спальня"
    icon: "mdi:periodic-table-co2"
    expire_after: 600
    state_topic: "myhome/s_out/A2_CO"
    unit_of_measurement: 'ppm'
  - platform: mqtt
    name: "Горячая вода"
    icon: "mdi:water-outline"
    state_topic: "myhome/s_out/acount_hot/store"
    unit_of_measurement: 'м3'
  - platform: mqtt
    name: "Холодная вода"
    icon: "mdi:water"
    state_topic: "myhome/s_out/acount_cold/store"
    unit_of_measurement: 'м3'
  - platform: mqtt
    name: "На улице"
    icon: "mdi:thermometer"
    state_topic: "myhome/s_out/t_outside"
    unit_of_measurement: '°C'
    expire_after: 600
  - platform: mqtt
    name: "Воздух гостиная"
    icon: "mdi:thermometer"
    state_topic: "myhome/s_out/t_kitchen"
    unit_of_measurement: '°C'
    expire_after: 600
  - platform: mqtt
    name: "Влажность ванная"
    icon: "mdi:water-percent"
    expire_after: 600
    state_topic: "myhome/s_out/dhtH"
    unit_of_measurement: '%'
  - platform: mqtt
    name: "Воздух ванная"
    icon: "mdi:thermometer"
    expire_after: 600
    state_topic: "myhome/s_out/dhtT"
    unit_of_measurement: '°C'   
  - platform: mqtt
    name: "Воздух прихожая"
    icon: "mdi:thermometer"
    expire_after: 600
    state_topic: "myhome/s_out/t_aentr"
    unit_of_measurement: '°C'  
  
  - platform: mqtt    
    name: "Воздух душ"
    icon: "mdi:thermometer"
    expire_after: 600
    state_topic: "myhome/s_out/t_abath1"
    unit_of_measurement: '°C' 
    
  - platform: mqtt    
    name: "Воздух кондиционера"
    icon: "mdi:thermometer"
    expire_after: 600
    state_topic: "myhome/s_out/t_ac"
    unit_of_measurement: '°C' 
    
  - platform: mqtt    
    name: "Воздух внеш"
    icon: "mdi:thermometer"
    expire_after: 600
    state_topic: "myhome/s_out/t_ext"
    unit_of_measurement: '°C'      
    
  - platform: mqtt
    name: "Heater power"
    state_topic: "myhome/s_out/fm_stat"
    icon: "mdi:radiator"
    unit_of_measurement: '%'
    value_template: "{{ value_json.pwr }}"
  - platform: mqtt    
    name: "Fan RPM"
    icon: "mdi:fan"
    state_topic: "myhome/s_out/fm_stat"
    unit_of_measurement: 'RPM'
    value_template: "{{ value_json.RPM }}"
  - platform: mqtt  
    name: "Fan Current"
    icon: "mdi:current-ac"
    state_topic: "myhome/s_out/fm_stat"
    unit_of_measurement: 'A'
    value_template: "{{ value_json.I }}"
  - platform: mqtt    
    name: "Fan Fault"
    icon: "mdi:alert"
    state_topic: "myhome/s_out/fm_stat"
    value_template: "{{ value_json.flt }}"   
#  - platform: mqtt    
#    name: "Fan Temp"
#    state_topic: "myhome/s_out/fm_stat"
#    unit_of_measurement: '°C'  
#    value_template: "{{ value_json.t }}"    
#  - platform: mqtt    
#    name: "Fan Temp set"
#    state_topic: "myhome/s_out/fm_stat"
#    unit_of_measurement: '°C'  
#    value_template: "{{ value_json.set }}"     
    
    
# Text to speech
tts:
#  - platform: google_translate
#    service_name: google_say

# Cloud
cloud:

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml

#panel_iframe:
#  nodered:
#    title: LightServ
#    icon: mdi:sitemap
#    url: http://192.168.88.63

zeroconf:

mqtt:
  broker: 192.168.88.2
  port: 1883
  client_id: home-assistant-1
  keepalive: 60
#  username: !secret mqtt_login
#  password: !secret mqtt_password
  protocol: 3.1
  birth_message:
    topic: "myhome/hass1/LWT"
    payload: "Online"
    qos: 1
    retain: true
  will_message:
    topic: "myhome/hass1/LWT"
    payload: "Offline"
    qos: 1
    retain: true

light:
  - platform: mqtt
    name: "Приток"
    state_topic: "myhome/s_out/fm/cmd"
    command_topic: "myhome/in/fm/cmd"
    brightness_scale: 100
    brightness_command_topic: "myhome/in/fm/set"
    brightness_state_topic: "myhome/s_out/fm/set"    
#    qos: 1
    
  - platform: mqtt
    name: "Прихожая"
    state_topic: "myhome/s_out/spots_en"
    command_topic: "myhome/in/spots_en"
    qos: 1
    
  - platform: mqtt
    name: Кухня точки
    command_topic: "myhome/in/ktc/cmd"
    state_topic: "myhome/s_out/ktc/cmd"
    brightness_scale: 100
    brightness_command_topic: "myhome/in/ktc/set"
    brightness_state_topic: "myhome/s_out/ktc/set"
    
  - platform: mqtt
    name: Гостиная точки
    command_topic: "myhome/in/gst/cmd"
    state_topic: "myhome/s_out/gst/cmd"
    brightness_scale: 100
    brightness_command_topic: "myhome/in/gst/set"
    brightness_state_topic: "myhome/s_out/gst/set"

  - platform: mqtt
    name: Ванна точки
    command_topic: "myhome/in/bth1/cmd"
    state_topic: "myhome/s_out/bth1/cmd"
    brightness_scale: 100
    brightness_command_topic: "myhome/in/bth1/set"
    brightness_state_topic: "myhome/s_out/bth1/set"

  - platform: mqtt
    name: Ванна люстра
    command_topic: "myhome/in/bth2/cmd"
    state_topic: "myhome/s_out/bth2/cmd"
    brightness_scale: 100
    brightness_command_topic: "myhome/in/bth2/set"
    brightness_state_topic: "myhome/s_out/bth2/set"
    
  - platform: mqtt
    name: Балкон спальня
    command_topic: "myhome/in/balk2/cmd"
    state_topic: "myhome/s_out/balk2/cmd"
    brightness_scale: 100
    brightness_command_topic: "myhome/in/balk2/set"
    brightness_state_topic: "myhome/s_out/balk2/set"
 
  - platform: mqtt
    name: Балкон Вика
    command_topic: "myhome/in/balk1/cmd"
    state_topic: "myhome/s_out/balk1/cmd"
    brightness_scale: 100
    brightness_command_topic: "myhome/in/balk1/set"
    brightness_state_topic: "myhome/s_out/balk1/set"
    
  - platform: mqtt
    name: Точки спальня
    command_topic: "myhome/in/bedrspot/cmd"
    state_topic: "myhome/s_out/bedrspot/cmd"
    brightness_scale: 100
    brightness_command_topic: "myhome/in/bedrspot/set"
    brightness_state_topic: "myhome/s_out/bedrspot/set"
 
  - platform: mqtt
    name: Шкаф Вика
    command_topic: "myhome/in/vikaspot/cmd"
    state_topic: "myhome/s_out/vikaspot/cmd"
    brightness_scale: 100
    brightness_command_topic: "myhome/in/vikaspot/set"
    brightness_state_topic: "myhome/s_out/vikaspot/set"   
    
  - platform: mqtt
    name: Кухня LED
    command_topic: "myhome/in/kuh/cmd"
    state_topic: "myhome/s_out/kuh/cmd"
    hs_command_topic: "myhome/in/kuh/set"
    hs_state_topic: "myhome/s_out/kuh/set"  
    hs_value_template: "{{ value.split(',')[0],value.split(',')[1] }}"
    brightness_scale: 100
    brightness_command_topic: "myhome/in/kuh/set"
    brightness_state_topic: "myhome/s_out/kuh/set"
    brightness_value_template: "{{ value.split(',')[2] }}"
    
  - platform: mqtt
    name: Гостиная LED
    command_topic: "myhome/in/gost/cmd"
    state_topic: "myhome/s_out/gost/cmd"
    hs_command_topic: "myhome/in/gost/set"
    hs_state_topic: "myhome/s_out/gost/set"  
    hs_value_template: "{{ value.split(',')[0],value.split(',')[1] }}"
    brightness_scale: 100
    brightness_command_topic: "myhome/in/gost/set"
    brightness_state_topic: "myhome/s_out/gost/set"
    brightness_value_template: "{{ value.split(',')[2] }}"    

  - platform: mqtt
    name: Саша LED
    command_topic: "myhome/in/sasha/cmd"
    state_topic: "myhome/s_out/sasha/cmd"
    hs_command_topic: "myhome/in/sasha/set"
    hs_state_topic: "myhome/s_out/sasha/set"  
    hs_value_template: "{{ value.split(',')[0],value.split(',')[1] }}"
    brightness_scale: 100
    brightness_command_topic: "myhome/in/sasha/set"
    brightness_state_topic: "myhome/s_out/sasha/set"
    brightness_value_template: "{{ value.split(',')[2] }}"
    
  - platform: mqtt
    name: Вика LED
    command_topic: "myhome/in/vika/cmd"
    state_topic: "myhome/s_out/vika/cmd"
    hs_command_topic: "myhome/in/vika/set"
    hs_state_topic: "myhome/s_out/vika/set"  
    hs_value_template: "{{ value.split(',')[0],value.split(',')[1] }}"
    brightness_scale: 100
    brightness_command_topic: "myhome/in/vika/set"
    brightness_state_topic: "myhome/s_out/vika/set"
    brightness_value_template: "{{ value.split(',')[2] }}"
    
  - platform: mqtt
    name: Спальня LED
    command_topic: "myhome/in/bedr/cmd"
    state_topic: "myhome/s_out/bedr/cmd"
    hs_command_topic: "myhome/in/bedr/set"
    hs_state_topic: "myhome/s_out/bedr/set"  
    hs_value_template: "{{ value.split(',')[0],value.split(',')[1] }}"
    brightness_scale: 100
    brightness_command_topic: "myhome/in/bedr/set"
    brightness_state_topic: "myhome/s_out/bedr/set"
    brightness_value_template: "{{ value.split(',')[2] }}"
    
  - platform: mqtt
    name: Ванна LED
    command_topic: "myhome/in/bthr/cmd"
    state_topic: "myhome/s_out/bthr/cmd"
    hs_command_topic: "myhome/in/bthr/set"
    hs_state_topic: "myhome/s_out/bthr/set"  
    hs_value_template: "{{ value.split(',')[0],value.split(',')[1] }}"
    brightness_scale: 100
    brightness_command_topic: "myhome/in/bthr/set"
    brightness_state_topic: "myhome/s_out/bthr/set"
    brightness_value_template: "{{ value.split(',')[2] }}"    
#TODO white cmd & state
#    white_value_command_topic: "myhome/in/kuhline/w"
#    white_value_scale: 100
# white_value_state_topic 


switch:
  - platform: mqtt
    name: "Air heat"
    icon: "mdi:radiator"
    state_topic: "myhome/s_out/fm_t/cmd"
    command_topic: "myhome/in/fm_t/cmd"
  - platform: mqtt    
    name: "Air auto"
    icon: "mdi:auto-fix"
    state_topic: "myhome/s_out/fm_auto"
    command_topic: "myhome/in/fm_auto"    
  - platform: mqtt
    name: "Перекрыть воду"
    icon: "mdi:water-off"
    state_topic: "myhome/s_out/alock_leak"
    command_topic: "myhome/in/alock"
    qos: 1
  - platform: mqtt
    name: "Сушилки"
    icon: "mdi:radiator"
    state_topic: "myhome/s_out/h_polotenc"
    command_topic: "myhome/in/h_polotenc"
    qos: 1
  - platform: mqtt
    name: "Бойлер большой"
    state_topic: "myhome/s_out/h_boil1"
    command_topic: "myhome/in/h_boil1"
    qos: 1    
  - platform: mqtt
    name: "Бойлер малый"
    state_topic: "myhome/s_out/h_boil2"
    command_topic: "myhome/in/h_boil2"
    qos: 1      
  - platform: mqtt
    name: "Аудио гостиная"
#    state_topic: "myhome/s_out/h_boil1"
    command_topic: "myhome/av/zone1"
    qos: 1    
  - platform: mqtt
    name: "Аудио санузлы"
#    state_topic: "myhome/s_out/h_boil2"
    command_topic: "myhome/av/zone2"
    qos: 1      
  - platform: mqtt
    name: "Громче гостиная"
#    state_topic: "myhome/s_out/h_boil1"
    command_topic: "myhome/av/zone1/vol/up"
    qos: 1    
  - platform: mqtt
    name: "Громче санузлы"
#    state_topic: "myhome/s_out/h_boil2"
    command_topic: "myhome/av/zone2/vol/up"
    qos: 1 
  - platform: mqtt
    name: "Тише гостиная"
#    state_topic: "myhome/s_out/h_boil1"
    command_topic: "myhome/av/zone1/vol/dn"
    qos: 1    
  - platform: mqtt
    name: "Тише санузлы"
#    state_topic: "myhome/s_out/h_boil2"
    command_topic: "myhome/av/zone2/vol/dn"
    qos: 1      

google_assistant:
  project_id: lazy-home-aa5b4
  api_key: AIzaSyDt4DnAZJnKcBnWhUsPB8jVJGPyDkNnAYI
  expose_by_default: true

homekit:

climate:
  - platform: mqtt
    name: Вентиляция
    modes:
      - "off"
      - "fan_only"      
      - "heat"
      - "auto"
    mode_command_topic: "myhome/in/fm/cmd"
    mode_state_topic: "myhome/s_out/fm/cmd"
    mode_state_template: "{{value|lower()}}"    
    temperature_command_topic: "myhome/in/fm_t/set"
    temperature_state_topic: "myhome/s_out/fm_t/set"
#    temperature_state_template: "{{ value_json.set }}"
    current_temperature_topic: "myhome/s_out/fm_stat"
    current_temperature_template: "{{ value_json.t }}"
    
  - platform: mqtt
    name: Кондиционер
    modes:
      - "off"
      - "cool"
      - "fan_only"
      - "heat"
      - "auto"
    fan_modes:
      - "auto"
      - "high"
      - "medium"
      - "low"
    swing_modes:
      - "on"
      - "off"      
    swing_mode_state_topic: "myhome/s_out/ac/swing"
    swing_mode_command_topic: "myhome/in/ac/swing"
    swing_mode_state_template: "{{value|lower()}}"
    mode_command_topic: "myhome/in/ac/cmd"
    mode_state_topic: "myhome/s_out/ac/cmd"
    mode_state_template: "{{value|lower()}}"
    temperature_command_topic: "myhome/in/ac/set"
    temperature_state_topic: "myhome/s_out/ac/set"
    fan_mode_command_topic: "myhome/in/ac/fan"
    fan_mode_state_topic: "myhome/s_out/ac/fan"
    fan_mode_state_template: "{{value|lower()}}"
    current_temperature_topic: "myhome/s_out/ac/temp"

  - platform: mqtt
    name: "Теплый пол душ"
    modes:
      - "off"
      - "heat"
      - "auto"
    mode_command_topic: "myhome/in/h_bath1/cmd"
    temperature_command_topic: "myhome/in/h_bath1/set"
    mode_state_topic: "myhome/s_out/h_bath1/cmd"
    mode_state_template: "{{value|lower()}}"
    temperature_state_topic: "myhome/s_out/h_bath1/set"
    current_temperature_topic: "myhome/s_out/t_bath1"

  - platform: mqtt
    name: "Теплый пол ванна"
    modes:
      - "off"
      - "heat"
      - "auto"
    mode_command_topic: "myhome/in/h_bath2/cmd"
    temperature_command_topic: "myhome/in/h_bath2/set"
    mode_state_topic: "myhome/s_out/h_bath2/cmd"
    mode_state_template: "{{value|lower()}}"
    temperature_state_topic: "myhome/s_out/h_bath2/set"
    current_temperature_topic: "myhome/s_out/t_bath2"

  - platform: mqtt
    name: "Теплый пол прихожая"
    modes:
      - "off"
      - "heat"
      - "auto"
    mode_command_topic: "myhome/in/h_entr/cmd"
    temperature_command_topic: "myhome/in/h_entr/set"
    mode_state_topic: "myhome/s_out/h_entr/cmd"
    mode_state_template: "{{value|lower()}}"
    temperature_state_topic: "myhome/s_out/h_entr/set"
    current_temperature_topic: "myhome/s_out/t_entr2"

  - platform: mqtt
    name: "Теплый пол балкон спальня"
    modes:
      - "off"
      - "heat"
      - "auto"
    mode_command_topic: "myhome/in/h_balk2/cmd"
    temperature_command_topic: "myhome/in/h_balk2/set"
    mode_state_topic: "myhome/s_out/h_balk2/cmd"
    mode_state_template: "{{value|lower()}}"
    temperature_state_topic: "myhome/s_out/h_balk2/set"
    current_temperature_topic: "myhome/s_out/t_balk2"    
    
  - platform: mqtt
    name: "Теплый пол балкон Вика"
    modes:
      - "off"
      - "heat"
      - "auto"
    mode_command_topic: "myhome/in/h_balk1/cmd"
    temperature_command_topic: "myhome/in/h_balk1/set"
    mode_state_topic: "myhome/s_out/h_balk1/cmd"
    mode_state_template: "{{value|lower()}}"
    temperature_state_topic: "myhome/s_out/h_balk1/set"
    current_temperature_topic: "myhome/s_out/t_balk1"   

  - platform: mqtt
    name: "Климат спальня"
    modes:
      - "off"
      - "heat"
      - "auto"
      - "cool"
      - "fan_only"
    mode_command_topic: "myhome/in/c_bedr/cmd"
    temperature_command_topic: "myhome/in/c_bedr/set"
    mode_state_topic: "myhome/s_out/c_bedr/cmd"
    mode_state_template: "{{value|lower()}}"
    temperature_state_topic: "myhome/s_out/c_bedr/set"
    current_temperature_topic: "myhome/s_out/t_bedr"    
    
  - platform: mqtt
    name: "Климат Вика"
    modes:
      - "off"
      - "heat"
      - "auto"
      - "cool"
      - "fan_only"
    mode_command_topic: "myhome/in/c_vika/cmd"
    temperature_command_topic: "myhome/in/c_vika/set"
    mode_state_topic: "myhome/s_out/c_vika/cmd"
    mode_state_template: "{{value|lower()}}"
    temperature_state_topic: "myhome/s_out/c_vika/set"
    current_temperature_topic: "myhome/s_out/t_vika"

  - platform: mqtt
    name: "Климат Саша"
    modes:
      - "off"
      - "heat"
      - "auto"
      - "cool"
      - "fan_only"
    mode_command_topic: "myhome/in/c_sasha/cmd"
    temperature_command_topic: "myhome/in/c_sasha/set"
    mode_state_topic: "myhome/s_out/c_sasha/cmd"
    mode_state_template: "{{value|lower()}}"
    temperature_state_topic: "myhome/s_out/c_sasha/set"
    current_temperature_topic: "myhome/s_out/t_sasha"
    
    
интеграция_с_homeassistant.1586962995.txt.gz · Последнее изменение: 2020/04/15 18:03 — 192.168.88.1