Fully automated bed and alarm clock

Hey together I wanted to share my NodeRed config for automating my Bed lighting, alarm clock, notifycation to get to bed and heating. If there is interest in the topic I will tell the exact codes from the blocks if needed.

On the base stands a scale I build under my bed with an hx711 sensor to differentiate how much persons there are in the bed.

Then there are states set for every person like “time for bed” , “time to wake up” , “nighttime”, “daytime”. Based on how the persons number changes and what state they are in another state will be set and actions like a nightlight turning on are triggered.

The functions are:

  • saying it is time to go to bed
  • dimming down the lights when laying down (only in the bedroom if other person is in the apartment and not laying down as well)
  • turn on the light with a small intensity when standing up during the night
  • wake up light an announcement when it is time to get up
  • changing the light when getting up after the alarm clock has rang
  • states are arming/disarming the alarm system and control the heating

My alarm clock gets set everyday new based on calendar events because im working on shift.

The scale calculator:

The alarm and sleep clock:


And everything to cover all cases for laying down and getting up: