ECOBEE dead, how hard can it be to make a smart thermostat with Openhab?

Sadly my Ecobee smart thermostat has decided it no longer wants to talk to its wifi chip after a firmware update, and whilst it’s under warranty the cost of shipping a new one, and returning the old one (why?) means it’s time to walk away. So I’m thinking of making my own setup with Openhab. I have a 433 MHz relay board on order from Aliexpress so once it arrives I just need to add appropriate rules / sitemap items to make it work. I’ve also got a DHT22 based sensor in the room, so I already know what the temperature and humidity are.
Can anyone offer me some tips before I reinvent the wheel? Has anyone created a smart thermostat before that I can learn from? I already have working presence information, and have interfaced with the heatpump with relays, so the jobs already been half done.