Homemade Thermostat

Hello, this is my first post in here, I apologize if I am posting this in the wrong area.

So I am working on a Home assistant connected DIY Smart Thermostat!

I have been googling my heart out trying to gather all the info I need and it seems that nobody has done this or just nobody has posted info about it or perhaps my google skills are lackluster.

I have all the hardware assembled.
I have 3 relays, 1 each for AC, Heat, Fan
I have a NodeMCU flashed with Tasmota
I have a DHT11 Temp and Humidity sensor. (someone did recommend i upgrade that to a DHT22 but that isn’t the hard part of this project.
For phase one I just have LEDs (Red(heat), Green(Fan), Blue(AC)) connected to the relays purely as indicators so as I tweak the settings I can observe its behavior until I am satisfied enough to go live with the system.
As it stands I can trigger each relay from the tasmota webpage on my NodeMCU. The telemetry is posting to my MQTT broker once every 60 seconds. I can see my temp and humidity in HA overview.

I tried using the generic_thermostat code but… I am pretty new at this system… I am stuck. I need the community’s help! lol

The configuration needs to trigger the AC and Fan or the Heat and fan relay depending on what system I have HA set to control. Obviously automations can be set up to intelligently control whether the system is set to cool or heat but i’m trying to keep it simple at first. All climate control functions can be modified from HA overview so there is no need to add a touch screen or any sort of physical buttons.

It would be so awesome if we could come together and figure this out. If we can get this ironed out we could easily share the code with simple instructions on how anyone can make one for themselves. The parts for this project don’t cost but around $40 at the most. It’s a pretty sweet little DIY project and could be easily duplicated so long as the coding can be figured out and shared.

Thanks in advance!

Most of the code is written and you can use the generic thermostat.

Please think about what happens when this fails. Thermostats have built in switches to turn off if things get to hot/cold. This is something worthwhile to build in. A non software or electrical fail safe in line with the output is not a bad thing to look into.

Not sure if this would help: -

I realise you’re not wanting to control your Heating Controller but if you look at the very bottom of the post I have made a Smart Radiator Valve, the brains of this is an ESP-12 board, so shouldn’t be too tricky to tweak the code for your application, if I’m understanding correctly what you’re trying to achieve.

Best of luck

yeah, the generic thermostat is pretty generic. I really just dont know much about the software side of this yet. I’m slowly working on it. I am hoping i can find someone that wants to work on the configuration with me.

there is a relay between the output and the HVAC (rather where the HVAC WILL be) and in the event of a power outage the relay will shut off and break the connection.

what do you mean “what happens when this fails?” I guess you mena when the system crashes and i suddenly have no HVAC control. I plan on leaving the old thermostat hooked up as a backup but i will have it off. All i will have to do it turn it on.

You should also check out the amazing Heaty project on this community site, it’s very powerful

What are you actually controlling? There are a number of platforms like sensibo that will control an AC system and have HA integraton.

@GsynthChris “what happens when this fails” is more about when no one is home and the heating has no upper limit or if you are in an area that goes below freezing and you have no heat. Do plan for those possibilities.