I recently decided to automate my water based central heating system using smart TRV's and my first attempt, though it worked to an extent was thwarted by the valves broad temperature range around the target temperature at which they remained partially open.
My second and current attempt is using a Saswell System sold by Amazon which apart from the TRV's themselves comprises a Gateway and a Timer/Receiver module which contains 2 relays to turn the boiler on or off depending on the need for hot water or central heating. Being Chinese the documentation for this system is pathetic and the company will not respond to any support requests. It is all I can find at present so I'm trying to overcome its deficiencies.
The main one of these is that the Timer/Receiver appears to be Offline much of the time which I think is to do with the radio communication between it and the Gateway. There are some things that happen that bring it back on line but I can't define what these are except that I know that rebooting the Gateway does so.
So I've written the code to go on the NodeMCU to perform a frequent reboot and that works but I also want this same NodeMCU to monitor the status of the mains supply so that it can run a recovery routine following a power outage (we recently had an outage that lasted into the early hours of the morning and when the power supply was recovered, the heating was blazing away and some smart bulbs were on too).
So I wanted to build a power converter that would take the 12v supply that the gateway can use as input and to switch this via a relay operated by the NodeMCU to a direct output to the Gateway. I thought that using the simple circuit around a a couple of LM317 voltage regulators I could produce 5v for normal power to the NodeMCU and 3.3 v to charge a couple of AAA cells that I can use to detect that the mains has failed and keep the NodeMCU running too. But despite 5 attempts to build this unit and every time I can get 5.09 volts out, I cannot get the Node MCU to power up. When connected to a proper USB power supply the Inbuilt LED is on after boot up but when connected to my own power supplies either using Vin and Gnd or through a USB cable the inbuilt LED just flashes at regular intervals.
Can anybody point me in the right direction. Please