Looking to switch from an old Honeywell CT87A thermostat to a smart thermostat, probably something requiring a common wire. There are 2 thermostats (one on each floor) in a 2 zone forced hot water oil burner system, heat only.

I want to make sure I have the right wires before buying a new thermostat, and was worried with an old system like this I'd have just 2 wires. But looking at the existing wiring, there are 4: red, black green and yellow.
- Red and Black wires are on the thermostat's R terminal,
- Green and Yellow on the W terminal
- nothing on the Y terminal

Looking up thermostat wire color charts, I am now very confused as I have no White wire which is pretty much always shown as being for heat.

Can I assume either my Green or my Yellow is actually for heat, since they are both connected to the W terminal?

Assuming my Red is for power (since that's consistent with 99% of color guides, and it is connected to the R terminal), is my black wire a common?

Can the wire roles be deduced in this situation just from the terminals they're connected to? Is there a way to find out for sure?

Thermostat on 1st floor:
[![thermostat1][1]][1]

Thermostat on 2nd floor:
[![thermostat2][2]][2]

On the boiler end, there's only one thermostat-gauged cable coming from the junction box (red arrow):

[![junction box][3]][3]

And that one cable goes from the junction box to the following taco box, and has just black and white wires:

[![taco2][4]][4]

  [1]: https://i.sstatic.net/AKFfb.jpg
  [2]: https://i.sstatic.net/zjVQa.jpg
  [3]: https://i.sstatic.net/GkGs8.jpg
  [4]: https://i.sstatic.net/AritF.jpg