I don't have a light on in the barn,they just wander back to the barn to roost at dusk.
We had a chicken coop and a range fence enclosure for the evening. We would throw several scoops of corn on the ground in the late afternoon. The ranging chicken would graviate toward the coop and by evening they were all roosting in the coop. One of my chores was to shut the coop door and the gate to the fenced area.

My second story bedroom window looked over the coop. A loaded Remington model 12
.22 rifle was kept by the window, if needed.

IIRC the Collie normally kept everything under control. The Collie was not a house dog he slept on an old rug in a wooden 50 gallon barrel on the enclosed back porch, Year around. We also had a pet mallard duck and two geese that also kept watch.