Smart Home Automation Forum
KC868-Server integrate to home asssitant by MQTT configuration.yaml - 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-Server Raspberry Pi4 local server (https://www.kincony.com/forum/forumdisplay.php?fid=17)
+--- Thread: KC868-Server integrate to home asssitant by MQTT configuration.yaml (/showthread.php?tid=1780)

Pages: 1 2


RE: KC868-Server integrate to home asssitant by MQTT configuration.yaml - faisal - 12-10-2023

Yes show unknow in dashboard


RE: KC868-Server integrate to home asssitant by MQTT configuration.yaml - faisal - 12-11-2023

The problem was solved by kincony support team. The cause of the problem was in the settings and configuration of mqtt I had mistakes. Thank you kincony support team i appreciate your efforts.


RE: KC868-Server integrate to home asssitant by MQTT configuration.yaml - zakhan - 02-16-2024

I am facing the same , used the sample yaml but gives errors. So i had to modify it. but the relays do not respond.

I have changed the code for relay1 but that does not work either.

Code:
default_config:

tts:
  - platform: google_translate

mqtt:
  - switch:
       - name: "KC_relay1"
         unique_id: output-1
         state_topic: ‘server/7ffd88f939adfbe3340ee686/state’
         command_topic: ‘server/7ffd88f939adfbe3340ee686/relay/set’
         payload_on:  "on"
         payload_off:  "off"
         value_template: ‘{{ value_json.relay1.on }}’
         state_on: 1
         state_off: 0

       - name: "KC_relay2"
         unique_id: output-2
         state_topic: ‘server/7ffd88f939adfbe3340ee686/state’
         command_topic: ‘server/7ffd88f939adfbe3340ee686/set’
         payload_on:  '{"relay2":{"on":1}}'
         payload_off:  '{"relay2":{"on":0}}'
         value_template: '{{ value_json.relay2.on }}'
         state_on: 1
         state_off: 0

       - name: "KC_relay3"
         unique_id: output-3
         state_topic: ‘server/7ffd88f939adfbe3340ee686/state’
         command_topic: ‘server/7ffd88f939adfbe3340ee686/set’
         payload_on:  '{"relay3":{"on":1}}'
         payload_off:  '{"relay3":{"on":0}}'
         value_template: '{{ value_json.relay3.on }}'
         state_on: 1
         state_off: 0

       - name: "KC_relay4"
         unique_id: output-4
         state_topic: ‘server/7ffd88f939adfbe3340ee686/state’
         command_topic: ‘server/7ffd88f939adfbe3340ee686/set’
         payload_on:  '{"relay4":{"on":1}}'
         payload_off:  '{"relay4":{"on":0}}'
         value_template: '{{ value_json.relay4.on }}'
         state_on: 1
         state_off: 0

       - name: "KC_relay5"
         unique_id: output-5
         state_topic: ‘server/7ffd88f939adfbe3340ee686/state’
         command_topic: ‘server/7ffd88f939adfbe3340ee686/set’
         payload_on:  '{"relay5":{"on":1}}'
         payload_off:  '{"relay5":{"on":0}}'
         value_template: '{{ value_json.relay5.on }}'
         state_on: 1
         state_off: 0

       - name: "KC_relay6"
         unique_id: output-6
         state_topic: ‘server/7ffd88f939adfbe3340ee686/state’
         command_topic: ‘server/7ffd88f939adfbe3340ee686/set’
         payload_on:  '{"relay6":{"on":1}}'
         payload_off:  '{"relay6":{"on":0}}'
         value_template: '{{ value_json.relay6.on }}'
         state_on: 1
         state_off: 0

       - name: "KC_relay7"
         unique_id: output-7
         state_topic: ‘server/7ffd88f939adfbe3340ee686/state’
         command_topic: ‘server/7ffd88f939adfbe3340ee686/set’
         payload_on:  '{"relay7":{"on":1}}'
         payload_off:  '{"relay7":{"on":0}}'
         value_template: '{{ value_json.relay7.on }}'
         state_on: 1
         state_off: 0

       - name: "KC_relay8"
         unique_id: output-8
         state_topic: ‘server/7ffd88f939adfbe3340ee686/state’
         command_topic: ‘server/7ffd88f939adfbe3340ee686/set’
         payload_on:  '{"relay8":{"on":1}}'
         payload_off:  '{"relay8":{"on":0}}'
         value_template: '{{ value_json.relay8.on }}'
         state_on: 1
         state_off: 0

       - name: "KC_relay9"
         unique_id: output-9
         state_topic: ‘server/7ffd88f939adfbe3340ee686/state’
         command_topic: ‘server/7ffd88f939adfbe3340ee686/set’
         payload_on:  '{"relay9":{"on":1}}'
         payload_off:  '{"relay9":{"on":0}}'
         value_template: '{{ value_json.relay9.on }}'
         state_on: 1
         state_off: 0

       - name: "KC_relay10"
         unique_id: output-10
         state_topic: ‘server/7ffd88f939adfbe3340ee686/state’
         command_topic: ‘server/7ffd88f939adfbe3340ee686/set’
         payload_on:  '{"relay10":{"on":1}}'
         payload_off:  '{"relay10":{"on":0}}'
         value_template: '{{ value_json.relay10.on }}'
         state_on: 1
         state_off: 0

       - name: "KC_relay11"
         unique_id: output-11
         state_topic: ‘server/7ffd88f939adfbe3340ee686/state’
         command_topic: ‘server/7ffd88f939adfbe3340ee686/set’
         payload_on:  '{"relay11":{"on":1}}'
         payload_off:  '{"relay11":{"on":0}}'
         value_template: '{{ value_json.relay11.on }}'
         state_on: 1
         state_off: 0



RE: KC868-Server integrate to home asssitant by MQTT configuration.yaml - admin - 02-16-2024

all your ' ' is error.
yours: ‘server/7ffd88f939adfbe3340ee686/state’
correct: 'server/7ffd88f939adfbe3340ee686/state'
please see clearly at ' '


RE: KC868-Server integrate to home asssitant by MQTT configuration.yaml - zakhan - 02-17-2024

(02-16-2024, 11:06 PM)admin Wrote: all your ' ' is error.
yours:  ‘server/7ffd88f939adfbe3340ee686/state’
correct: 'server/7ffd88f939adfbe3340ee686/state'
please see clearly at ' '

made changes but still not working 

Code:
default_config:

tts:
  - platform: google_translate

mqtt:
  switch:
    - name: "KC_relay1"
      unique_id: output-1
      state_topic: 'server/7ffd88f939adfbe3340ee686/state'
      command_topic: 'server/7ffd88f939adfbe3340ee686/set'
      payload_on:  '{"relay1":{"on":1}}'
      payload_off:  '{"relay1":{"on":0}}'
      value_template: '{{ value_json.relay1.on }}'
      state_on: 1
      state_off: 0

    - name: "KC_relay2"
      unique_id: output-2
      state_topic: 'server/7ffd88f939adfbe3340ee686/state'
      command_topic: 'server/7ffd88f939adfbe3340ee686/set'
      payload_on:  '{"relay2":{"on":1}}'
      payload_off:  '{"relay2":{"on":0}}'
      value_template: '{{ value_json.relay2.on }}'
      state_on: 1
      state_off: 0

    - name: "KC_relay3"
      unique_id: output-3
      state_topic: 'server/7ffd88f939adfbe3340ee686/state'
      command_topic: 'server/7ffd88f939adfbe3340ee686/set'
      payload_on:  '{"relay3":{"on":1}}'
      payload_off:  '{"relay3":{"on":0}}'
      value_template: '{{ value_json.relay3.on }}'
      state_on: 1
      state_off: 0

    - name: "KC_relay4"
      unique_id: output-4
      state_topic: 'server/7ffd88f939adfbe3340ee686/state'
      command_topic: 'server/7ffd88f939adfbe3340ee686/set'
      payload_on:  '{"relay4":{"on":1}}'
      payload_off:  '{"relay4":{"on":0}}'
      value_template: '{{ value_json.relay4.on }}'
      state_on: 1
      state_off: 0

    - name: "KC_relay5"
      unique_id: output-5
      state_topic: 'server/7ffd88f939adfbe3340ee686/state'
      command_topic: 'server/7ffd88f939adfbe3340ee686/set'
      payload_on:  '{"relay5":{"on":1}}'
      payload_off:  '{"relay5":{"on":0}}'
      value_template: '{{ value_json.relay5.on }}'
      state_on: 1
      state_off: 0

    - name: "KC_relay6"
      unique_id: output-6
      state_topic: 'server/7ffd88f939adfbe3340ee686/state'
      command_topic: 'server/7ffd88f939adfbe3340ee686/set'
      payload_on:  '{"relay6":{"on":1}}'
      payload_off:  '{"relay6":{"on":0}}'
      value_template: '{{ value_json.relay6.on }}'
      state_on: 1
      state_off: 0

    - name: "KC_relay7"
      unique_id: output-7
      state_topic: 'server/7ffd88f939adfbe3340ee686/state'
      command_topic: 'server/7ffd88f939adfbe3340ee686/set'
      payload_on:  '{"relay7":{"on":1}}'
      payload_off:  '{"relay7":{"on":0}}'
      value_template: '{{ value_json.relay7.on }}'
      state_on: 1
      state_off: 0

    - name: "KC_relay8"
      unique_id: output-8
      state_topic: 'server/7ffd88f939adfbe3340ee686/state'
      command_topic: 'server/7ffd88f939adfbe3340ee686/set'
      payload_on:  '{"relay8":{"on":1}}'
      payload_off:  '{"relay8":{"on":0}}'
      value_template: '{{ value_json.relay8.on }}'
      state_on: 1
      state_off: 0

    - name: "KC_relay9"
      unique_id: output-9
      state_topic: 'server/7ffd88f939adfbe3340ee686/state'
      command_topic: 'server/7ffd88f939adfbe3340ee686/set'
      payload_on:  '{"relay9":{"on":1}}'
      payload_off:  '{"relay9":{"on":0}}'
      value_template: '{{ value_json.relay9.on }}'
      state_on: 1
      state_off: 0

    - name: "KC_relay10"
      unique_id: output-10
      state_topic: 'server/7ffd88f939adfbe3340ee686/state'
      command_topic: 'server/7ffd88f939adfbe3340ee686/set'
      payload_on:  '{"relay10":{"on":1}}'
      payload_off:  '{"relay10":{"on":0}}'
      value_template: '{{ value_json.relay10.on }}'
      state_on: 1
      state_off: 0

    - name: "KC_relay11"
      unique_id: output-11
      state_topic: 'server/7ffd88f939adfbe3340ee686/state'
      command_topic: 'server/7ffd88f939adfbe3340ee686/set'
      payload_on:  '{"relay11":{"on":1}}'
      payload_off:  '{"relay11":{"on":0}}'
      value_template: '{{ value_json.relay11.on }}'
      state_on: 1
      state_off: 0



RE: KC868-Server integrate to home asssitant by MQTT configuration.yaml - admin - 02-17-2024

what error information?