JSON, Home-Assistant, ZigBee,Tasmota-zigbee

Пример:

{“ZbReceived”:{“0x8982”:{“Device”:”0x8982″,”0006!01″:””,”Power”:1,“Endpoint”:1,”LinkQuality”:117}}}

value_json.ZbReceived[‘0x8982’].Endpoint

1

Так более правильно:


- platform: mqtt
    unique_id: ZigBeeV1Switch_8
    name: ZigBeeV1Switch_8
    state_topic: "tele/ZigBeeTest/SENSOR"
    value_template: |-
      {%- if value_json.ZbReceived is defined and value_json.ZbReceived['0x8982'] is defined -%}
      {%- if value_json.ZbReceived['0x8982'].Endpoint == 8 -%}
      {%- if value_json.ZbReceived['0x8982'].Power == 1 -%}
      ON
      {% else %}
      OFF
      {% endif %}
      {% endif %}
      {% endif %}
    state_on: "ON"
    state_off: "OFF"
    command_topic: "cmnd/ZigBeeTest/ZbSend"
    payload_on: '{ "device":"0x8982", "Endpoint":8, "send":{"Power":"on"} }'
    payload_off: '{ "device":"0x8982", "Endpoint":8, "send":{"Power":"off"} }'
    availability_topic: "tele/ZigBeeTest/LWT"
    payload_available: "Online"
    payload_not_available: "Offline"
    qos: 1
    retain: false
# ---------------------------------------------

Включение-Выключение через пульт ИК (Tasmota-Home-Assistant)

В Новых версия Tasmota Hash-поменяли на-Data

value_template: '{{ value_json[''IrReceived''].Data }}'

- id: '1635253773568'
  alias: ПРОВЕРКА КНОПКИ
  description: ''
  trigger:
  - platform: mqtt
    topic: tele/romikETH/RESULT
    value_template: '{{ value_json[''IrReceived''].Hash }}'
    payload: '0x3D4C1879'
  condition: []
  action:
  - service: switch.toggle
    target:
      entity_id: switch.romiketh1
  mode: single

Все можно прописать в самом Home-Assistant.

5-Relay Контролер для умного дома Ver 1.0 (Tasmota,HomeAssistant)

Схема.

Порты реле внизу.

Порты выхода Реле 1-5 Реле и просто 6-7-8 порты Output 5V.

backlog sensor29 0,5,0; sensor29 1,5,0; sensor29 2,5,0; sensor29 3,5,0
backlog sensor29 4,5,0; sensor29 5,5,0; sensor29 6,5,0; sensor29 7,5,0

backlog SetOption36 0;SetOption65 1;wificonfig 4; SetOption59 1; TimeZone +3;TelePeriod 150

Входы:

backlog sensor29 8,2,1; sensor29 9,2,1; sensor29 10,2,1; sensor29 11,2,1

Правила пример:

on event#MCPINT_D11=1 do power4 on endon on event#MCPINT_D11=0 do power4 off endon
on event#MCPINT_D10=1 do power3 on endon on event#MCPINT_D10=0 do power3 off endon
on event#MCPINT_D9=1 do power2 on endon on event#MCPINT_D9=0 do power2 off endon
on event#MCPINT_D8=1 do power1 on endon on event#MCPINT_D8=0 do power1 off endon

При рестарте ВЫКЛЮЧИТЬ ВСЕ РЕЛЕ:

ON system#boot DO Power0 0 ENDON

Схема: DipTrace Schematic – 5-Relay-Version-1.0.dch Лист 1

 

Tasmota,Relay Module,RS485,ESP8266 Контроллер Умного Дома BIG 1.0

Схема Подключения BIG Tasmota (PDF)

USB

U2 GPIO15/GPIO13 = GPIO13 TASMOTA

backlog sensor29 0,2,1; sensor29 1,2,1; sensor29 2,2,1; sensor29 3,2,1
backlog sensor29 4,2,1; sensor29 5,2,1; sensor29 6,2,1; sensor29 7,2,1
backlog SetOption36 0;SetOption65 1;wificonfig 4; SetOption59 1; timezone +3

PZEM-016 RS485
PZEM-016 RS485

Схема: DipTrace Schematic – BIG-Tasmota-V1.0

Немного фоток сборки.