My main breaker box is not working. My secondary one is. So most of my household without power. Then at 937 at night the power in my house comes on very low and stays on for a couple of he's before it goes off again. What would cause this?
I suspect you have a meter. If not, get one. Harbor Freight has them for less than $15. You say your main circuit is not working, but your sub-panel is, is that correct? I suspect that one leg of your main panel is not working and the other one is. To test this, remove your cover from your panel box. Remove your wedding ring....trust me, it is a good idea. Set your meter to 200 volts AC. Touch one probe to the point where the black wire comes in and fastens to the box' Touch your other probe to the box itself. You should have a reading of 115v to 122v. If so, this side is good. Repeat for the other side with the red wire. This will be good or bad. I suspect one side is bad. I say this because your sub-panel cannot be working if your main panel is totally dead.
The other issue has to do with your ground or neutral. With wedding ring off, go down your neutral and ground bars and make sure they are all tight.
Why wedding ring off? Because it can cause arcing, and you would not be happy with that!