NEMA box recommendations.
If it won't be rained on, any NEMA box with a fan or at least a vent will do for most PoE switches. However, if the environment is unfriendly, such as inside a sawmill, any fan will quickly become clogged with fine sawdust and stop operating. If a filter is placed in front of the fan, the fan will most likely function normally, but the filter will be completely clogged, resulting in a hermetically sealed box.
So, in harsh environments, we need a box that is dustproof - ergo, no fan or vent. The problem
with sticking a switch inside a sealed box is heat. In a sealed box,
there is nowhere for the heat to go, and the switch will cook itself to
death.
There is one solution we've found that
works: use a box that's much larger than the switch, so the air
circulates inside the box and carries away the heat; and use a metal box
rather than plastic, so the circulating air transfers heat to the box
walls and ultimately to the outside air. Here's an example:
or:
Any IP5x or IP6x will be sufficient. (e.g, the IP65 above indicates that it's completely
dustproof - the '6' - and also protected against jets of water - the
'5'). The larger the better. Put the switch into the box and fasten it
to the backplate. There should be plenty of clearance all around the top
and sides of the switch to let air circulate, and then you should be
good to go.
For Wi-Fi AP(s), this is much less
critical. An AP typically dissipates about 5-7 watts, and standard ABS
or poly-carbonate outdoor boxes are fine. (Of course, you can't use metal
boxes!) Here's one we have "lab tested" outdoors at a farm in Oregon:
Waterproof WiFi Indoor Outdoor Weatherproof Enclosure Cabinet Box - Wifi Weather Proof Box - Amazon.com