Hello, traditionally the fan speed is selected internally by the furnace depending on whether it is heating or cooling mode.
a thermostat that controls fan speed from the thermostat has a FAN switch, with either a FAN ON position, (high speed as a rule) or Fan Auto, where in the furnace or air handler controls the fan speed base on its own internal sensors.
If you can tell me why you want to control the fan speed that will help.
Tell me about the 2 pipes, are those cold in the summer and hot in the winter, or just hot in the winter and the AC has either chilled water in 2 additional pipes, or two copper tubes with refrigerant in them.
So far it looks like this will be a compromise solution, a standard wi fi thermostat, that lets the fan run on medium or low speed (fixed) for heating, and on High speed in cooling mode, that will require a bit of custom wiring...
I can help you with that but it will take a few hours to gather the data on your existing system, select the thermostat and design the custom relay controls... that would be beyond 'just a simple answer'...and I would want an extra for that.
OR... one of the better HVAC contractors in the area, who employs a high end controls man can do all that for you, including the installation... depending on what features you want costs will vary from $500 on up.
Let me know your preference we can go from there.