Leo Auffmann and his wife are sleeping when Leo wakes up one morning and seems to hear a song directed to him by the world itself. He decides he owes the world something back, much to Lena's confusion. Leo goes to the garage and makes a blueprint for a machine. He places toys and souvenirs on each panel of the machine's plan. When his son Saul comes in, Leo explains that he's making a happiness machine, but he isn't sure how to complete it. Saul adds a flower and his father is satisfied that the plans are finished.
At breakfast, Leo explains what he's making and announces that he's taking a vacation to finish it. He starts going around collecting photos of things that make happiness, and asks Lena what makes her happy. She believes it's better not to try and determine the source of happiness and then burns her roast because of Leo's questions.
Back in the workshop, Leo decides that happiness should be bright and starts making his machine. He ignores his four children, leaving them to Lena to care for. Leo continues to work late each night until he finally comes in and tells his family that the happiness machine is complete, and then collapses.
Late the next morning, Leo wakes up and discovers he's overslept. Lena tells him that he should give it up but Leo refuses. That night, Leo is trying to sleep when he hears the machine activate. He hears Saul yell and goes to check on the boy. Saul is in bed, but he's sweating and clearly upset despite the fact he's asleep. Realizing that Saul has used the machine, Lena decides to call the trash removal company and have the happiness machine taken away. They will arrive in two hours, and Leo asks his wife to give him that much time to prove the machine is good.
Leo pulls the happiness machine out onto the driveway and invites Lena to try it. She reluctantly gets inside and Leo assures the children that everything is fine. He turns it on and Lena is bombarded with pictures of faraway places, the smell of flowers, and the sound of music. For a few moments she is overwhelmed, but then pounds on the door and demands to be released. When Leo lets her out, Lena tells him that he's created a sadness machine. All it does is remind her of all the things she can never have and the places she can never go. Lena explains that no one wants a permanent sunset, or perfect temperature. They'd just get bored. She tells Leo to make do, and he wonders what to do. Lena leaves it up to him, but warns that they'll be unable to resist the machine. Like Saul, they'll soon be tormented by the happiness they can only experience second-hand. When the garbage men arrive, Leo refuses to let them take the machine.
Lena leads the children away and Leo is left in despair. Saul comes out to admire the sunset and point it out to his father. Realizing what he's looking at. Leo enters the happiness machine and wonders how he could have gotten things so wrong. He turns on the machine but it starts to smoke. Leo gets out just in time as the machine burns up as Lena and the children look on.
Once the fire department put out the blaze, Leo stares at it in despair. Lena tells him to look at their house and peer in the windows. Leo looks inside and sees his wife and four children going about their lives, and realizes that he already has a happiness machine: a home and family.