homebridge-mqttthing icon indicating copy to clipboard operation
homebridge-mqttthing copied to clipboard

Multiple topics for single property

Open fjolnir opened this issue 11 months ago • 1 comments

For devices that expose multiple topics to do something represented by mqtttthing as a single property, it'd be useful to be able to map it to multiple topics.

Example: My air conditioner has separate power=on/off and state=heat/cool/auto topics. While mqttthing's thermostat has a single targetHeatingCoolingState=off/heat/cool/auto.

So what I need to do is: when mqttthing sets for example targetHeatingCoolingState=auto is to set both power=on&state=auto, then when mqttthing's targetHeatingCoolingState is off, I only want to set power=off

I looked into using a codec, but didn't make any progress. Is there any way to accomplish this?

fjolnir avatar Mar 14 '24 05:03 fjolnir

Please correct me if I am wrong, but I don’t think that it is possible to map more than one topic to a characteristic currently. What I would do is to put something in between that aggregates the messages to a single topic. You could this for example with node-red or did you already find another solution?

dylexrocks avatar Apr 18 '24 06:04 dylexrocks