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

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


mqtt-io-jethub-d1  

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


MQTT-IO config for JetHome JetHub D1 (4 inputs и 3 relays)

Unexport

# echo 436 452 453 454 455 456 462 467 469 470 471 472 | xargs -n 1 echo >/sys/class/gpio/unexport

/etc/mqtt-io-config.yaml

mqtt:
  host: 127.0.0.1
  user: XXXXXXXXXXXX
  password: XXXXXXXXXXXX
  topic_prefix: mqtt-io
  ha_discovery:
    enabled: yes
 
# GPIO
gpio_modules:
    - name: gpio
      module: gpiod
      chip: /dev/gpiochip0

digital_inputs:
    - name: button
      module: gpio
      pin: 10
      poll_interval: 0.1
      ha_discovery:
           component: binary_sensor
           name: Front Button

    - name: input1
      module: gpio
      pin: 46
      poll_interval: 0.1
      ha_discovery:
           component: binary_sensor
           name: Input 1
    - name: input2
      module: gpio
      pin: 45
      poll_interval: 0.1
      ha_discovery:
           component: binary_sensor
           name: Input 2
    - name: input3
      module: gpio
      pin: 44
      poll_interval: 0.1
      ha_discovery:
           component: binary_sensor
           name: Input 3
    - name: input4
      module: gpio
      pin: 43
      poll_interval: 0.1
      ha_discovery:
           component: binary_sensor
           name: Input 4

digital_outputs:
    - name: output1
      module: gpio
      pin: 30
      initial: low
      publish_initial: true
      ha_discovery:
          component: switch
          name: Relay 1
    - name: output2
      module: gpio
      pin: 29
      initial: low
      publish_initial: true
      ha_discovery:
          component: switch
          name: Relay 2
    - name: output3
      module: gpio
      pin: 28
      initial: low
      publish_initial: true
      ha_discovery:
          component: switch
          name: Relay 3
mqtt-io-jethub-d1.1631716312.txt.gz · Последнее изменение: 2021/09/15 17:31 — Pavel Sokolov

Инструменты страницы