Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
home assistant RC 2022.6 mqtt config update for configuration.yaml
#41
(04-09-2023, 12:14 AM)admin Wrote: if you are using KC868-H32 old controller, it's not support MQTT. you can take a photo of your controller whole box. let me have a look.

I have this one -  KC868-H32 (2019 year, 5A gang)

https://aliexpress.ru/item/4000275332976...mmendation

now it work via NODE-RED and RP 3

And I want to connect it to Home Assistant. Will it work? Is there any solusion? 
Reply
#42
https://community.home-assistant.io/t/32...h32/155647
Reply
#43
(04-09-2023, 09:06 AM)admin Wrote: https://community.home-assistant.io/t/32...h32/155647

how can I copy NODE-RED setting from Rasbperry pi to Home Assistant?
Reply
#44
not copy directly, you can install node-red on home assistant. node-red have "import" and "export" function.
Reply
#45
KC868 set to use mosquito broker (MQTT mode). Using configuration attached (config_base_kc868.txt) but state of the entitiess is Unknown. Although I confirmed that mosquito broker is running by publishing and listening a test message when I turn on digital input 1 or 2 i don't see nothing published on server/acf25f1d39adfbe31effb56b/state.

Any idea what it could be?


Attached Files Image(s)
   

.txt   config_base_kc868.txt (Size: 7.79 KB / Downloads: 110)
Reply
#46
switch:
- platform: mqtt
name: 'output-1'
unique_id: output-1
state_topic: 'server/xxxxxxxxxxxxxxxxxxxxxxxx/state'
command_topic: 'server/xxxxxxxxxxxxxxxxxxxxxxxx/set'
payload_on: '{"relay1":{"on":1}}'
payload_off: '{"relay1":{"on":0}}'
value_template: '{{ value_json.relay1.on }}'
state_on: 1
state_off: 0

compare with these code, your config code have some SPACE, you need to delete.
Reply
#47
(01-25-2024, 10:36 PM)admin Wrote: switch:
  - platform: mqtt
    name: 'output-1'
    unique_id: output-1
    state_topic: 'server/xxxxxxxxxxxxxxxxxxxxxxxx/state'
    command_topic: 'server/xxxxxxxxxxxxxxxxxxxxxxxx/set'
    payload_on:  '{"relay1":{"on":1}}'
    payload_off:  '{"relay1":{"on":0}}'
    value_template: '{{ value_json.relay1.on }}'
    state_on: 1
    state_off: 0

compare with these code, your config code have some SPACE, you need to delete.

After using MQTT Explorer I noticed the server is sending messages to relay32/xxxxxxxxxxxxxxxxxxxxxxxx/state instead of server/xxxxxxxxxxxxxxxxxxxxxxxx/state.  ... after changing that it worked.

Now one question: Why in MQTT mode the responses are so slow and sometimes when click wall switch it doesn't work?  Like laggy...

Thanks

(01-26-2024, 09:56 PM)sebagarayco Wrote:
(01-25-2024, 10:36 PM)admin Wrote: switch:
  - platform: mqtt
    name: 'output-1'
    unique_id: output-1
    state_topic: 'server/xxxxxxxxxxxxxxxxxxxxxxxx/state'
    command_topic: 'server/xxxxxxxxxxxxxxxxxxxxxxxx/set'
    payload_on:  '{"relay1":{"on":1}}'
    payload_off:  '{"relay1":{"on":0}}'
    value_template: '{{ value_json.relay1.on }}'
    state_on: 1
    state_off: 0

compare with these code, your config code have some SPACE, you need to delete.

After using MQTT Explorer I noticed the server is sending messages to relay32/xxxxxxxxxxxxxxxxxxxxxxxx/state instead of server/xxxxxxxxxxxxxxxxxxxxxxxx/state.  ... after changing that it worked.

Now one question: Why in MQTT mode the responses are so slow and sometimes when click wall switch it doesn't work?  Like laggy...

Thanks

Interesting:
- I completeley removed Mosquitto Broker
- Disabled Wifi on Server
- Re-installed Mosquito broker 
- Now server is publishing in server/* instead of relay32/* (don't know why)
- It's not laggy anymore.

Thank you for answer evey request!!
Reply
#48
ok, good.
Reply
#49
Want to use mqtt on my a16 board, with Wifi connection and ESPHome software (is installed) in cooperation with Home Assistant (Broker installed).
Questions:
1. Cannot locate the UID of the a16-board so far; how to do that?
2. Is there a sample config file for mqtt and the a16-board?
thx
Reply
#50
1. you need download KCS firmware to A16 board. then you can login webpage see the UID , that called "serial number" on webpage.
how to use KCS firmware, here is online guide: https://www.kincony.com/esp32-kcsv2-firmware.html
2. enable "MQTT" protocol
3. here is mqtt integration demo for A8S board, but you can also use for A16, just only change some PCF8574 pin define and i2c address.
https://www.kincony.com/forum/showthread.php?tid=3274
Reply


Forum Jump:


Users browsing this thread: