# Setting awake with Fibaro plugs

**URL:** <https://community.homey.app/t/setting-awake-with-fibaro-plugs/19983>\
**Category:** Questions & Help\
**Created:** [October 31, 2019, 5:31am UTC](https://community.homey.app/t/setting-awake-with-fibaro-plugs/19983 "2019-10-31T05:31:44Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![moenieseuren](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/moenieseuren/32/16465_2.png) [@moenieseuren](https://community.homey.app/u/moenieseuren)\
**Post date:** [October 31, 2019, 5:31am UTC](https://community.homey.app/t/setting-awake-with-fibaro-plugs/19983/1 "2019-10-31T05:31:44Z")

</div>

I use two Fibaro power plugs to measure if the phones of my partner and me are connected to the power outlet next to the bed. The purpose is obvious: setting the sleep state.

Setting asleep is no problem, because I know what the power use is when the phone starts charging.

When the phone is fully charged, its power use is intermittently 0 W and something slightly higher (say 0,2 W). These.values change every few seconds.

I would like to set the awake status when the phone is taken off the charger. Is there a way to create a flow that sets the status to awake when the power use is 0 W for, for instance, 60 seconds?

Any other great ideas are welcome as well, of course!

---

<div class="post-metadata">

**Author:** ![danone](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/danone/32/115743_2.png) [@danone](https://community.homey.app/u/danone)\
**Post date:** [October 31, 2019, 7:48am UTC](https://community.homey.app/t/setting-awake-with-fibaro-plugs/19983/2 "2019-10-31T07:48:50Z")

</div>

Few methods that cross my mind. One of them is by using the Countdown and Better Logic apps.  
Someone here created a very nice post of how to get a notification when the washing machine is done. This and with very minor modifications can help in your case. [Get a notification when the washingmachine is ready](https://community.homey.app/t/get-a-notification-when-the-washingmachine-is-ready/9372)

---

<div class="post-metadata">

**Author:** ![Rdw](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rdw/32/10679_2.png) [@Rdw](https://community.homey.app/u/Rdw)\
**Post date:** [October 31, 2019, 8:22am UTC](https://community.homey.app/t/setting-awake-with-fibaro-plugs/19983/3 "2019-10-31T08:22:16Z")

</div>

Could’t get that to work as i wanted.  
i noticed that when you unlock your phone, it starts using energy again. so my flow goes:

- IF energy has changed

- AND the time is between 05:30 - 09:30

- AND energy is greater than 0.5 Watt

- THEN turn off sleep mode

---

<div class="post-metadata">

**Author:** ![moenieseuren](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/moenieseuren/32/16465_2.png) [@moenieseuren](https://community.homey.app/u/moenieseuren)\
**Post date:** [October 31, 2019, 8:31am UTC](https://community.homey.app/t/setting-awake-with-fibaro-plugs/19983/4 "2019-10-31T08:31:48Z")

</div>

Interesting! I’m going to try that tonight!

---

<div class="post-metadata">

**Author:** ![moenieseuren](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/moenieseuren/32/16465_2.png) [@moenieseuren](https://community.homey.app/u/moenieseuren)\
**Post date:** [October 31, 2019, 8:36am UTC](https://community.homey.app/t/setting-awake-with-fibaro-plugs/19983/5 "2019-10-31T08:36:22Z")

</div>

Also interesting! Problem is that my partner works in different shifts, so I can’t really work with time in this one. ☹  
I will post the solution that does the job for me in this topic later.

Great ideas are still welcome of course!

---

<div class="post-metadata">

**Author:** ![Hugo](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/hugo/32/11530_2.png) [@Hugo](https://community.homey.app/u/Hugo)\
**Post date:** [November 1, 2019, 7:54am UTC](https://community.homey.app/t/setting-awake-with-fibaro-plugs/19983/6 "2019-11-01T07:54:15Z")

</div>

I use IFTTT there is a option: if Phone is on/of power.  
Works like a charm.

---

<div class="post-metadata">

**Author:** ![moenieseuren](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/moenieseuren/32/16465_2.png) [@moenieseuren](https://community.homey.app/u/moenieseuren)\
**Post date:** [November 1, 2019, 8:33am UTC](https://community.homey.app/t/setting-awake-with-fibaro-plugs/19983/7 "2019-11-01T08:33:48Z")

</div>

@Hugo thanks for you suggestion, but being heavy phone users, our phones are being charged everywhere; at work, in the car, using power banks, so Homey would think we were sleeping all day. 😉

I have solved the problem though, thanks to the suggestion of @danone and the washing machine solution of @Rocodamelshekima.

The intermittent changing of the phone’s used power when fully charged is happening a few times per minute. I do not mind a one minute delay when changing my status to ‘awake’, so I solved it this way:

I have created a countdown timer for 60 seconds, that starts running every time the power use of the charger changes AND is 0 W.  
Every time the power use changes AND is higher than 0 W, the timer is stopped. This happens multiple times per minute from the moment the phone is fully charged.  
When the phone is disconnected, the used power will stay at 0 W, so the timer will keep counting down to 0.  
When the timer is at 0, my status is set to awake.

I did use [The Countdown App](https://apps.athom.com/app/nl.bevlogenheid.countdown), created a timer _TimerDennis_ and _TimerPartner_ and created three flows per person:

**Dennis Phone Power \<\> 0**  
**When** the power changed  
**And** Timer running _TimerDennis_  
**And** Power is not exactly _0_  
**Then** Stop countdown timer _TimerDennis_

**Dennis Phone Power = 0**  
**When** the power changed  
**And** Power is exactly _0_  
**And** Timer not running _TimerDennis_  
**Then** Start countdown timer _TimerDennis 60_

**Dennis gets up**  
**When** Timer reaches zero (0) _TimerDennis_  
**Then** mark _Dennis_ awake

And, of course, I created the same set of flows for my partner.

I am not a programmer, so I probably could do things far more efficient, if so, I’m always happy to learn!
