I made a sketch for connecting a TTGO Paxcounter to the things network with support for a relay and a temperature sensor without the paxcounter functionality. I found a few sketches online based on the paxcounter but I didn’t find them lean and mean. There is support for the oled display wich displays the relay status, temperature, humidity and pressure.
The default configuration will send the status of the sensor and relays every 5 minutes but is fully customizable. I have it working for almost a month without any problems on a couple of paxcounter boards.
You can turn a relais on or off by sending downlink messages in the TTN Console. I added some payload formats (Decider, Converter, Validator and Encoder) to make the payload more easy to read. This is also necessary if you want to control the relais with Node-Red.