Welcome to CS beaneater* :)
please be specific....... does it actually switch on and off randomly during use OR.....
only when you first switch on from cold the machine never heats up, and then you discovered by accident that if you open the steam valve and allow an equalisation of pressure between the boiler and atmospheric pressure, the pressure gauge goes to zero and then the machine magically switches on and goes to pressure and temp and operates perfecttly....until the same thing happens again next time you switch on form cold again????????
If it is the second option, this is quite normal for a machine that does not have an anti vacuum valve OR, for a machine that does have an anti vacuum valve but the valve is stuck in the "shut" position.
In that case, continue doing exactly as you have been each time you switch on the machine and it will work as required. If it were me I would also free up the nipple in the anti vacuum valve by waiting until the machine goes to real pressure and CAREFULLY and quickly tapping the nipple with something like a screw driver handle (from a distance so as not to squirt myself in the face with steam). Tap it a couple of times and that frees up the valve, however what you have already discovered by opening the steam tap is normal practice anyway.
By the way, I always pull the plug right out of the socket and release all pressure if doing any work on my machines because I wouldnt like to be the best steam disfigured or electrocuted DIY espresso machine repairer in the suburb* :D
Actually I recommend you take it infor service and pay a professional repairer to check her over.
Hope that helps.
very first CS site sponsor