I had that same problem. For several years I would randomly get a surge of motivation...be good for a month and lose some weight...then fall off the wagon. Blah!!
The biggest differences NOW, is that I am fully commited. I keep a written Food journal and i stick to my calorie range 100%. No matter what. Hurricane? Stick to it. Babies up all night? Stick to it. Sicknesses? Stick to it. Stressful life in general??? Stick to it!!
I told my friends and family my plan and they held me accountable. My husband was super supportive, and not just in words. he actually HELPED with the kids, the house, etc. It was THAT, I swear, that changed everything this time.
I didn't have to "add in" working out and eating right. It was my job. I gave myself 100 days, and my hubby, kids, etc were all slightly on the back burner. Of course it didn't ALWAYS work perfectly like that, you ca't control every aspect of life. But no matter how crazy the day was, I never went over my calorie count and I learned to put my gym time first.
You can do it!