One small point that we CAN check without getting on the roof is the thermostat and wiring at that point.
I believe this is the correct one for your RV but if the colors look different, do a search for your specific thermostat before trusting!
Understanding that the thermostat is just a switch for the various functions but done by itself when the temp changes is one way to look at it.
When it decides to turn some part on, it connects two wires together much like we do at a normal wall switch. So if WE connect those two wires together we should expect to get the right part to work!
This picture and chart show where we can expect to find those wires. Getting the cover snapped off is what may be the harder parts, so do some looking/searching for the place where it is snapped on and get it off the wall as a big thing??? They hide those spots and change, so no help there.
Once off the wall, it may be as simple as some wire connection is not solid, so pull them up out of where hidden in the wall and make sure all the wire nuts are twisted on solid.
When things are intermit. it takes a longer slower process to make sure we are not walking past the true problem, so much slow and test slow.
Point is that we may get the wires corrected but not make sure it is working or failing and move on where we can cause other problems! Gets double hard that way.
First decide WHAT function is not working. Is it the fan, the compressor or WHAT? Am I reading correct that the compressor is not always working?
Define the problem first to cut down the ares to look and test.
Once deciding what is the problem, move to test that set of wires. My feeling is that the capacacitors are not likely to be intermitant as they are needed to first make the compressor start and a second set to help it run. They tend to fail or get weak and stay weak or failed! Rarely do they heal.
Most of the moving parts are bad and stay bad or good and stay good but the electrical connections are known for getting funky and doing weird things.
Look at the color chart as being the wires coming out of the thermostat, NOT the wall colors as they are not always the same.
Leave the 12 volt negative (ground connection) connected at all times to test, then connect the item you want to run to the wire in the wall that is connected to the red wire from the thermostat!
That's where this picture is leaving me a bit in doubt as it is not clear, so look carefully before trying them. Are there two red wires in the wall? One connected to yellow from therm. and one connected to red from therm?
Whatever color coming from the wall to the red wire of the thermostat is your power wire and connecting it to the wall wire of the comolr that goes to the compressor, should make the compressor run! Or low, high fan, etc. !
I hope that is not confusing you but you need to id the wires looking at the chart and the wires from the thermostat but it may change colors when you want to test a part. Connecting the two wires of whatever colors are correct that come out of the wall is what you need.
I "think" I see red /white from the wall as 12 volt positive and connecting it to red from the wall sends power out to relay that starts the compressor!
Note that this will test the thermostat and the wiring on this end but then it may be a loose connect, etc at the roof end, so not a complete test, just ruling out one possible cause?