The SPDs have to be mounted outside of the inverter As well as in a NEMA sort- 3R enclosure or larger if it is an outside application.
Yes, a junction box is needed for solar panels. It is an important component https://leaxxxy243865.win-blog.com/10554420/5-essential-elements-for-how-does-a-box-junction-work