Bed Scale & Occupancy Sensor Project Update

Hey everyone, I wanted to share an exciting project I’ve been working on inspired by some of the amazing bed occupancy sensor builds I’ve seen around the community. I’m really happy with how it’s turned out and thought I’d walk through the setup in case anyone else is looking to try something similar.### The BuildI went with the CNBTR YZC-161B load cells, one under each leg of my IKEA SULTAN bed. These were paired with a HX711 load cell amplifier and connected to a WeMos D1 mini (ESP8266) running esphome. The setup publishes weight data to MQTT every second, which is then processed by Home Assistant.### Integration with Home AssistantThe MQTT data is used to create virtual sensors for bed occupancy and sleep tracking. I’ve set up automations to turn off the bedroom lights when I go to bed and track sleep patterns using statistics and binary sensors. It’s been really cool seeing how the weight data translates into actionable automations.### Data VisualizationOn the backend, I’m using a MQTT broker, InfluxDB, and Grafana running in a Docker container on DigitalOcean. This setup allows me to visualize sleep patterns and receive daily sleep reports via Telegram. The integration has been surprisingly reliable, even when the Raspberry Pi at home is offline.### Future PlansI’m really happy with how this has turned out, but there’s always room for improvement. I’d like to refine the sleep detection algorithm and maybe add some more detailed analytics. If anyone has tips on improving the accuracy or suggestions for new features, I’d love to hear them!This project has been a fantastic way to combine hardware hacking with smart home automation, and I’m thrilled to be able to share it with the community. Thanks to everyone whose projects inspired me—I hope this might spark some ideas for others looking to try something similar!