Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to integrate KC868-A8 to home assistant by MQTT
#21
support use by DS18B20, DHT11, DHT22 sensor. these sensor will work with KCS firmware and show in home assistant by MQTT integration.
Reply
#22
(08-03-2025, 12:07 AM)admin Wrote: support use by DS18B20, DHT11, DHT22 sensor. these sensor will work with KCS firmware and show in home assistant by MQTT integration.

I installed a DHT22 sensor.

How can I forward it to Home Assistant via MQTT?

   
   
Reply
#23
check mqtt prototol at here: https://www.kincony.com/forum/attachment.php?aid=2872
Reply
#24
(08-06-2025, 01:57 PM)admin Wrote: check mqtt prototol at here: https://www.kincony.com/forum/attachment.php?aid=2872

Thank you, the sensors have been added, but the values are not updated. Tell me how to force the values to update.
   
Reply
#25
for example, in your KCS sensor webpage, you need set the "threshold" for temperature and humidity.
temperature=0.1
humidity=1
Reply
#26
(08-06-2025, 11:58 PM)admin Wrote: for example, in your KCS sensor webpage, you need set the "threshold" for temperature and humidity.
temperature=0.1
humidity=1
Thank you very much, everything worked. Another question: can I connect additional relay modules to the board?
Reply
#27
if you use KCS firmware , can't add other relay module. if you config by esphome, you can add i2c extend relay module , such as DO8 8 channel i2c relay board.
Reply
#28
Dear sir
     I have followed your instructions on setting up a KC868-A8 in Home Assistant and have got on the overview the 8 inputs and 8 outputs but they are unavailable and have been every time I have made changes
I have deleted the device a number of times and rein stalled it with different firmware but every time it is the same result.
I am thinking that it is not connected to MQTT in Home Assistant but I can see it connected to MQTT on the Kinconny web page and can operate the relays and see a temperature probe I have installed I can see the inputs operate and in Node Red on Home Assistant I can read the inputs and outputs.
The one part I am having a real problem with is the MQTT part in HA I have tried to add a user in the logins as per your instructions but get an error message when I try to change the file. See attached file below.  The files are in the folder where I attach files to
 I have also downloaded the log file from the A8 and it shows a warning message see below
 I have tried I think everything except the right thing but I do not know what that is I am hoping that you will be able to help me I have also attached a screen shot of the Esp Home Page below
 
 
Yours
Alan Turnbull

(12-04-2024, 12:26 AM)admin Wrote: step-1: download KCS firmware to KC868-A8 by USB-C cable

step2: set mqtt broker ip , port, user name, password for home assistant mosquitto broker. the ip and port according to home assistant's server.



step3: modify configuration.yaml file, add our code:

Code:
# Loads default set of integrations. Do not remove.
default_config:

# Load frontend themes from the themes folder
frontend:
  themes: !include_dir_merge_named themes

automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml


       
mqtt:
  switch:
   - name: 'a8-kcs-output-1'
     unique_id: a8-kcs-output-1
     state_topic: 'KC868_A8/B0A732859848/STATE'
     command_topic: 'KC868_A8/B0A732859848/SET'
     payload_on:  '{"output1":{"value":true}}'
     payload_off:  '{"output1":{"value":false}}'
     value_template: '{{ value_json.output1.value }}'
     state_on: true
     state_off: false

   - name: 'a8-kcs-output-2'
     unique_id: a8-kcs-output-2
     state_topic: 'KC868_A8/B0A732859848/STATE'
     command_topic: 'KC868_A8/B0A732859848/SET'
     payload_on:  '{"output2":{"value":true}}'
     payload_off:  '{"output2":{"value":false}}'
     value_template: '{{ value_json.output2.value }}'
     state_on: true
     state_off: false

   - name: 'a8-kcs-output-3'
     unique_id: a8-kcs-output-3
     state_topic: 'KC868_A8/B0A732859848/STATE'
     command_topic: 'KC868_A8/B0A732859848/SET'
     payload_on:  '{"output3":{"value":true}}'
     payload_off:  '{"output3":{"value":false}}'
     value_template: '{{ value_json.output3.value }}'
     state_on: true
     state_off: false

   - name: 'a8-kcs-output-4'
     unique_id: a8-kcs-output-4
     state_topic: 'KC868_A8/B0A732859848/STATE'
     command_topic: 'KC868_A8/B0A732859848/SET'
     payload_on:  '{"output4":{"value":true}}'
     payload_off:  '{"output4":{"value":false}}'
     value_template: '{{ value_json.output4.value }}'
     state_on: true
     state_off: false

   - name: 'a8-kcs-output-5'
     unique_id: a8-kcs-output-5
     state_topic: 'KC868_A8/B0A732859848/STATE'
     command_topic: 'KC868_A8/B0A732859848/SET'
     payload_on:  '{"output5":{"value":true}}'
     payload_off:  '{"output5":{"value":false}}'
     value_template: '{{ value_json.output5.value }}'
     state_on: true
     state_off: false

   - name: 'a8-kcs-output-6'
     unique_id: a8-kcs-output-6
     state_topic: 'KC868_A8/B0A732859848/STATE'
     command_topic: 'KC868_A8/B0A732859848/SET'
     payload_on:  '{"output6":{"value":true}}'
     payload_off:  '{"output6":{"value":false}}'
     value_template: '{{ value_json.output6.value }}'
     state_on: true
     state_off: false

   - name: 'a8-kcs-output-7'
     unique_id: a8-kcs-output-7
     state_topic: 'KC868_A8/B0A732859848/STATE'
     command_topic: 'KC868_A8/B0A732859848/SET'
     payload_on:  '{"output7":{"value":true}}'
     payload_off:  '{"output7":{"value":false}}'
     value_template: '{{ value_json.output7.value }}'
     state_on: true
     state_off: false

   - name: 'a8-kcs-output-8'
     unique_id: a8-kcs-output-8
     state_topic: 'KC868_A8/B0A732859848/STATE'
     command_topic: 'KC868_A8/B0A732859848/SET'
     payload_on:  '{"output8":{"value":true}}'
     payload_off:  '{"output8":{"value":false}}'
     value_template: '{{ value_json.output8.value }}'
     state_on: true
     state_off: false



  binary_sensor:
   - name: 'a8-kcs-input-1'
     unique_id: a8-kcs-input-1
     state_topic: 'KC868_A8/B0A732859848/STATE'
     value_template: '{{ value_json.input1.value }}'
     payload_on: true
     payload_off: false

   - name: 'a8-kcs-input-2'
     unique_id: a8-kcs-input-2
     state_topic: 'KC868_A8/B0A732859848/STATE'
     value_template: '{{ value_json.input2.value }}'
     payload_on: true
     payload_off: false

   - name: 'a8-kcs-input-3'
     unique_id: a8-kcs-input-3
     state_topic: 'KC868_A8/B0A732859848/STATE'
     value_template: '{{ value_json.input3.value }}'
     payload_on: true
     payload_off: false

   - name: 'a8-kcs-input-4'
     unique_id: a8-kcs-input-4
     state_topic: 'KC868_A8/B0A732859848/STATE'
     value_template: '{{ value_json.input4.value }}'
     payload_on: true
     payload_off: false

   - name: 'a8-kcs-input-5'
     unique_id: a8-kcs-input-5
     state_topic: 'KC868_A8/B0A732859848/STATE'
     value_template: '{{ value_json.input5.value }}'
     payload_on: true
     payload_off: false

   - name: 'a8-kcs-input-6'
     unique_id: a8-kcs-input-6
     state_topic: 'KC868_A8/B0A732859848/STATE'
     value_template: '{{ value_json.input6.value }}'
     payload_on: true
     payload_off: false

   - name: 'a8-kcs-input-7'
     unique_id: a8-kcs-input-7
     state_topic: 'KC868_A8/B0A732859848/STATE'
     value_template: '{{ value_json.input7.value }}'
     payload_on: true
     payload_off: false

   - name: 'a8-kcs-input-8'
     unique_id: a8-kcs-input-8
     state_topic: 'KC868_A8/B0A732859848/STATE'
     value_template: '{{ value_json.input8.value }}'
     payload_on: true
     payload_off: false
yaml file download: 
step4: replace all ID by your own board, you can check ID from KCS "index" webpage.

step5: save the yaml file by click "save" button. Then ready to restart of home assistant.

step6: go to "setting" -- "system" webpage, restart your home assistant.

step7: Now you can found new entities in "Setting" -- “Device & services" -- "Entities" webpage. all have listed, you just add to home assistant dashboard is OK.


yaml file download: 


Attached Files Image(s)
                           
Reply
#29
do you want to use esphome? if YES, just use by yaml file, not need to use mqtt.
esphome yaml file: https://www.kincony.com/forum/showthread.php?tid=2367
note: esphome and KCS firmware , can't work at the same time.
Reply
#30
(08-06-2025, 07:38 PM)ivann Wrote:
(08-06-2025, 01:57 PM)admin Wrote: check mqtt prototol at here: https://www.kincony.com/forum/attachment.php?aid=2872

Thank you, the sensors have been added, but the values are not updated. Tell me how to force the values to update.

Hello,
 I recently integrated all inputs and outputs to HA, unfortunately I stuck with temperature sensors.
I'm using DS18B20 and I see the values while listening in MQTT, but from some reason I cannot read the value on dashboard, I`m more than sure that something is wrong in my config.

MQTT Listening readout:
Code:
Message 0 received on KC868_A8/A842E325F8D4/STATE at 1:24 AM:
{
    "input1": {
        "value": false
    },
    "input2": {
        "value": false
    },
    "input3": {
        "value": false
    },
    "input4": {
        "value": false
    },
    "input5": {
        "value": false
    },
    "input6": {
        "value": false
    },
    "input7": {
        "value": false
    },
    "input8": {
        "value": false
    },
    "output1": {
        "value": false
    },
    "output2": {
        "value": false
    },
    "output3": {
        "value": false
    },
    "output4": {
        "value": false
    },
    "output5": {
        "value": false
    },
    "output6": {
        "value": false
    },
    "output7": {
        "value": false
    },
    "output8": {
        "value": true
    },
    "adc1": {
        "value": 0
    },
    "adc2": {
        "value": 0
    },
    "sensor1": {
        "temperature": 21.2,
        "humity": -100
    },
    "sensor2": {
        "temperature": 19.8,
        "humity": -100
    },
    "sensor3": {
        "temperature": 19.8,
        "humity": -100
    },
    "sensor4": {
        "temperature": 19.8,
        "humity": -100
    }
}
And this is my config for sensor1:


Attached Files Image(s)
   
Reply


Forum Jump:


Users browsing this thread:
1 Guest(s)