So, i am back
note on my setup:
firmware v2.2.10
hardware KC868-A32 V1.2
First
There is a (minor) mistake in the MQTT payload output by the board, at the end there is an extra comma.
If you look the payload is like:
to be 100% json compliant it should end like:
Second
below the mqtt configuration I manage to make work with the help of HA forum member
this configuration take in account the last extra comma and is compatible with or without this comma
Third
I had during my attempts and tries, sometime switch quickly on/off the relay, and sometime the board did not sens it last status.
I tel this just to share my experience,this is not a real problem, not need to try to fix I think because:
switching so fast is not real life
It can be easily bypassed by sending
so if anyone get this trouble he can send this periodicaly (eg each minute) or add it in the on/off payload like
Finaly
Thank you for your boards, thank you for KCS firmware.
I think it is a lot of work
but the information is a little messy, for example we have a lot of topic for a lot of firmware version, the uper top topic is not the last firmware version, all boards a not mentioned each time ...
You have a great MQTT pdf documentation but it is not easy to find (and to know it exist)
Have a good day and long life to you and your products ;-)
note on my setup:
firmware v2.2.10
hardware KC868-A32 V1.2
First
There is a (minor) mistake in the MQTT payload output by the board, at the end there is an extra comma.
If you look the payload is like:
Quote:{"input1":{"value":false},"input2":{"value":false},..."adc4":{"value":0},}
to be 100% json compliant it should end like:
Quote:{"input1":{"value":false},"input2":{"value":false},..."adc4":{"value":0}}
Second
below the mqtt configuration I manage to make work with the help of HA forum member
this configuration take in account the last extra comma and is compatible with or without this comma
Code:
mqtt:
switch:
- name: 'KC32_578_o1'
unique_id: KC32_578_o1
state_topic: 'KC868_A32/123456/STATE'
command_topic: 'KC868_A32/123456/SET'
payload_on: '{"output1":{"value":true}}'
payload_off: '{"output1":{"value":false}}'
value_template: >
{% set value_json = value | replace(",}", "}") | from_json %}
{{ value_json.output1.value }}
state_on: true
state_off: false
Third
I had during my attempts and tries, sometime switch quickly on/off the relay, and sometime the board did not sens it last status.
I tel this just to share my experience,this is not a real problem, not need to try to fix I think because:
switching so fast is not real life
It can be easily bypassed by sending
Code:
get_datas":{"value":true}}
so if anyone get this trouble he can send this periodicaly (eg each minute) or add it in the on/off payload like
Code:
payload_on: '{"output1":{"value":true},"get_datas":{"value":true}}'
payload_off: '{"output1":{"value":false},"get_datas":{"value":true}}'
Finaly
Thank you for your boards, thank you for KCS firmware.
I think it is a lot of work
but the information is a little messy, for example we have a lot of topic for a lot of firmware version, the uper top topic is not the last firmware version, all boards a not mentioned each time ...
You have a great MQTT pdf documentation but it is not easy to find (and to know it exist)
Have a good day and long life to you and your products ;-)