Simple gas boiler and thermal regulation

Hi. I am trying to do some automatically thermal regulation for my gas boiler. Embedded thermostat is terrible, because of this i am regulating water temperature and measure air temperature in rooms, calculating average. What should I do to get some automatically regulation? Maybe it will be no perfect but anyway.

See this thread.

Depends what you want.

I think, reading your message, I have done similar. I have a gas boiler for radiators.
It had a time based relay on it and no integration to a thermostat.

Using zwave and an aeotec nani relay, I now take an average temperature from our bedrooms and do various things based on the time.

In Schedule mode
If between 5am and 8am and Temp between 17.4 and 18.2 turn on the central heating.
Any other time if temp < 15.5 turn on the central heating.

in Boost mode
Turn on central heating for 120 mins

In On mode
Turn on central heating till 23:00 hours when it is automatically switched back to Schedule mode.

I based a lot of this of an implementation of Openhab called Hestia.