My first thought was to open up the heater and add temperature control. But that was a big no as the water heater is checked and sealed by the gas company and any tampering results in a fine.
So the only solution left was to control the gate value which switched the water going to the heater. The gate value when on lets the water go directly from the tank, bypassing the heater. When closed the water is passed though the geyser which heats it..
So my initial solution was to use two esp modules in p2p mode to control the tap from the bath. But somehow they kept dropping the connection from that distance. So i used them in the normal mode with a wifi router. As a bonus i can even control the tap with a cel phone.
Both the remote and the actuator are programmed in the arduino ide using the esp library. ( due to my limited programming skills )
The remote has two separate buttons and status leds to turn the tap on and off. The status leds indicate the current position of the actuator.. Also the added advantage of having two buttons is that even if one of them is pressed several times the actuator stays in the same commanded position.
The project was implemented on one freezing weekend with all the parts pulled out from defunct projects and the case quickly 3d printed.
the actuator can also be toggled with a button on the actuator as the same heater also serves the service kitchen tap.( the nightmare of pipes and wires )
Very nice 3D print design!
For me that looks like the heater is a later addition to an existing system, so there was only one pipe to the shower. The tilted mount of the kitchen sink faucet emphasizes this for me. :-)
But you could easily improve your system to thermostatic control. Add a sensor on the pipe to the shower (directly to the right side of the hot water tap for the kitchen) and let the ESP on the valve servo read it's temperature and control your mixing valve (the bypass of the heater) to the desired temperature. I would much more prefer an automated system than to have to fumble on the phone with wet hands to adjust the temperature. Plus the sensor can be much closer to the heater so you have much less lag in the control loop than in your manual control loop.
If you don't have the ADC input of the ESP-module available then use a digital temperature sensor like a DS1820 or a I2C or SPI sensor. Probably you need some indication of water flow. Perhaps you do not want to open the valve completely to increase the output temperature only because the heater is not running because no water is used. But perhaps this is no issue as the water heats up gradually when it is turned on and the gas flame starts burning. For that indication - if needed - I would either try to sense the noise of the flame (if possible) or sense the heat of the exhaust gas.
You can also sense the hot water output for temperature increase