![]() |
KCS firmware - MQTT LWT? - Printable Version +- Smart Home Automation Forum (https://www.kincony.com/forum) +-- Forum: Technical Support (https://www.kincony.com/forum/forumdisplay.php?fid=1) +--- Forum: KC868-A series and Uair Smart Controller (https://www.kincony.com/forum/forumdisplay.php?fid=6) +--- Thread: KCS firmware - MQTT LWT? (/showthread.php?tid=3434) |
RE: KCS firmware - MQTT LWT? - DieterN - 03-11-2024 Hello I have set the Temperature Threshold to 0.1. The numbers are changing when th relais are change or the adc numbers only!!! (another user have the same problem!) To switch the relais from my MQTT server I test it with : set MQTT2_FCB4671111D0 output1_valve true set MQTT2_FCB4671111D0 output1_value on set MQTT2_FCB4671111D0 output1_valve on set MQTT2_FCB4671111D0 output1_value on set MQTT2_FCB4671111D0 output1 on/off/true/false nothing work RE: KCS firmware - MQTT LWT? - admin - 03-11-2024 1. i don't know which board you are using? what sensor you are using? how you wire? take photo! 2. take a screen photo what command you have send to control relay. RE: KCS firmware - MQTT LWT? - DieterN - 03-11-2024 (03-11-2024, 10:05 AM)admin Wrote: 1. i don't know which board you are using? what sensor you are using? how you wire? take photo! 1.KC868-A8 from my MQTT Server: To switch the relais from my MQTT server I test it with : set MQTT2_FCB4671111D0 output1_valve true set MQTT2_FCB4671111D0 output1_value on set MQTT2_FCB4671111D0 output1_valve on set MQTT2_FCB4671111D0 output1_value on set MQTT2_FCB4671111D0 output1 on/off/true/false nothing work PS: the values different because different times RE: KCS firmware - MQTT LWT? - admin - 03-12-2024 This is turn ON relay1, relay2, relay3 for A8 board demo . this payload should be: {"output1":{"value":true}},{"output2":{"value":true}},{"output3":{"value":true}} RE: KCS firmware - MQTT LWT? - admin - 03-12-2024 about sensor auto feedback mqtt problem, we will check and feedback later. RE: KCS firmware - MQTT LWT? - DieterN - 03-12-2024 (03-12-2024, 02:48 AM)admin Wrote: about sensor auto feedback mqtt problem, we will check and feedback later. Thank you. I found a next problem. In the KC868 Monitor I see adc2: 3,3 V In the MQTT broker I see adc2_value:2535 regarding your MQTT box. I have tested it with MQTT explorer, but no error or relais function. see below I hope you can solve also. thanks in advance RE: KCS firmware - MQTT LWT? - admin - 03-12-2024 1. Can you control relay ON/OFF by mqtt command now? 2. after you download KCS firmware, "Monitor" webpage showed config value, you can preset the range and unit. the MQTT feedback "2535", that is RAW code. for example: 0---4095 RAW code can set to 0--5V or 0--10 meter or ...... RE: KCS firmware - MQTT LWT? - DieterN - 03-13-2024 (03-12-2024, 11:45 AM)admin Wrote: 1. Can you control relay ON/OFF by mqtt command now? 1. no 2. I know thats is the raw code. In the picture obove you can see 3.3V. But my broker see the raw code only. Why not 3.3 !! The temperature values are correct. The next problem is the missing LWT status!! RE: KCS firmware - MQTT LWT? - mustafa@arrabi.net - 07-17-2024 (01-08-2024, 08:42 PM)Fip Wrote: Same problem. Temperature from 2 attached DS18B20 sensors is changed ( this change can be seen in web interface Monitor\Sensor\Channel 1 and 2). But no MQTT update is send to MQTT server. Checked with MQTT explorer. Where I should add this code? Should I create a new automation in HA and add it there or this has to be added to the sensor configuration? RE: KCS firmware - MQTT LWT? - lpb19 - 10-11-2024 Could someone with more experience check the code? Input and output are working. DAC1 and DAC2 do not respond. # placa ks868-a6 mqtt: switch: - name: 'KC868_A6-output-1' unique_id: KC868_A6-output-1 state_topic: 'KC868_A6/CC7B5C303EE0/STATE' command_topic: 'KC868_A6/CC7B5C303EE0/SET' payload_on: '{"output1":{"value":true}}' payload_off: '{"output1":{"value":false}}' value_template: '{{ value_json.output1.value }}' state_on: true state_off: false - name: 'KC868_A6-output-2' unique_id: KC868_A6-output-2 state_topic: 'KC868_A6/CC7B5C303EE0/STATE' command_topic: 'KC868_A6/CC7B5C303EE0/SET' payload_on: '{"output2":{"value":true}}' payload_off: '{"output2":{"value":false}}' value_template: '{{ value_json.output2.value }}' state_on: true state_off: false - name: 'KC868_A6-output-3' unique_id: KC868_A6-output-3 state_topic: 'KC868_A6/CC7B5C303EE0/STATE' command_topic: 'KC868_A6/CC7B5C303EE0/SET' payload_on: '{"output3":{"value":true}}' payload_off: '{"output3":{"value":false}}' value_template: '{{ value_json.output3.value }}' state_on: true state_off: false - name: 'KC868_A6-output-4' unique_id: KC868_A6-output-4 state_topic: 'KC868_A6/CC7B5C303EE0/STATE' command_topic: 'KC868_A6/CC7B5C303EE0/SET' payload_on: '{"output4":{"value":true}}' payload_off: '{"output4":{"value":false}}' value_template: '{{ value_json.output4.value }}' state_on: true state_off: false - name: 'KC868_A6-output-5' unique_id: KC868_A6-output-5 state_topic: 'KC868_A6/CC7B5C303EE0/STATE' command_topic: 'KC868_A6/CC7B5C303EE0/SET' payload_on: '{"output5":{"value":true}}' payload_off: '{"output5":{"value":false}}' value_template: '{{ value_json.output5.value }}' state_on: true state_off: false - name: 'KC868_A6-output-6' unique_id: KC868_A6-output-6 state_topic: 'KC868_A6/CC7B5C303EE0/STATE' command_topic: 'KC868_A6/CC7B5C303EE0/SET' payload_on: '{"output6":{"value":true}}' payload_off: '{"output6":{"value":false}}' value_template: '{{ value_json.output6.value }}' state_on: true state_off: false binary_sensor: - name: 'KC868_A6-input-1' unique_id: KC868_A6-input-1 state_topic: 'KC868_A6/CC7B5C303EE0/STATE' value_template: '{{ value_json.input1.value }}' payload_on: true payload_off: false - name: 'KC868_A6-input-2' unique_id: KC868_A6-input-2 state_topic: 'KC868_A6/CC7B5C303EE0/STATE' value_template: '{{ value_json.input2.value }}' payload_on: true payload_off: false - name: 'KC868_A6-input-3' unique_id: KC868_A6-input-3 state_topic: 'KC868_A6/CC7B5C303EE0/STATE' value_template: '{{ value_json.input3.value }}' payload_on: true payload_off: false - name: 'KC868_A6-input-4' unique_id: KC868_A6-input-4 state_topic: 'KC868_A6/CC7B5C303EE0/STATE' value_template: '{{ value_json.input4.value }}' payload_on: true payload_off: false - name: 'KC868_A6-input-5' unique_id: KC868_A6-input-5 state_topic: 'KC868_A6/CC7B5C303EE0/STATE' value_template: '{{ value_json.input5.value }}' payload_on: true payload_off: false - name: 'KC868_A6-input-6' unique_id: KC868_A6-input-6 state_topic: 'KC868_A6/CC7B5C303EE0/STATE' value_template: '{{ value_json.input6.value }}' payload_on: true payload_off: false sensor: - name: "Sensor 1 Temperature" unique_id: KC868_A6-sensor-temperature-1 state_topic: 'KC868_A6/CC7B5C303EE0/STATE' value_template: "{{ value_json.sensor1.temperature }}" unit_of_measurement: "°C" - name: "Sensor 2 Temperature" unique_id: KC868_A6-sensor temperature-2 state_topic: 'KC868_A6/CC7B5C303EE0/STATE' value_template: "{{ value_json.sensor2.temperature }}" unit_of_measurement: "°C" - name: "ADC-1" unique_id: KC868_A6-adc-1 state_topic: 'KC868_A6/CC7B5C303EE0/STATE' value_template: "{{ value_json.adc1.value }}" unit_of_measurement: "Unità" - name: "ADC-2" unique_id: KC868_A6-adc-2 state_topic: 'KC868_A6/CC7B5C303EE0/STATE' value_template: "{{ value_json.adc2.value }}" unit_of_measurement: "Unità" - name: "ADC-3" unique_id: KC868_A6-adc-3 state_topic: 'KC868_A6/CC7B5C303EE0/STATE' value_template: "{{ value_json.adc3.value }}" unit_of_measurement: "Unità" - name: "ADC-4" unique_id: KC868_A6-adc-4 state_topic: 'KC868_A6/CC7B5C303EE0/STATE' value_template: "{{ value_json.adc4.value }}" unit_of_measurement: "Unità" light: - name: "dac1" unique_id: KC868_A6-dac1 schema: template command_topic: 'KC868_A6/CC7B5C303EE0/STATE' state_topic: 'KC868_A6/CC7B5C303EE0/STATE' command_on_template: > {%- if brightness is defined -%} ,{"dac1":{"value":{{(brightness / 255 * 100) | int - 1}}} {%- else -%} ,'{"dac1":{"value":99}}' {%- endif -%} command_off_template: '{"dac1":{"value":0}}' state_template: > {%- if value_json.dac1.value == 0 -%} off {%- else -%} on {%- endif -%} brightness_template: '{{(value_json.dac1.value / 99 * 255)| int}}' |