Page 1 of 1

Dropbox file persists causing the computer to perform unintended actions

Posted: Sat Mar 28, 2020 10:52 pm
by dsouzadrian
So I've setup Push2Run with routines on my google home.

One of the actions is for my computer to hibernate automatically when I say good night to my google home. The issue is that, my computer is setup to automatically hibernate after 60 minutes of inactivity. Hence there are instances where my computer may have already been in hibernation when I give the command to my google home.

This will cause the IFTTT recipe to create the command.txt file in the dropbox folder. However since my computer was already hibernated at the time, the file will continue to sit in dropbox.

The issue is that when I start up my computer the next day, Push2Run will detect this file and then automatically hibernate my computer again. This is of course unintended and I need to start my computer back up again.

You could possibly look at the date time stamp on the file to determine when the action was actually requested through the IFTTT recipe. If it was more than - maybe 10 minutes ago - perhaps thats not an action Push2Run needs to perform.

Thanks for the great work.

Re: Dropbox file persists causing the computer to perform unintended actions

Posted: Sat Mar 28, 2020 11:58 pm
by RobLatour
Thanks for pointing this out, I will have to take a look.

Push2Run already deletes the command file if it is there when the program starts up. However, I hadn't considered the hibernation scenario.

I do some testing to see how the time stamp works; if for example if your computer is asleep at 10:00 am, you issue a google command at 10:05 am, and you wake your computer up at 10:10 am does the file get created with a timestamp of 10:05 or 10:10.

I'd test it tonight, but hibernation and my computer just don't get along, I often end up having to reboot - and its just about midnight now, I need to do a little hibernation myself.

Re: Dropbox file persists causing the computer to perform unintended actions

Posted: Sun Mar 29, 2020 11:05 pm
by RobLatour
So I took a look at this today.

It seems that if you put your PC to sleep the Dropbox file gets created with a timestamp set to at time after your PC has woken up; so based on the create date of the file Push2Run can't tell if its an old one or not.

IFTTT does allow you to add a 'CreatedAt' time stamp within the contents of the dropbox file itself, which I should be able to use to resolve this.

I've made the coding changes, and so far testing looks positive. I will likely do some more testing tomorrow, time permitting.

If you would like to try out a beta version, please just let me know and I'll post its location in this thread plus some instructions.

Re: Dropbox file persists causing the computer to perform unintended actions

Posted: Tue Mar 31, 2020 10:54 am
by RobLatour
ok - I finished work on the fix for this and have released an updated version of the program (v3.0.2) to correct for it.

For more information, please see: https://www.push2run.com/versionhistory.html

Re: Dropbox file persists causing the computer to perform unintended actions

Posted: Thu May 14, 2020 12:10 am
by dsouzadrian
Awesome, thanks for fixing that. I lost track of this post.
Have just upgraded to the latest version, I'll test it out and let you know.