Dans Homey, tu télécharges l’application “présence intelligente” celle-ci vérifie si ton téléphone est connecté au wifi ou non.
Quand j’éteins mon wifi entre 21h00 et 7h00 du matin, cela veut dire que je vais dormir.
Quand je rallumes le wifi de mon téléphone, cela veut dire que je suis réveillé. (Si tu veux garder des notifications d’autres applications alors allume ton 4G pendant que tu dors )
In Homey, you download the “Smart Presence” app, which checks whether your phone is connected to Wi-Fi or not.
When I turn off my wifi between 9:00 p.m. and 7:00 a.m., it means I’m going to sleep.
When I turn my phone’s wifi back on, it means I’m awake. (If you want to keep notifications from other apps then turn on your 4G while you sleep).
I’m sleeping in an electric bed where I have placed a door sensor on the part that elevates and the frame of the bed which is stationary. The last thing I do before going to sleep is lower the bed to be fully horizontal which closes the doorcontact and registers me to be sleeping. Next moring I raise the bed again after waking up and I leave it in that position during the day which tells Homey I’m awake.
I’m using the MacroDroid app on my Android phone to automate sleep tracking. When I activate my alarm in Sleep Cycle, MacroDroid detects it and sends a webhook (ending with /sleeping) to Homey Pro, marking me as sleeping. When the alarm goes off and shows a ‘Good morning’ message, another webhook (/awake) is sent to update my status.
For others in the house, I don’t use this method as they either have different alarms or don’t want MacroDroid installed.
The water sensor idea is genius—definitely going to try that!
A little app that uses Sleep API | Google for Developers and send a notifiction to homey (Or MQTT to make it more universal) would be nice. I am not an android developper… Just a suggestion.
I use a button to tell homey I am going to sleep.
Waking up goes with my iphone alarm. You can start a flow when that alarm goes of, so every morning depending on my alarm time, I am set to awake again in Homey.
For me, the Awake/Asleep functionality is not the actual state of the people in the house, but more their intent. All the lights in my house are programmed to turn on/off and dim automatically based on motion and luminance. I use the sleep status to dim the lights differently. Whenever someone is marked asleep, I disable the automatic dimming in their bedroom and he/she receives a notification with the question whether they want to turn off the lights in their bedroom, or all the lights in the house. Also, when everyone is set to asleep, whenever the hallway or bathroom motion sensor is triggered, I automatically dim to only 3% to act as a night/guide light. Also, people can enable and configure their wake up alarm. You can create a wake-up light and a Sonos playlist that will be played when you wake up.
So in my household, everyone is free to mark themselves as asleep/awake however they want to, but most (including me )have it tied to their sleep mode in iOS which is either controlled through a sleep schedule or manually (with a lock-screen). It doesn’t make sense to have it enabled/disabled by a sensor that senses when you are actually asleep. You set it when you want to go to sleep.
You need to install MY (modified) version of the app and it will work. For me it works flawlessly - it’s quick and reliable. I use one double bed (so 2 sensors in 1 device), now I bought another 2 sensors for my kids beds - I will install them during the weekend.
The only problem I face is that the app sometimes looses the connection (it’s just the app’s problem, not the device’s). If you restart the app it works again for a couple of days. I didn’t have enough time to find out why is that happening, but the solution is easy - small flow that restarts the app every night and since then I have totally no problems. It works much much better than Withings sleep mat (for this purpose of course).
Of course I can send you my version of the app so you can install it yourself or I can install it remotely (but I would have to have your homey user and pass…..)
I can see they are available at the moment, but limited amounts. If you buy them - send me a priv message with your email - I’ll send you the modified app.
When i had a percolator[1] as coffee machine, i also had a “Good Morning, Google!”.
switching on coffee machine
switching on some soft lights “far away” - do not disturb sleepy eyes
do quick briefing about day via voice ( weather, events,…. )
And then, if the coffee was ready, then announcement from voice - “Your coffe is ready” and some additional lights, if neccessary (here the sunrise vary from 500 to 900)
What’s the point?
Some times there may be better to have full control ( i know exactly, when i’m ready to start my day) instead of machine to decide, when to throw You out from beed.
Yes, it depends fully of Your daily routines and sleeping habbits. For me the w-u-alarm is option, not neccessarity - because of that there wasn’t “exactly at 700 the day starts”, and i like to stay for couple of minutes before stayin’ up in bed ( just the time, when brain wakes up and nose detects the smell of fresh coffee from kitchen )
PS. Yes, i thinked about the automatic switches & Co also… but none of them was able to detect my half-awake status, when i was ready to start my day. Not so hapy to step out from beed(activate some switch) into darkness.
PPS. Sorry, this long story not exactly about of automation, but about of (my personal) habbits. But the main advice - think before, may-be there is simpler solution
[1] Possibility to do simple power-switch start (after elliminating EU rules) and ~5 minutes time to finish the brew.
I wasn’t even aware that the bed presence sensor from Elevated Sensors was being discussed here, so the timing is a bit of a coincidence. I received the sensor a while ago but hadn’t had the time to set it up in my house since I was moving. When I finally got the chance, I noticed I couldn’t get it to be detected by the existing ESPHome app for Homey.
So I decided to build a dedicated app for the sensor, as I also don’t really like the workflow of the generalized ESPHome app. I do acknowledge the tremendous effort that went into that app, but from a usability perspective, dedicated apps provide a better experience. It also gave me the opportunity to use a more up-to-date library to communicate with the ESPHome sensor, which will hopefully result in a more stable and reliable connection and operation.
If I have the time I’ll create a dedicated topic for the app before the weekend starts.
I want to rephrase my earlier statement. The awake/asleep presence states in homey are meant as an intent of action, NOT to represent the actual physical state of the person! The name might be a bit poorly chosen, but in the timeline you will see the logs state “John went to bed“ and not “John fell asleep”.
This is so that in your flows, you can distinguish between whether someone is in the bedroom to go to sleep, or wether someone is in the bedroom to do other things like vacuuming, reading a book, etc..
You might want to use this information to change the behavior of the lighting, alerts, etc. or turn off equipment automatically.
I think it’s a bad idea to tie this state to an actual sleep sensor, because then the state will be reactive instead of proactive. What if a person went to bed to try to go to sleep, but suddenly the lights go on, or the Sonos plays a message that the laundry is ready?
What you could do however, is create flows that allow you to set awake/asleep mode through shortcuts. You can then set your presence to asleep whenever the sleep focus mode is activated on your iPhone, and set your presence to awake whenever the sleep focus mode is deactivated on your iPhone. This way you can even tie this to you sleep schedule that you defined in the health app.
Also, I think it’s good for apps such as elevated sensors to keep bed presence as a separate state. I would still not use these sensors to tie bed presence to the awake/asleep state. The presence in a bed does not directly mean that a person is asleep or awake, nor that he wants to go to sleep or wake up. What if someone just wants to read a book in bed? What if someone want to go to the toilet in the middle of the night?Do you want to start evening or morning routines based on that?