I’ve got mine working with OpenHAB now and thought my config might be helpful for others.
There is one thing that’s bugging me, and I hope someone might have a better solution. Currently, I have two items to heat the tub: ‘Heater Red’ and ‘Heater Green.’ These indicate the state when the tub has reached temp and when it hasn’t. I would like this to be a single ‘Heater’ item that indicates red, green, or off. Any ideas? Thanks.
mqtt.things
//Lay Z Spa Wifi https://community.openhab.org/t/mqtt-whirlpool-control/124283/4
Thing topic layZSpa "Hot Tub" @ "Outside" {
Channels:
// Control
Type number : actualTemperature [ stateTopic="layzspa/message", transformationPattern="JSONPATH:$.TMPC" ]
Type number : virtualTemperature [ stateTopic="layzspa/message", transformationPattern="JSONPATH:$.VTMC" ]
Type number : targetTemperature [ stateTopic="layzspa/message", transformationPattern="JSONPATH:$.TGTC", commandTopic="layzspa/command", formatBeforePublish="{\"CMD\":0,\"VALUE\":%s,\"XTIME\":0,\"INTERVAL\":0,\"TXT\":\"openHAB\"}" ]
Type number : ambientTemperature [ stateTopic="layzspa/message", transformationPattern="JSONPATH:$.AMBC", commandTopic="layzspa/command", formatBeforePublish="{\"CMD\":15,\"VALUE\":%s,\"XTIME\":0,\"INTERVAL\":0,\"TXT\":\"openHAB\"}" ]
Type number : brightness [ stateTopic="layzspa/message", transformationPattern="JSONPATH:$.BRT", commandTopic="layzspa/command", formatBeforePublish="{\"CMD\":12,\"VALUE\":%s,\"XTIME\":0,\"INTERVAL\":0,\"TXT\":\"openHAB\"}" ]
// Buttons
Type switch : bubbles [ stateTopic="layzspa/message", transformationPattern="JSONPATH:$.AIR", commandTopic="layzspa/command", formatBeforePublish="{\"CMD\":2,\"VALUE\":%s,\"XTIME\":0,\"INTERVAL\":0,\"TXT\":\"openHAB\"}", on="1", off="0" ]
Type switch : heater [ stateTopic="layzspa/message", transformationPattern="JSONPATH:$.RED", commandTopic="layzspa/command", formatBeforePublish="{\"CMD\":3,\"VALUE\":%s,\"XTIME\":0,\"INTERVAL\":0,\"TXT\":\"openHAB\"}", on="1", off="0" ]
Type switch : heater2 [ stateTopic="layzspa/message", transformationPattern="JSONPATH:$.GRN", commandTopic="layzspa/command", formatBeforePublish="{\"CMD\":3,\"VALUE\":%s,\"XTIME\":0,\"INTERVAL\":0,\"TXT\":\"openHAB\"}", on="1", off="0" ]
Type switch : pump [ stateTopic="layzspa/message", transformationPattern="JSONPATH:$.FLT", commandTopic="layzspa/command", formatBeforePublish="{\"CMD\":4,\"VALUE\":%s,\"XTIME\":0,\"INTERVAL\":0,\"TXT\":\"openHAB\"}", on="1", off="0" ]
// Other
Type number : beep [ commandTopic="layzspa/command", formatBeforePublish="{\"CMD\":13,\"VALUE\":%s,\"XTIME\":0,\"INTERVAL\":0,\"TXT\":\"furelise.mel\"}" ]
}
mqtt.items
Group LayZSpa "Hot Tub" <water>
Number LayZSpaActualTemp "Actual Temp [%.1f °C]" <temperature> (LayZSpa,gPoolTemperatures) { channel="mqtt:topic:mosquitto:layZSpa:actualTemperature" }
Number LayZSpaVirtualTemp "Virtual Temp [%.1f °C]" <temperature> (LayZSpa,gPoolTemperatures) { channel="mqtt:topic:mosquitto:layZSpa:virtualTemperature" }
Number LayZSpaTargetTemp "Target Temp [%.1f °C]" <temperature> (LayZSpa) { channel="mqtt:topic:mosquitto:layZSpa:targetTemperature" }
Number LayZSpaAmbientTemp "Ambient Temp [%.1f °C]" <temperature> (LayZSpa,gPoolTemperatures) { channel="mqtt:topic:mosquitto:layZSpa:ambientTemperature" }
Number LayZSpaBrightness "Brightness [%s]" <light> (LayZSpa) { channel="mqtt:topic:mosquitto:layZSpa:brightness" }
Switch LayZSpaBubbles "Bubbles" <smoke> (LayZSpa) { channel="mqtt:topic:mosquitto:layZSpa:bubbles" }
Switch LayZSpaHeater "Heater Red" <fire> (LayZSpa) { channel="mqtt:topic:mosquitto:layZSpa:heater" }
Switch LayZSpaHeater2 "Heater Green" <fire> (LayZSpa) { channel="mqtt:topic:mosquitto:layZSpa:heater2" }
Switch LayZSpaPump "Pump" <pump> (LayZSpa) { channel="mqtt:topic:mosquitto:layZSpa:pump" }
Number LayZSpaBeep "Beep [%s]" <soundvolume> (LayZSpa) { channel="mqtt:topic:mosquitto:layZSpa:beep" }
default.sitemap
Frame label="Pump [%.1f °C]" item=LayZSpaActualTemp icon=pump {
Text item=LayZSpaActualTemp
Text item=LayZSpaVirtualTemp
Text item=LayZSpaAmbientTemp //minValue=-40 maxValue=60
Setpoint item=LayZSpaTargetTemp minValue=20 maxValue=40 step=1
Slider item=LayZSpaBrightness minValue=0 maxValue=8
Switch item=LayZSpaBubbles
Switch item=LayZSpaHeater
Switch item=LayZSpaHeater2
Switch item=LayZSpaPump
Selection item=LayZSpaBeep mappings=[0=Beep,1=Chirp,3=Melody]
}
Time for a dip 
