Hello All,
Just upgraded to OH 3.2.0 (Docker) and using Mosquitto (Docker) for MQTT server.
I’m in the process of adding some functionality of my pool controller into OH using MQTT and thought I would ask for a sanity check on an MQTT Channel that uses both state and command topics.
The message I’m receiving in the stateTopic is: {“id”:4,“isOn”:“off”}.
For the commandTopic I’m replicating the JSON format.
Here is the channel code:
id: spalight
channelTypeUID: mqtt:switch
label: Spa Light
description: ""
configuration:
commandTopic: intellicenter-i10ps/state/circuits/setState
formatBeforePublish: '{"id":4,"isOn":"%s"}'
stateTopic: intellicenter-i10ps/state/circuits/4/spalight
transformationPattern: JSONPATH:$.isOn
off: off
on: on
This is appears to be working fine. The only potential issue is when I turn the light on from OH, I also receive the response from the stateTopic, is this normal behavior?
Any feedback on how to better set this up would be much appreciated.