Monday 14 December 2020

Google Assistant API, controlling a light switch connected to Google Home

I have machine A that just cranks out .png files. It gets synced to machine B and I view it on machine B.

Sometimes machine A crashes for whatever reason and stops doing the scheduled jobs, which means then files on machine B will be old.

I want machine B to run a script to see if the file is older than 1 day, and if it is, then reset the power switch on machine A, so that it can be cold booted. The switch is connected to Google Home but understand I have to use the Assistant API.

I have installed the google-assistant-sdk[samples] package. Can someone show me some code on how to query and return all devices then flip the switch on and off on that device?



from Google Assistant API, controlling a light switch connected to Google Home

No comments:

Post a Comment