Hi annib
Brilliant that you are making your garden more wildlife friendly. Unfortunately you cannot be sure that rats won’t use the hog boxes. The first occupant in my first hog box was, sadly, a rat. It didn’t manage to stay there long – I moved the box after giving it a good clean and sterilise with boiling water. I have found that hinged lids are better – much easier to clean out when necessary, but I would definitely NOT open and check the box. If disturbed, nesting females have, apparently, been known to eat their babies if they are very young, or otherwise abandon them – which is not what you want.
The trouble is most of the ways of knowing whether something is in the box would not differentiate between hogs and rats. Even a camera would not be totally reliable. However, I have had an idea. I haven’t tried this myself, and you may think it a bit extreme, and I have no idea whether it would work (but can’t think why it shouldn’t), but the only way to check whether it was really a hog in the box is by putting a footprint tunnel in front of it. Then if you saw it was rat footprints you could open the box, fairly safely.
The following are some links.
https://www.hedgehogstreet.org/footprint-tunnels/
https://ptes.org/wp-content/uploads/2014/06/Guidance-for-detecting-hedgehogs-using-tracking-tunnels.pdf
https://www.wildcareshop.com/tracking-tunnel-1.html
Let us know if you do try it.