This is also very well trod ground, Plato did a good job on it.
Plato would have called your definition of happiness hedonism.
He would have called the articles definition of happiness eudaimonism, and that lines up pretty good with what you said can make you miserable. Plato and happiness scientists generally agree that eudaimonism is the best route to long term happiness.
Perhaps we should just stop using the word happiness and use the words pleasure and satisfaction instead.