It depends if it is a normal relay on/off command or a bus communication. If it is the first case you could replace it with a node and a relay (could be arduino mini pro or esp8266 + relay) and a temperature sensor and set up the controller with time schedule and temperatures you want during the day. My personal suggestion if you have just an on/off command is to get something like a Netatmo thermostat (I have one and I am so happy with it) because they use a learning algorithm that adapts automatically according to your house heating system that keeps temperature constant taking advantage of the heating inertia (implementing it in a controller is really an hassle). For water heating it is simpler as you may just need a relay and schedule on/off on the controller