For those who find themselves in my shoes, a basic get it connected guide for the WiFi MQTT Control Relay Thermostat and Node Red on the emonPi:
-
Follow the instructions at https://guide.openenergymonitor.org/integrations/mqtt-relay to set up the wifi, note that the unit appears as OEM_NNN in the wifi list
-
Once the unit is on you network, select the MQTT option from the menu and set the following:
Restart the relay
-
Connect to Node Red on :1880
-
Copy this code below to the clipboard
[{“id”:“a04a2b21.66c87”,“type”:“debug”,“z”:“a5ce04b2.5a31f8”,“name”:"",“active”:true,“console”:“false”,“complete”:“false”,“x”:580,“y”:1150,“wires”:[]},{“id”:“19f53dd1.0b401a”,“type”:“mqtt in”,“z”:“a5ce04b2.5a31f8”,“name”:"",“topic”:“emon/heating/#”,“qos”:“1”,“broker”:“8a9d92d6.75627”,“x”:354,“y”:1143,“wires”:[[“a04a2b21.66c87”]]},{“id”:“7c8462a.c6b2c1c”,“type”:“inject”,“z”:“a5ce04b2.5a31f8”,“name”:“On”,“topic”:“emon/heating/control/1”,“payload”:“1”,“payloadType”:“num”,“repeat”:"",“crontab”:"",“once”:false,“x”:357.5,“y”:1236,“wires”:[[“16a859af.d48096”]]},{“id”:“16a859af.d48096”,“type”:“mqtt out”,“z”:“a5ce04b2.5a31f8”,“name”:"",“topic”:"",“qos”:"",“retain”:"",“broker”:“8a9d92d6.75627”,“x”:607.5,“y”:1236,“wires”:[]},{“id”:“ece429af.53f3”,“type”:“inject”,“z”:“a5ce04b2.5a31f8”,“name”:“Off”,“topic”:“emon/heating/control/1”,“payload”:“0”,“payloadType”:“num”,“repeat”:"",“crontab”:"",“once”:false,“x”:357.5,“y”:1296,“wires”:[[“16a859af.d48096”]]},{“id”:“8a9d92d6.75627”,“type”:“mqtt-broker”,“z”:“a5ce04b2.5a31f8”,“broker”:“localhost”,“port”:“1883”,“clientid”:"",“usetls”:false,“verifyservercert”:true,“compatmode”:true,“keepalive”:“15”,“cleansession”:true,“willTopic”:"",“willQos”:“0”,“willRetain”:null,“willPayload”:"",“birthTopic”:"",“birthQos”:“0”,“birthRetain”:null,“birthPayload”:""}]
-
In Node Red, import the the clipboard using the dropdown menu on the top right. You should have something that looks like:

-
Check that the mqtt output is pointing to localhost:1883
-
Deploy the Node Red code.
-
Select the button to the left of on/off. The relay should turn on or off. The debug display should show status messages from the relay
A note about updating the firmware on the relay:
The latest version of the relay firmware https://github.com/openenergymonitor/mqtt-wifi-mqtt-single-channel-relay will break the relay if uploaded through the web interface. You must follow the instructions at https://github.com/openenergymonitor/mqtt-wifi-mqtt-single-channel-relay/tree/master/firmware to do a full erase and flash. This can be done from a PC with python installed. Amazon sell a cable at https://www.amazon.co.uk/gp/product/B071WPW292/ref=ppx_yo_dt_b_asin_title_o00_s00?ie=UTF8&psc=1&tag=streetmap-21 that will do this.