Smart Home Automation Forum
entity doesn't work - Printable Version

+- Smart Home Automation Forum (https://www.kincony.com/forum)
+-- Forum: Technical Support (https://www.kincony.com/forum/forumdisplay.php?fid=20)
+--- Forum: "KCS" firmware system (https://www.kincony.com/forum/forumdisplay.php?fid=40)
+--- Thread: entity doesn't work (/showthread.php?tid=2555)



entity doesn't work - fabuena - 02-05-2023

I had my KC868-A8 running under ESPHOME. With KCS firmware ESPHOME doesn't work...
I configure my MQTT server and it is connected with KCS to home assistant.
Now I tried to use the Output-1 switch. I edit my configuration.yaml and write:

mqtt:

  switch:

  - name: 'output-1'
    unique_id: output-1
    state_topic: 'KC868_A8/4091519110F8/state'
    command_topic: 'KC868_A8/4091519110F8/set'
    payload_on:  '{"relay1":{"on":1}}'
    payload_off:  '{"relay1":{"on":0}}'
    value_template: '{{ value_json.relay1.on }}'
    state_on: 1
    state_off: 0

I can see the entity but it doesn't work. 
I'm beginer. Can you help me?


RE: entity doesn't work - admin - 02-06-2023

here is KCS mqtt protocol: https://www.kincony.com/forum/showthread.php?tid=2529
in "KCS" use : {"output1":{"value":true}}
not '{"relay1":{"on":1}}'

value_template: '{{ value_json.relay1.on }}' should be value_template: '{{ value_json.output1.value }}'

here is mqtt config demo for A32, A8 is same: https://www.kincony.com/forum/showthread.php?tid=2543


RE: entity doesn't work - fabuena - 02-06-2023

Thank you very much but I am not be able to make it works
Attached send you some pintures.

Now my code is:


mqtt:
  switch:
  - name: 'output1'
    unique_id: output1
    command_topic: 'KC868_A8/4091519110F8/set'
    state_topic: 'KC868_A8/4091519110F8/state'
    payload_on:  '{"output1":{"value":true}}'
    payload_off:  '{"output1":{"value":false}}'
    value_template: '{{ value_json.output1.value }}'
    state_on: true
    state_off: false


RE: entity doesn't work - admin - 02-06-2023

command_topic: 'KC868_A8/4091519110F8/set' should use 'KC868_A8/4091519110F8/SET'
state_topic: 'KC868_A8/4091519110F8/state' should use 'KC868_A8/4091519110F8/STATE'

SET and STATE should be capitalized


RE: entity doesn't work - fabuena - 02-07-2023

(02-06-2023, 11:03 PM)admin Wrote: command_topic: 'KC868_A8/4091519110F8/set'      should use        'KC868_A8/4091519110F8/SET'
    state_topic: 'KC868_A8/4091519110F8/state'    should use        'KC868_A8/4091519110F8/STATE'

SET    and    STATE      should be capitalized

Now it works.
Thank you very much


RE: entity doesn't work - admin - 02-07-2023

ok, good.