Seems crazy, but the Lift mobile app helped me a lot. It's focus is around getting you to "check-in" to your habits with the aim of doing them for 21 days. There's a social factor too, but I feel quite motivated to not break the cycle after a few days of check-ins.