Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
A16 - MQTT Issues
#7
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:

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 ;-)


Attached Files Image(s)
       
Reply


Messages In This Thread
A16 - MQTT Issues - by PierrePetite - 12-27-2024, 09:33 AM
RE: A16 - MQTT Issues - by admin - 12-28-2024, 01:19 AM
RE: A16 - MQTT Issues - by PierrePetite - 12-30-2024, 09:29 AM
RE: A16 - MQTT Issues - by admin - 12-30-2024, 09:52 AM
RE: A16 - MQTT Issues - by David8827 - 02-21-2025, 10:02 PM
RE: A16 - MQTT Issues - by admin - Yesterday, 12:51 AM
RE: A16 - MQTT Issues - by David8827 - 9 hours ago
RE: A16 - MQTT Issues - by admin - 8 hours ago

Forum Jump:


Users browsing this thread: 1 Guest(s)