I didn't quite follow your description, but... (disclaimer: I'm not an HVAC expert)
Usually there will be a 24vAC PSU somewhere with one leg of the transformer going through a thermostat switch, the other side of the switch going into the boiler, and the boiler returning to the transformer.
Depending on how integrated your system is, the switch may actually connect to a zone valve instead of the boiler itself. The zone valve may then have an end-switch that connects to the boiler to tell it when to fire up, or the boiler may sense this based on water temp and/or flow.
Either way, if this is what your system looks like, you may be able to tap into the 24vAC loop with an opto-coupler. When the thermostat calls for heat, it will close its switch and complete the loop. Therefore, you could connect an opto-coupler directly on the boiler side of the thermostat switch, with the other side directly to the 24v return. This will light up the opto when the switch closes. Keep the load light -- those transformers are usually on rated for an amp or so... give or take half an amp.