How can I capture and use a value that is published from an ESP8266

I’m using an ESP8266 NodeMCU to control and monitor the status of my garage door. The NodeMCU publishes the door status every 20 seconds or on change of state.
client.publish(“GARAGE/Door”, “GD_OPEN”);

I want to display the status on a Perspective View.
How do I capture or read what the NodeMCU is publishing?
I have created a custom namespace in the MQTT Engine named Home that subscribes to GARAGE/*
I have a button on the View that publishes an open/close message, which works fine.
system.cirruslink.engine.publish(“MQTT Distributor”, “GARAGE/Door” , str(‘PULSE’),0,0)
but I can not figure out how to handle MQTT messages that are published from my NodeMCU.
I’m a noob, this is my first time participating in any forum so please forgive my inexperience, I’ll catch on soon.

Just a quick one, but the wildcard in MQTT land is #, so you’d want the custom namespace in MQTT Engine to subscribe to GARAGE/#


Thanks! I can only imagine how many hours I would have spent “not seeing” that. :smile:

1 Like

I figured it out. I was trying to approach it like OPC Tags and created a real-time Tag Provider…