![]() |
KC868-D16 home assistant configuration.yaml - Printable Version +- Smart Home Automation Forum (https://www.kincony.com/forum) +-- Forum: Technical Support (https://www.kincony.com/forum/forumdisplay.php?fid=1) +--- Forum: News (https://www.kincony.com/forum/forumdisplay.php?fid=5) +--- Thread: KC868-D16 home assistant configuration.yaml (/showthread.php?tid=3202) |
KC868-D16 home assistant configuration.yaml - engmohades - 08-26-2023 I have performed the same settings as in the link you provided websit , https://www.kincony.com/d16-dimmer-integrate-home-assistant-by-mqtt.html but it is giving me an "Unknown" and I am unable to control it through Home Assistant. 12345 post password used in page web off KC868-D16 ---------------------------------- mqtt: light: - name: D16-1 unique_id: D16-1 schema: template command_topic: "dimmer/xxxxxxxxxxxxxxxxxxxxxxxxx12345/set" state_topic: "dimmer/xxxxxxxxxxxxxxxxxxxxxxxxx12345/state" command_on_template: > {%- if brightness is defined -%} ,{"dimmer1":{"value":{{(brightness / 255 * 100) | int - 1}}} {%- else -%} ,'{"dimmer1":{"value":99}}' {%- endif -%} command_off_template: '{"dimmer1":{"value":0}}' state_template: > {%- if value_json.dimmer1.value == 0 -%} off {%- else -%} on {%- endif -%} brightness_template: '{{(value_json.dimmer1.value / 99 * 255)| int}}' - name: D16-2 unique_id: D16-2 schema: template command_topic: "dimmer/xxxxxxxxxxxxxxxxxxxxxxxxx12345/set" state_topic: "dimmer/xxxxxxxxxxxxxxxxxxxxxxxxx12345/state" command_on_template: > {%- if brightness is defined -%} ,{"dimmer2":{"value":{{(brightness / 255 * 100) | int - 1}}} {%- else -%} ,'{"dimmer2":{"value":99}}' {%- endif -%} command_off_template: '{"dimmer2":{"value":0}}' state_template: > {%- if value_json.dimmer2.value == 0 -%} off {%- else -%} on {%- endif -%} brightness_template: '{{(value_json.dimmer2.value / 99 * 255)| int}}' Can you please fix this issue or provide me with the configuration file? I have three KC868-D16 devices, and I want to use them with Home Assistant. RE: KC868-D16 home assistant configuration.yaml - admin - 08-26-2023 it's wrong, XXXXXXXXXXXXXXXXX is your UID, you can check your UID by ethernet webpage. RE: KC868-D16 home assistant configuration.yaml - engmohades - 08-26-2023 Actually, I am using the UID as I mentioned, but instead of it, I placed the XXXX symbol. light: - name: D16-1 unique_id: D16-1 schema: template command_topic: "dimmer/41a2d806af7a99020d25f2ae12345/set" state_topic: "dimmer/41a2d806af7a99020d25f2ae12345/state" command_on_template: > {%- if brightness is defined -%} ,{"dimmer1":{"value":{{(brightness / 255 * 100) | int - 1}}} {%- else -%} ,'{"dimmer1":{"value":99}}' {%- endif -%} command_off_template: '{"dimmer1":{"value":0}}' state_template: > {%- if value_json.dimmer1.value == 0 -%} off {%- else -%} on {%- endif -%} brightness_template: '{{(value_json.dimmer1.value / 99 * 255)| int}}' - name: D16-2 unique_id: D16-2 schema: template command_topic: "dimmer/41a2d806af7a99020d25f2ae12345/set" state_topic: "dimmer/41a2d806af7a99020d25f2ae12345/state" command_on_template: > {%- if brightness is defined -%} ,{"dimmer2":{"value":{{(brightness / 255 * 100) | int - 1}}} {%- else -%} ,'{"dimmer2":{"value":99}}' {%- endif -%} command_off_template: '{"dimmer2":{"value":0}}' state_template: > {%- if value_json.dimmer2.value == 0 -%} off {%- else -%} on {%- endif -%} brightness_template: '{{(value_json.dimmer2.value / 99 * 255)| int}}' RE: KC868-D16 home assistant configuration.yaml - admin - 08-26-2023 why added 12345? it not need , just use: command_topic: "dimmer/41a2d806af7a99020d25f2ae/set" state_topic: "dimmer/41a2d806af7a99020d25f2ae/state" RE: KC868-D16 home assistant configuration.yaml - engmohades - 08-26-2023 I deleted the post password 12345. Everything worked perfectly just as you had said. Thank you very much indeed. RE: KC868-D16 home assistant configuration.yaml - admin - 08-27-2023 ok RE: KC868-D16 home assistant configuration.yaml - Lunar4943 - 01-22-2024 I am having a similar issue. My D16 is not publishing or reading from the MQTT Server. https://ibb.co/7SqPTnr I am watching the MQTT server and the 868-D16 never publishes the STATE https://ibb.co/ssNhsDh RE: KC868-D16 home assistant configuration.yaml - admin - 01-22-2024 what's set in your mqtt broker for topic. |