Google Assistant command delayed for 5 minutes after "shutdown"?

Here you are welcome to discuss items of general interest related to Push2Run
Post Reply
markpalmos
Posts: 7
Joined: Tue Oct 27, 2020 6:18 am

Google Assistant command delayed for 5 minutes after "shutdown"?

Post by markpalmos »

Hi,
I have the shutdown command working well on my Google home to shutdown my PC, but I have a bunch of accessories on a smart power strip which I would like to power down AFTER the PC has been shut down.

I have a separate command on my Google Home app to "switch off Edit System" and that shuts down the power strip. When I turn it back on, the PC auto reboots due to the bios setting, and all is fine and dandy... BUT it would be even nicer if I did not have to give two commands to shut the system down, so my question is:

Is there something I can run on Push2Run which would wait 5 minutes after the command to "shutdown the computer" and would then issue the "switch off Edit System" command to Google Assistant? IE is there a way to
1/ issue a command but which is delayed for 5 minutes
2/ have the command work when the PC is off
3/ command Google Assistant with a voice command ?

That would float my boat daily!
Thanks,
Mark.
RobLatour
Site Admin
Posts: 1003
Joined: Mon Feb 19, 2018 11:43 am

Re: Google Assistant command delayed for 5 minutes after "shutdown"?

Post by RobLatour »

Not sure, but it sounds like you want to be able to issue a command to Push2Run to have Push2Run run a command to turn off your power bar five minutes after the computer is shut down - which is not going to work because of course if your computer is shutdown Push2Run won't be running.

Also, I just looked at IFTTT and it doesn't look like you can add a delay in between actions. However, even if you could, you would likely not want IFTTT sending one command to turn off your computer, and another after a delay to turn off you power bar (controlled for example by a sonoff switch) because after you turn off your computer you may decide to turn it back on and you would have to have a way to abort the 2nd IFTTT command that is being delayed to turn off the power bar.
markpalmos
Posts: 7
Joined: Tue Oct 27, 2020 6:18 am

Re: Google Assistant command delayed for 5 minutes after "shutdown"?

Post by markpalmos »

Hi Rob,
Well, I would almost never change my mind about shutting down within 5 minutes, and the only reason for such a long delay is that sometimes windows may take longer to shut down, perhaps if I have a running app (I am forseeing using this command when I am away from home or downstairs and want to shut down without necessarily closing all the open apps first) windows would take longer to shut down (of course if there was something that needed to be saved, the shut down would probably be aborted). I'd want the delay to not power off before the computer has fully shut down.

My thoughts were that P2R would send a command to some other app, like IFTTT, and that would contain the delay, so the computer being shut off would be unrelated to the message being delivered, if you know what I mean...

It's a "would be nice thing", it's not too hard to shut down manually when I'm at the computer and then use the voice command when I hear the PC has shut down.

tx
Mark
RobLatour
Site Admin
Posts: 1003
Joined: Mon Feb 19, 2018 11:43 am

Re: Google Assistant command delayed for 5 minutes after "shutdown"?

Post by RobLatour »

You might be able to find a way by plugging your power bar into a smart plug, and then setting up a google routine to:
a) trigger IFTTT to send a command to Push2Run to turn off your PC
b) delay for five minutes
c) send a command to turn off your smart plug

For b - take a look at this: https://support.google.com/googlenest/t ... 2284?hl=en

Have not done this myself, don't know if it will work but if it does, or you find a solution please post back here
markpalmos
Posts: 7
Joined: Tue Oct 27, 2020 6:18 am

Re: Google Assistant command delayed for 5 minutes after "shutdown"?

Post by markpalmos »

Hi Rob, so I have a discovery...

See the two attached images, the Google Home routines are exactly the same, but in one case, the SAY "do not go gentle..." which I used as a way to delay the last event works fine to delay, but in the other case it does not.

The only difference between these two routines is that AFTER the Say command, the last events are different.. In the one which does not work, the action is expressed as a command to turn off the smart plug called "Audio". In the version that does work, the same plug is turned off using the "Browse Popular Actions" tab in Google Home, and selecting "Adjust lights, plugs, and more" then choosing the desired smart plug.

So it seems that something about using a smart plug via "Popular Actions" in Google Home is different from doing it via a basic action in Google Home. I have not tested to see if ANY "popular action" will work in the same way, ie having some bogus action may be a work-around.

So for my purposes, this works perfectly. I can tell Google Assistant to "shut down my computer" even if I am away from home, and it will activate push2run to shutdown the PC, then it will turn the speaker volume to 10%, then read a bunch of poetry (takes 3 minutes), then turn speaker volume back to 50%, then power off the smart power strip which powers off PC, HD, Monitors, Audio gear. A basic command to "turn on my edit suite" then powers up the power strip which automatically runs the PC and everything else (except the external HD which requires a press of the power button, but I can do that after the pc has booted, no problem).

So this is great, I will test a bit more to find out what kinds of "popular actions" in Google Home will work to have the Routine wait for the poetry to be completely read before taking the next action.

Cheers,
Mark.
Attachments
google routine delay does not work.jpg
google routine delay does not work.jpg (104.74 KiB) Viewed 2659 times
google routine delay works.jpg
google routine delay works.jpg (108.63 KiB) Viewed 2659 times
markpalmos
Posts: 7
Joined: Tue Oct 27, 2020 6:18 am

Re: Google Assistant command delayed for 5 minutes after "shutdown"?

Post by markpalmos »

...and on further investigation, none of the "software" commands on Google Home will force the Routine to wait, only HARDWARE items... so any of my smarty plugs or my smart TV will work. I tell my smart TV to Turn Off or Turn On, then this will result in the Routine waiting for the spoken poetry to finish before executing the next action... but if I set the smart TV to Don't Change, then the delay does not happen and the next action happens as soon as the previous action has started.

I'd find it useful to have a super cheap bogus bit of Smart Nonsense that would act as a bit of kit which would do nothing other than to force this delay!

Cheers,
Mark.
Post Reply