Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
home assistant RC 2022.6 mqtt config update for configuration.yaml
#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


Messages In This Thread
RE: home assistant RC 2022.6 mqtt config update for configuration.yaml - by sebagarayco - 01-26-2024, 09:56 PM

Forum Jump:


Users browsing this thread: