Help designing the steps to create a ble device from scratch

Hello, I’m new into the development of HA and devices but I have some programming background.

My idea to start learning while making something useful was to create a device to control the temperature of the heater in my house. There are some tado decices which cost around 30-50€ with zigbee, and considering I need 8 for my house it was a lot of money.

So here I start designing a prototype:

  1. With a non smart TRV to get the motor, plastic and threads.
  2. I programmed an ESP32 to have to functions via Bluetooth to open or close the valve by turning the motor for some time in each direction with a driver.
  3. I may add a partially open valve status like 25,50,75%>

Now I have to see how can I intrgrate this with home assistant to create my automations there.

The design requirements:

  1. As low energy as possible. That is why I started with BLE, they will be powered with 2 AA batteries.
  2. Need to be reachable with the raspberry.

So my ideas now where:

  1. Create an integration in HA that uses a script in python that I wrote to test the Bluetooth connection. Issues: No experience with creating integrations, I may be trying to reinvent the wheel, the heaters may be too far away to be reached with the raspberry.
  2. Use another esp32 plugged to act as a proxy between the Bluetooth device and the raspberry using another protocol and integration. Maybe reuse some MQTT. Issues: I,m not sure if I can use Bluetooth and WiFi simoultaniously in the esp32. I,m not sure how could I add devices without reprogramming the esp. I’m not sure how to start with this. Do I need to write anyway a new integratio?

I’d appreciate some hints in which direction to go. I don’t need code but an idea of what is easier and reliabile to start with, as starting with HA is a bit overwhelming.

Just a couple of points…

The valves on the radiators can need quite a bit of force to operate and the pins aren’t always at the same distances.The travel is only about 5mm from open to closed. Try taking off and existing mechanical TRV head and pushing down to pin to fully closed to see how much force is needed.

I’ve got Drayton Wiser TRV heads on all my radiators (they do work really well), and the first thing they do when istalled or when the batteries are changed is to test the valve by going from fully open to fully closed.

The other thing you are going to need is the ability to shut off the heating system when no valves are open. The Drayton Wiser system has a hub that connects to the thermostat contacts of the boiler. When at least one TRV opens it closes the contacts to the boiler to demand heat, and the whole system just works. The hub acts as a Zigbee co-ordinator to talk to all the TRVs.

Not turning off the boiler when all the TRVs are shut “could” be a problem unless you’ve got a small return loop somewhere to allow the boiler to measure the temperature of the retruning hot water. However, I do know that worcester boilers also shut down when the water entering the loop reaches a certain temperature. I’m not sure if that is good for the boiler though to soley rely on the temperature of the water entering the loop.

I know this response is well after the creation of this topic, but it may help others searching for help.