Homey Community Forum

Setting awake with Fibaro plugs

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!

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

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

Interesting! I’m going to try that tonight!

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

Great ideas are still welcome of course!

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

@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. :wink:

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

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, 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!

1 Like