Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
home assistant RC 2022.6 mqtt config update for configuration.yaml
#11
You are 100% correct, there is an error in binary sensor and i can't restart homeassistant
I hope you will correct the error
Reply
#12
tomorrow when we begin work, for a test.
Reply
#13
these is picture erorr


Attached Files Image(s)
       
Reply
#14
can you upload your "relay" and "input" config yaml file?
Reply
#15
update configuration.yaml but not work


Attached Files
.txt   config yaml file.txt (Size: 12.01 KB / Downloads: 204)
Reply
#16
config yaml file download:

.txt   new-mqtt-ha.txt (Size: 12.1 KB / Downloads: 222)
you can update as these format:
Code:
mqtt:
  broker: 192.168.1.96
  port: 1883
  username: mqtt
  password: 123

  switch:
   - name: 'output-1'
     unique_id: output-1
     state_topic: 'relay32/8ae082ec66f37db231cf2b8f/state'
     command_topic: 'relay32/8ae082ec66f37db231cf2b8f/set'
     payload_on:  '{"relay1":{"on":1}}'
     payload_off:  '{"relay1":{"on":0}}'
     value_template: '{{ value_json.relay1.on }}'
     state_on: 1
     state_off: 0

   - name: 'output-2'
     unique_id: output-2
     state_topic: 'relay32/8ae082ec66f37db231cf2b8f/state'
     command_topic: 'relay32/8ae082ec66f37db231cf2b8f/set'
     payload_on:  '{"relay2":{"on":1}}'
     payload_off:  '{"relay2":{"on":0}}'
     value_template: '{{ value_json.relay2.on }}'
     state_on: 1
     state_off: 0

   - name: 'output-3'
     unique_id: output-3
     state_topic: 'relay32/8ae082ec66f37db231cf2b8f/state'
     command_topic: 'relay32/8ae082ec66f37db231cf2b8f/set'
     payload_on:  '{"relay3":{"on":1}}'
     payload_off:  '{"relay3":{"on":0}}'
     value_template: '{{ value_json.relay3.on }}'
     state_on: 1
     state_off: 0

   - name: 'output-4'
     unique_id: output-4
     state_topic: 'relay32/8ae082ec66f37db231cf2b8f/state'
     command_topic: 'relay32/8ae082ec66f37db231cf2b8f/set'
     payload_on:  '{"relay4":{"on":1}}'
     payload_off:  '{"relay4":{"on":0}}'
     value_template: '{{ value_json.relay4.on }}'
     state_on: 1
     state_off: 0

   - name: 'output-5'
     unique_id: output-5
     state_topic: 'relay32/8ae082ec66f37db231cf2b8f/state'
     command_topic: 'relay32/8ae082ec66f37db231cf2b8f/set'
     payload_on:  '{"relay5":{"on":1}}'
     payload_off:  '{"relay5":{"on":0}}'
     value_template: '{{ value_json.relay5.on }}'
     state_on: 1
     state_off: 0

   - name: 'output-6'
     unique_id: output-6
     state_topic: 'relay32/8ae082ec66f37db231cf2b8f/state'
     command_topic: 'relay32/8ae082ec66f37db231cf2b8f/set'
     payload_on:  '{"relay6":{"on":1}}'
     payload_off:  '{"relay6":{"on":0}}'
     value_template: '{{ value_json.relay6.on }}'
     state_on: 1
     state_off: 0

   - name: 'output-7'
     unique_id: output-7
     state_topic: 'relay32/8ae082ec66f37db231cf2b8f/state'
     command_topic: 'relay32/8ae082ec66f37db231cf2b8f/set'
     payload_on:  '{"relay7":{"on":1}}'
     payload_off:  '{"relay7":{"on":0}}'
     value_template: '{{ value_json.relay7.on }}'
     state_on: 1
     state_off: 0

   - name: 'output-8'
     unique_id: output-8
     state_topic: 'relay32/8ae082ec66f37db231cf2b8f/state'
     command_topic: 'relay32/8ae082ec66f37db231cf2b8f/set'
     payload_on:  '{"relay8":{"on":1}}'
     payload_off:  '{"relay8":{"on":0}}'
     value_template: '{{ value_json.relay8.on }}'
     state_on: 1
     state_off: 0

   - name: 'output-9'
     unique_id: output-9
     state_topic: 'relay32/8ae082ec66f37db231cf2b8f/state'
     command_topic: 'relay32/8ae082ec66f37db231cf2b8f/set'
     payload_on:  '{"relay9":{"on":1}}'
     payload_off:  '{"relay9":{"on":0}}'
     value_template: '{{ value_json.relay9.on }}'
     state_on: 1
     state_off: 0

   - name: 'output-10'
     unique_id: output-10
     state_topic: 'relay32/8ae082ec66f37db231cf2b8f/state'
     command_topic: 'relay32/8ae082ec66f37db231cf2b8f/set'
     payload_on:  '{"relay10":{"on":1}}'
     payload_off:  '{"relay10":{"on":0}}'
     value_template: '{{ value_json.relay10.on }}'
     state_on: 1
     state_off: 0

   - name: 'output-11'
     unique_id: output-11
     state_topic: 'relay32/8ae082ec66f37db231cf2b8f/state'
     command_topic: 'relay32/8ae082ec66f37db231cf2b8f/set'
     payload_on:  '{"relay11":{"on":1}}'
     payload_off:  '{"relay11":{"on":0}}'
     value_template: '{{ value_json.relay11.on }}'
     state_on: 1
     state_off: 0

   - name: 'output-12'
     unique_id: output-12
     state_topic: 'relay32/8ae082ec66f37db231cf2b8f/state'
     command_topic: 'relay32/8ae082ec66f37db231cf2b8f/set'
     payload_on:  '{"relay12":{"on":1}}'
     payload_off:  '{"relay12":{"on":0}}'
     value_template: '{{ value_json.relay12.on }}'
     state_on: 1
     state_off: 0

   - name: 'output-13'
     unique_id: output-13
     state_topic: 'relay32/8ae082ec66f37db231cf2b8f/state'
     command_topic: 'relay32/8ae082ec66f37db231cf2b8f/set'
     payload_on:  '{"relay13":{"on":1}}'
     payload_off:  '{"relay13":{"on":0}}'
     value_template: '{{ value_json.relay13.on }}'
     state_on: 1
     state_off: 0

   - name: 'output-14'
     unique_id: output-14
     state_topic: 'relay32/8ae082ec66f37db231cf2b8f/state'
     command_topic: 'relay32/8ae082ec66f37db231cf2b8f/set'
     payload_on:  '{"relay14":{"on":1}}'
     payload_off:  '{"relay14":{"on":0}}'
     value_template: '{{ value_json.relay14.on }}'
     state_on: 1
     state_off: 0

   - name: 'output-15'
     unique_id: output-15
     state_topic: 'relay32/8ae082ec66f37db231cf2b8f/state'
     command_topic: 'relay32/8ae082ec66f37db231cf2b8f/set'
     payload_on:  '{"relay15":{"on":1}}'
     payload_off:  '{"relay15":{"on":0}}'
     value_template: '{{ value_json.relay15.on }}'
     state_on: 1
     state_off: 0

   - name: 'output-16'
     unique_id: output-16
     state_topic: 'relay32/8ae082ec66f37db231cf2b8f/state'
     command_topic: 'relay32/8ae082ec66f37db231cf2b8f/set'
     payload_on:  '{"relay16":{"on":1}}'
     payload_off:  '{"relay16":{"on":0}}'
     value_template: '{{ value_json.relay16.on }}'
     state_on: 1
     state_off: 0

   - name: 'output-17'
     unique_id: output-17
     state_topic: 'relay32/8ae082ec66f37db231cf2b8f/state'
     command_topic: 'relay32/8ae082ec66f37db231cf2b8f/set'
     payload_on:  '{"relay17":{"on":1}}'
     payload_off:  '{"relay17":{"on":0}}'
     value_template: '{{ value_json.relay17.on }}'
     state_on: 1
     state_off: 0

   - name: 'output-18'
     unique_id: output-18
     state_topic: 'relay32/8ae082ec66f37db231cf2b8f/state'
     command_topic: 'relay32/8ae082ec66f37db231cf2b8f/set'
     payload_on:  '{"relay18":{"on":1}}'
     payload_off:  '{"relay18":{"on":0}}'
     value_template: '{{ value_json.relay18.on }}'
     state_on: 1
     state_off: 0

   - name: 'output-19'
     unique_id: output-19
     state_topic: 'relay32/8ae082ec66f37db231cf2b8f/state'
     command_topic: 'relay32/8ae082ec66f37db231cf2b8f/set'
     payload_on:  '{"relay19":{"on":1}}'
     payload_off:  '{"relay19":{"on":0}}'
     value_template: '{{ value_json.relay19.on }}'
     state_on: 1
     state_off: 0

   - name: 'output-20'
     unique_id: output-20
     state_topic: 'relay32/8ae082ec66f37db231cf2b8f/state'
     command_topic: 'relay32/8ae082ec66f37db231cf2b8f/set'
     payload_on:  '{"relay20":{"on":1}}'
     payload_off:  '{"relay20":{"on":0}}'
     value_template: '{{ value_json.relay20.on }}'
     state_on: 1
     state_off: 0

   - name: 'output-21'
     unique_id: output-21
     state_topic: 'relay32/8ae082ec66f37db231cf2b8f/state'
     command_topic: 'relay32/8ae082ec66f37db231cf2b8f/set'
     payload_on:  '{"relay21":{"on":1}}'
     payload_off:  '{"relay21":{"on":0}}'
     value_template: '{{ value_json.relay21.on }}'
     state_on: 1
     state_off: 0

   - name: 'output-22'
     unique_id: output-22
     state_topic: 'relay32/8ae082ec66f37db231cf2b8f/state'
     command_topic: 'relay32/8ae082ec66f37db231cf2b8f/set'
     payload_on:  '{"relay22":{"on":1}}'
     payload_off:  '{"relay22":{"on":0}}'
     value_template: '{{ value_json.relay22.on }}'
     state_on: 1
     state_off: 0

   - name: 'output-23'
     unique_id: output-23
     state_topic: 'relay32/8ae082ec66f37db231cf2b8f/state'
     command_topic: 'relay32/8ae082ec66f37db231cf2b8f/set'
     payload_on:  '{"relay23":{"on":1}}'
     payload_off:  '{"relay23":{"on":0}}'
     value_template: '{{ value_json.relay23.on }}'
     state_on: 1
     state_off: 0

   - name: 'output-24'
     unique_id: output-24
     state_topic: 'relay32/8ae082ec66f37db231cf2b8f/state'
     command_topic: 'relay32/8ae082ec66f37db231cf2b8f/set'
     payload_on:  '{"relay24":{"on":1}}'
     payload_off:  '{"relay24":{"on":0}}'
     value_template: '{{ value_json.relay24.on }}'
     state_on: 1
     state_off: 0

   - name: 'output-25'
     unique_id: output-25
     state_topic: 'relay32/8ae082ec66f37db231cf2b8f/state'
     command_topic: 'relay32/8ae082ec66f37db231cf2b8f/set'
     payload_on:  '{"relay25":{"on":1}}'
     payload_off:  '{"relay25":{"on":0}}'
     value_template: '{{ value_json.relay25.on }}'
     state_on: 1
     state_off: 0

   - name: 'output-26'
     unique_id: output-26
     state_topic: 'relay32/8ae082ec66f37db231cf2b8f/state'
     command_topic: 'relay32/8ae082ec66f37db231cf2b8f/set'
     payload_on:  '{"relay26":{"on":1}}'
     payload_off:  '{"relay26":{"on":0}}'
     value_template: '{{ value_json.relay26.on }}'
     state_on: 1
     state_off: 0

   - name: 'output-27'
     unique_id: output-27
     state_topic: 'relay32/8ae082ec66f37db231cf2b8f/state'
     command_topic: 'relay32/8ae082ec66f37db231cf2b8f/set'
     payload_on:  '{"relay27":{"on":1}}'
     payload_off:  '{"relay27":{"on":0}}'
     value_template: '{{ value_json.relay27.on }}'
     state_on: 1
     state_off: 0

   - name: 'output-28'
     unique_id: output-28
     state_topic: 'relay32/8ae082ec66f37db231cf2b8f/state'
     command_topic: 'relay32/8ae082ec66f37db231cf2b8f/set'
     payload_on:  '{"relay28":{"on":1}}'
     payload_off:  '{"relay28":{"on":0}}'
     value_template: '{{ value_json.relay28.on }}'
     state_on: 1
     state_off: 0

   - name: 'output-29'
     unique_id: output-29
     state_topic: 'relay32/8ae082ec66f37db231cf2b8f/state'
     command_topic: 'relay32/8ae082ec66f37db231cf2b8f/set'
     payload_on:  '{"relay29":{"on":1}}'
     payload_off:  '{"relay29":{"on":0}}'
     value_template: '{{ value_json.relay29.on }}'
     state_on: 1
     state_off: 0

   - name: 'output-30'
     unique_id: output-30
     state_topic: 'relay32/8ae082ec66f37db231cf2b8f/state'
     command_topic: 'relay32/8ae082ec66f37db231cf2b8f/set'
     payload_on:  '{"relay30":{"on":1}}'
     payload_off:  '{"relay30":{"on":0}}'
     value_template: '{{ value_json.relay30.on }}'
     state_on: 1
     state_off: 0

   - name: 'output-31'
     unique_id: output-31
     state_topic: 'relay32/8ae082ec66f37db231cf2b8f/state'
     command_topic: 'relay32/8ae082ec66f37db231cf2b8f/set'
     payload_on:  '{"relay31":{"on":1}}'
     payload_off:  '{"relay31":{"on":0}}'
     value_template: '{{ value_json.relay31.on }}'
     state_on: 1
     state_off: 0

   - name: 'output-32'
     unique_id: output-32
     state_topic: 'relay32/8ae082ec66f37db231cf2b8f/state'
     command_topic: 'relay32/8ae082ec66f37db231cf2b8f/set'
     payload_on:  '{"relay32":{"on":1}}'
     payload_off:  '{"relay32":{"on":0}}'
     value_template: '{{ value_json.relay32.on }}'
     state_on: 1
     state_off: 0



  binary_sensor:
   - name: 'input-1'
     unique_id: input-1
     state_topic: 'relay32/8ae082ec66f37db231cf2b8f/state'
     value_template: '{{ value_json.input1.on }}'
     payload_on: 1
     payload_off: 0

   - name: 'input-2'
     unique_id: input-2
     state_topic: 'relay32/8ae082ec66f37db231cf2b8f/state'
     value_template: '{{ value_json.input2.on }}'
     payload_on: 1
     payload_off: 0

   - name: 'input-3'
     unique_id: input-3
     state_topic: 'relay32/8ae082ec66f37db231cf2b8f/state'
     value_template: '{{ value_json.input3.on }}'
     payload_on: 1
     payload_off: 0

   - name: 'input-4'
     unique_id: input-4
     state_topic: 'relay32/8ae082ec66f37db231cf2b8f/state'
     value_template: '{{ value_json.input4.on }}'
     payload_on: 1
     payload_off: 0
     
   - name: 'input-5'
     unique_id: input-5
     state_topic: 'relay32/8ae082ec66f37db231cf2b8f/state'
     value_template: '{{ value_json.input5.on }}'
     payload_on: 1
     payload_off: 0     
     
   - name: 'input-6'
     unique_id: input-6
     state_topic: 'relay32/8ae082ec66f37db231cf2b8f/state'
     value_template: '{{ value_json.input6.on }}'
     payload_on: 1
     payload_off: 0
Reply
#17
just replace with your controller UID and your mqtt broker IP and Port.
work well with home assitant 2022.9
   
Reply
#18
thank you now home assiatant work well
Reply
#19
ok, you are welcome
Reply
#20
Hi, I'm having the same problem.

I can see how the kc868-H32 / COLB boards publish to the MQTT server, but I can't control it from home assistant.

I have modified the configuration.yaml with the suggested changes in the new-mqtt-ha.txt file without result.

below I copy a piece of the configuration.yaml file in case there is an error that I am not able to see.

mqtt:
  broker: 192.168.20.39
  port: 1883
  username: mqtt
  password: 1234

  switch:
    - name: 'Rele 18'
      unique_id: output-18
      state_topic: 'relay32/0a0b47....../state'
      command_topic: 'relay32/0a0b47......./set'
      payload_on:  '{"relay18":{"on":1}}'
      payload_off:  '{"relay18":{"on":0}}'
      value_template: '{{ value_json.relay18.on }}'
      state_on: 1
      state_off: 0

MQTT Version: 1.6.15
Home Assistant: 2022.9.4

Could you help me?

Thank you
Reply


Forum Jump:


Users browsing this thread:
1 Guest(s)