Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
KC868-D16 home assistant configuration.yaml
#1
I have performed the same settings as in the link you provided websit ,

https://www.kincony.com/d16-dimmer-integ...-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.


Attached Files Image(s)
   
Reply
#2
it's wrong, XXXXXXXXXXXXXXXXX is your UID, you can check your UID by ethernet webpage.
Reply
#3
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}}'
Reply
#4
why added 12345? it not need , just use:
command_topic: "dimmer/41a2d806af7a99020d25f2ae/set"
state_topic: "dimmer/41a2d806af7a99020d25f2ae/state"
Reply
#5
I deleted the post password 12345.
Everything worked perfectly just as you had said.
Thank you very much indeed.
Reply
#6
ok
Reply
#7
I am having a similar issue. My D16 is not publishing or reading from the MQTT Server.

https://ibb.co/7SqPTnr
[Image: 7SqPTnr]

I am watching the MQTT server and the 868-D16 never publishes the STATE

https://ibb.co/ssNhsDh

[Image: ssNhsDh]
Reply
#8
what's set in your mqtt broker for topic.
Reply


Forum Jump:


Users browsing this thread:
1 Guest(s)