I forgot about this component on pi also.
Using mosquitto as broker.
I may have modified the code for the Hubitat MQQT driver too. I'm still looking for the original code to see what I added. Check out this thread though...I think that's where I found what I needed.
The MQTT client acts similarly to the telnet client in that you use a driver to create a connection to an MQTT broker and manage the connection and messages through that driver.
Documentation is available here: MQTT Interface - Hubitat Documentation
See post 22 for updated information
At this point it is use at your own risk !
...especially these 2 posts
I hope it helps:
void parse(String description) {
def response = interfaces.mqtt.parseMessage(description)
if (response.get('topic') == "Topic_you_are_using"{
if (response.get('payload').contains("on")){
sendEvent(name: "switch", value: "on")
}
if (responce.get('payload').contains("off")){
sendEvent(name: "switch", value: "off")
}
}
}
1 Like