Making my own bed sensor
homeautomationguy.io
homeautomationguy.io
Near the end of my grandmother's life, she was living with my parents and a fall risk. I did this same ESPHome implementation to HomeAssistant to provide us with alerts when she got up on her own in the middle of the night, and it helped my mother sleep much better.
Side note: those other two wires the author says they "have NFI what they do" are most likely wired into the pad as a permanently connected loop. Most monitoring equipment will look for a closed circuit on those wires to detect that a sensor pad is connected correctly and the sensor wire hasn't been broken (ripped, torn, cut, etc).
It’s literally a device designed to do exactly what I sometimes need (start an action if a circuit closes) and I just never thought about it even though I know how leak sensors work and that there are ones available. Duh!
Stuff like that is why I love HN. Thanks to the author if you’re reading.
I guess that would also be a really easy to do the opposite (if it mattered) since a reed switch triggers the action when it opens, but a leak detector when it closes. Or I guess maybe they do both.
I am curious why the leak detector is bigger if it’s a simpler device. Basically the same thing but without the reed switch right? Maybe just to make room for more battery since you actually care how big the door sensor is.
I think a leak sensor is more complicated because it needs to detect a somewhat lowered resistance between the contacts, as opposed to the door sensors that will get a fully closed/opened reed switch on activation. Detecting lower resistance with some threshold in a battery powered device that needs to sleep most of the time is probably more complicated. I would guess waking up on a pin state change is built into most microcontrollers, while measuring resistance to make it wake up requires additional components?
The door sensors on my alarm do make it many different noises on open/close so that one must trigger on both. How cool.
Does anyone know of any bed automatable bed heating/cooling solution (DIY or otherwise) that can work offline of with Home Assistant? I had my eyes on E*ght Sleep but it looks like a lot of the functionality is behind a subscription wall [1] and the device is very chatty [2] and I haven't been able to find any API reverse engineering / firmware mods.
[0]: https://www.youtube.com/watch?v=s-GzUTyIH9c
[1]: https://old.reddit.com/r/EightSleep/comments/1248wgz/buyer_b...
[2]: https://old.reddit.com/r/EightSleep/comments/185cgm4/pod_3_t...
The older generation Oolers use bluetooth and there are a fair number of integrations including an [MQTT bridge](https://github.com/turmoni/ooler-mqtt-bridge) and a [HomeAssistant integration](https://github.com/PostLogical/ooler).
I'm less familiar with their latest generation which uses WiFi, though there [seems to be an API](https://docs.developer.sleep.me/api/ ) available for it now.
They generally suffer from exact counts of objects. 2 people close to each other will read like one large person. A large cat close to the sensor could read like a large human at a greater distance.
I think the idea of presence detection is such an interesting problem, really an AI camera is the best solution but nobody wants cameras all over their house. There's also thermal imaging with sensors like MLX90640 which is a very low res thermal sensor.
Seems to work pretty well for the most part, had a bit of a play with it but not actually built something to be put in the home yet but the only drawback is static heat sources like radiators obscuring moving heat sources like a person.
2 Load cells one on each back leg of the bed. Upside too is I've been able to discern things like, sitting on the edge of the bed to put on shoes etc based on the weights.
Esphome, load cell, and hx711 chip for the load cell comes out to about $40-$50 each leg.
Then it just stopped working. Contacting support thought it might be the pad, and they sent me a replacement. That worked for a while longer, until it didn't. At that point, Withings had been sold to Nokia, and wasn't interested in maintaining their system anymore.
I miss it. I'm sure that this system won't be able to do all the measurements the Withings one did, but thats OK. I've got a watch for that. Def. going to have to try this soon!
They still sell the bed sensors, don't know if you would have any luck contacting them now. If you do I would be interested in knowing if they respond or not. I recently bought one of their watches and am thinking about buying a scale but I am curious about their long term support.
They even recently launched their Withings+ subscription, so they are trying to bring in more revenue. Their other revenue stream (apart from selling devices) is some kind of reseller program. Let's hope they can make it sustainable so we can enjoy our devices.
I can attest that the new withings scales are really nice. We've got one in the bathroom and have no complaints
https://www.thesmartesthouse.com/collections/fibaro/products...
The result, graphed (at 1 minute per sample bin - don't get kinky ideas) gives a very good overview of awake/tossing and turning/really asleep. Which to a lousy sleeper like me can actually be reassuring - yes, I did get some sleep in all this.
- some sensor triggers lights on via impuls relay (that's what I have to happen in my home), HA stops functioning, lights remain on. How to make sure instead they're turned off? I get that not using impuls relays but relays which need to be driven high constantly might be one step in the right direction, but that would still assume whatever line the relay is driven with is pulled low when HA stops functioning.
- you setup HA to instruct your home battery to charge during off-peak hours, HA stops functioning during off-peak, battery is left in 'charge as much as you want' state. Unless battery has functionality to tell it 'charge max x hours' it will try to keep charging, whereas it would be nicer if it wouldn't
- same for heating: leave for vacation, tell HA to put heating in low power mode but to start heating the house again in normal mode 3 days before I'm back (because that's roughly the amount of time needed with low temp heating to get everything warm again). HA stops, I come home to a cold house.
Typically one of the first types of automations you do is presence and motion detection, for simple things like turning off lights when no one is home, turning on lights when you enter a room.
Then you find edge cases like wanting the lights to turn off when you're in bed, but not turn on if only one person gets up in the middle of the night.
If you want to automate any of these things then it's necessary for the system to see the events.
In my experience, people say it's all worthless, until they experience it themselves.
I have smart outlets for my christmas lights so they turn on at sunset, and that's about as far I want go.
"Unnecessary" is entirely a judgement call. Anything more than alligator clips (to make the connection latching) on bare wires to dis/connect the power to the light is arguably "unnecessary".
The whole point of the automation is so you don't have to remember to do it. I'd still have to remember to open the app, or slap the smart button, or whatever. Rolling over to slap the smart button doesn't disrupt my descent to sleep as much as walking out to the kitchen to turn off the light, but it is more disruptive than just falling asleep. This is to say nothing of using a smart speaker, and dealing with the 1-2 punch of waking up enough to say "turn off kitchen lights", and dealing with the consequences that spring from my kids' special sensitivity to my and my wife's voices near bed time.
Again, this isn't for me, but I fully understand the need.
“Greg’s Bed …. Wet”
I've so often been asked "but why are you doing this" or suggested that I go and buy the stuff that I'm making.
I find it very annoying. I find most people who ask so such questions won't "get it" even if I explain.
But I do understand that most often people are trying to be helpful. They can't imagine going through the ordeal that I'm going through for something of no value to them.
I just find I get tickled by the ratio of my interest in how someone solved their problem to (my) lack of interest in the product in this particular genre at least.
"To each their own" is a good principle :)
I guess a different way of looking at it is this, I'm laughing at myself realizing that I would happily spend hours helping you figure out a hardware/software problem in your home automation setup, but I wouldn't spend minutes automating my own home. probably. maybe the right itch hasn't presented itself.
Count me in the "I just don't understand why" group too --- I work with enough software in my day job that I really don't want more of it in my life beyond that.
The more I do of my own projects the higher is the fun to frustration ratio of doing software/projects.
For my bed detection though I just have Tasker on our phones telling the system when they charge. If it's after a certain point of day and our phones are charging that's a good indicator that we've gone to bed. Doesn't require any extra hardware, making it super cheap. Although accuracy obviously won't be 100%.
You can achieve it with DIY but if you want microamp-level current consumption you’ve got to do without a lot of the components that appear on dev boards
I would welcome a system, which may be used as a pod sensor, like the mentioned EightSleep or Withings, both not visible. But I want to set when something is radioing around my bed. Just like on my smartphone, where the flight mode is activated, I would like to set the device so that the data is only synchronized via WLAN or Bluetooth when I am no longer lying in bed.
Another option would be Whoop that you can add to your underwear.
Expensive I know, but it works very well.
water is 1kg/dm3, and acording to this website (https://www.aqua-calc.com/page/density-table/substance/human...) human is arround 1000kg/m3 which make sense.
So, yes matress is light compared to human, I guess it does nothing to the sensor pad.
It works by having water (or another conductive liquid) provide a path between the contacts.
Mostly I'm just jealous that the dog spends more time in my bed than I do.
I wouldn't be comfortable with Google or Amazon running my house but if it's stuff I flashed myself from github it's a lot better.
To have domotic connected to a wifi or internet is a no go.
If I were to have it for a really heavy weighted reason, seeing the current state of things, I would have previously to spend months developing non standard custom encryptions with hidden rotatory keys methods of my own, custom non standard protocol, connections monitoring and so on. And even like that I would feel cautious, It would need to be a real weighted reason.
I can not understand how is it possible the people is using IoT without needing it, totally naked, without even demand any kind of protection designs, or/and even giving third parties all that information, because it can be even dangerous.
Semi-Of-topic:
I would like to have a lidar vacuum cleaner, for to clean effectively zones without collisions with a mapping, etc. Past year I took a look to manufacturers and models, but it seems that from the beginning, when they started to sell them years ago, those devices with mapping require to be connected to the wifi and to the internet; they submit the mapping of your home to internet, the manufacturer server, for to let you make use of such mapping for to run the vacuum cleaner. Oh my...
I could not even find more information on the forums (in several languages), people don't seem to find this as a inconvenient? for me it's an absolute no go.
All of this is approaching the classic dystopian books that should remain in the sci-fi section.