arachnetech / homebridge-mqttthing

A plugin for Homebridge allowing the integration of many different accessory types using MQTT.
Apache License 2.0
462 stars 104 forks source link

Multiple sets at the same time #513

Open miguelpruivo opened 2 years ago

miguelpruivo commented 2 years ago

Hi! I'm using the apply to convert int to a particular value to my vacuum and then it publishes back the set speed into a get which updates the UI switcher in the HomeKit to the latest value. However, this has a little "lag" between sliding the switch and receiving the updated value back.

Is there any way to make it immediate? For example, I was trying to publish two topics at the same time: one for setting the value and the other to immediately updating (instead of waiting the vacuum to update it itself). Is this possible?

Thank you!

arachnetech commented 2 years ago

MQTT is usually pretty quick. Can you work out where the delay is by turning on logging? Note that you can use the same topic for 'get' and 'set' in MQTTThing if that helps.

miguelpruivo commented 2 years ago

@arachnetech how would you apply/publish two topics at the same time?