Google Home

81 views
Skip to first unread message

trogli...@gmail.com

unread,
Oct 2, 2020, 7:47:13 PM10/2/20
to MppDevices
Currently I use IFTTT to handle my voice commands through Google.  With the new restrictions on IFTTT I'm moving it natively to google home.  I've got it working by running a google cloud engine server inside the google cloud - after registering your location with Google Home, AutomationOnDrive is used to update that cloud engine service which in turn updates your google home account.  Trying to keep to the style of AutomationManager the only thing that's kept in the engine is an account ID that's taken from the AoD details - there's no separate account for you to manage.   The device information itself isn't persisted, just the keys to know which AoD instance goes with which data - the device state, etc, is kept only in RAM so disappears when the engine is stopped.

The problem is that google charges me to run that engine in their cloud, and for data in/out of their network.  To get around that I've added a subscription to AoD of $1.00 / month to offset the cost of running the server.

It's working now, so if anyone wants to give it a try let me know and I'll publish it.  I could use some help with checking how it runs using someone else's account since mine has permission to do everything...  The subscription is free for the first week (you can cancel before then and it'll run for the entire week).

trogli...@gmail.com

unread,
Oct 2, 2020, 8:54:33 PM10/2/20
to MppDevices
I was asked about the advantages of google home, it's a good question so I'll answer here so everyone can see.  Compared to IFTTT Google Home is a bit faster, and unlike IFTTT it generally keeps track of device state (it's not perfect, but it'll get in sync after a while and you can refresh it immediately from Google Home).  With IFTTT you needed extra applets to handle brightness, color, and bulb temperature (which uses up the 3 free applets pretty quickly), with Google Home those are built in to their existing voice commands.  I think (but I'm struggling to verify 'cause IFTTT keeps answering when google can't) that Google Home will recognize and tell you if there's no such device when it misunderstands, and will also tell you if a device isn't responding (IFTTT does not).  You can ask google home if a given device is on or off and it queries AoD before answering so it's accurate (you can't do with with IFTTT).  Both are cloud services so there's extra moving parts, but I think with both there's a big advantage of not using Belkin/TP Links cloud services - avoids adding riskier dependencies.  Both IFTTT and Google Home support all AM devices including MppDevices, flags, etc. Of course both work remotely.

BTW, I should mention that the subscription in AoD is optional, you only take it if you want to use Google Home - all of the other function is still there and still free.  There's a new app for picking which devices you want to show up in google home, and for signing up for the service (to cancel you go into google play to find the subscription and unsubscribe).

trogli...@gmail.com

unread,
Oct 7, 2020, 9:17:00 AM10/7/20
to MppDevices
AM 16.13.3 and AoD 5.0.4 betas just released to google play.  You can now pick/change the Google Home type for a few of the device types, e.g. Doors (open/close by voice), Locks (lock/unlock) are now available.
It's really quick so far - usually around 1s or less for an action, even remotely (actually everything is remote through AoD when using google home).

trogli...@gmail.com

unread,
Nov 15, 2020, 10:59:25 AM11/15/20
to MppDevices
Sorry, I should have posted an update here - it's taking a while (and it's pretty frustrating) to get through the approval process to get them to publish my AM home assistant skill ("action").  I *might* be almost there, they're finally happy with my icon shape and size and my oauth declaration.  We're still arguing a bit about the device support (they don't much like sensors though they work fine - for example you can ask google the temperature of a device and it'll tell you the current value, etc). But the tests are passing now and they seem to be convinced.
If you've used up the free trial (and not been allowed to do anything) ping me when I publish and announce the google "action" availability - I think I can generate free trial keys.

sergey

unread,
Nov 16, 2020, 9:44:43 AM11/16/20
to MppDevices
Mike could you clarify a bit in detail - how deeply "oauth" connected to my AM and others devices ? Thanks in advance)

trogli...@gmail.com

unread,
Nov 16, 2020, 11:29:01 AM11/16/20
to MppDevices
Sure:

Oauth is mostly used by AutomationOnDrive.  MppDevices don't use oauth.  
AM uses oauth under the covers when you give it permission to send gmails.

AoD and AM Remote OnDrive (and the google home support) work with an app & service I publish called "wemoremoteapp".  You'll see that you need to grant permission to use this app when you enable AoD.  It uses scripts to write to your google drive account and to send google cloud (firebase) messages to/from AM Remote and the web app.   If you use the AoD web app from a browser you'll need to give permission for it to use the scripts on "wemoremoteapp" as well - it uses those to build the location page and send requests.  The android apis use oauth under the covers to protect communication to those scripts which run under your google id (so I don't have any access to the data, it's all in your account).

I've extended "wemoremoteapp" so it can talk to the google assistant/home service to report device states and to accept actions (voice or manually in Google Home).

The oauth relationship for this is between google and "wemoremoteapp".  I've got approval from google to trust wemoremoteapp to provide devices to google home, and I've given google credentials to allow it to call back in to the wemoremoteapp to request changes (e.g. turn a switch on or off).  To work it uses the same google cloud messaging (firebase) to talk to AoD to execute the commands, and AoD reports state changes to wemoremoteapp which then tells google home.
Everything is protected by SSL/TLS, encryption, and signatures based on secret keys and oauth tokens (which expire quickly).

The approval I'm trying to get from google is to allow me to publish the AM function to the google assistant catalog so you'll be able to register to use it via google assistant "add device".

sergey

unread,
Nov 16, 2020, 2:19:16 PM11/16/20
to MppDevices
Under AM Remote OnDrive and "wemoremoteapp"- did you mean usual Am Remote service   i use to using to manage of my remote AM server ? Or it is something special  dedicated AoD only or maybe they are different?

trogli...@gmail.com

unread,
Nov 16, 2020, 4:39:05 PM11/16/20
to MppDevices
AM Remote uses either OnDrive or http as the remote communication mechanism.  The HTTP connection doesn't use oauth, I use java library encryption for it - when you register the client and AM Server exchange keys.  The OnDrive client connects to AutomationOnDrive (AoD) using the information in the google drive location file.

sergey

unread,
Nov 17, 2020, 1:15:53 AM11/17/20
to MppDevices
Ok, clear. If i understand everything right , i haven't any "Google's handles" in my country home when i only using Remote & AM without AoD. Except the time when AM server sends to me something over GMAIL.

trogli...@gmail.com

unread,
Nov 24, 2020, 9:15:16 PM11/24/20
to MppDevices
Ok, looks like I've cleared the hurdle, Automation Manager is now available as a skill on google assistant.
To use it you'll need the latest versions - AM 16.13.7, and AoD 5.0.6, just published and should be available soon.
You'll need to subscribe (service cost recovery, google charges me to host the service).  I can provide a coupon if the test period isn't long enough to try it out - ping me offline.  You can cancel the subscription at any time on google play.
The instructions are in the AoD help, but here's a quick recap:
  1. Install AM and AoD.  
  2. Confirm AoD is running properly with your google account and location name.
  3. Make sure the subscription has been created and accepted by AoD.
  4. Open AoD, go to the "Google Home" screen from the menu.  Select the devices you wish to use through Google Assistant/Home
    • For some devices you can touch the device type to change them, e.g. change a switch into a door lock, or a door, etc.
  5. Install and open Google Home
  6. Use the "+" button (top left) to add a device.
  7. Select "+ Set up device" 
  8. Under "Works with Google" select "Have something already set up?"
  9. The service list is alphabetic - scroll or search for Automation Manager, you'll see the AM icon.  Select it.
  10. A web page opens that shows the AoD locations on your Google Drive account (you can have multiple homes)
  11. Select 1 or more of the locations you want to use with Google Home.
  12. Touch the "Link to Home" button.
  13. You should be taken back to Google Home, wait a few seconds for the list of new devices to come up.  
    • Assign your devices to homes and rooms.
    • You can now use "ok google turn switch on" or off, or set a bulb red or purple, etc.
    • For locks you can use lock/unlock, doors can be open or closed.
    • Sensors can be queries - e.g. if you create a temperature sensor you can ask google it's temperature
    • Watch the naming, google needs reasonable plain names to figure out what you're asking.  It's also easily confused between rooms and devices if they have similar names - it'll usually pick the room and try to control all of the devices.
Please let me know if you have any feedback, or it acts up!

sergey

unread,
Nov 25, 2020, 8:29:08 AM11/25/20
to MppDevices
My congratulations Mike, great job!
Could you clarify - if any devices considered to work with Google Home ? Or there are some particular devices.
As you might know i've got bunch of my own devices, some of them pretty important for my , like thermostats(Relay,Relays+DS18B20) , sensors(analog battery),Voltage sensors(analog) and etc....  I've never have a deal with GH - how does their devices matches with ours ?

trogli...@gmail.com

unread,
Nov 25, 2020, 10:08:13 AM11/25/20
to MppDevices
Switches, plugs, doors, locks are all supported - they take an action based on voice commands so make sense to handle.
They're not so good with sensors...  they told me they don't support motion sensors for example.  I map motion and the other digital sensors as contact sensors, and you can ask google if a sensor or door is off/on, or open/closed.
They support a few analog sensor types - I focused on temperature, humidity is easy to add but I haven't done it yet.  If you're not concerned with the units sounding right you can map anything analog into a temperature sensor.  Humidity would probably be good for anything you want reported as percent, so should work for soil.
I'll be doing thermostats soon, but you may need to map in AM as a thermostat so I know how to link them together for control.  But reporting (asking google) should be fine if that's all you need - just pass the temperature sensor, temperature set point, and relay in as separate devices.

sergey

unread,
Nov 26, 2020, 5:21:09 AM11/26/20
to MppDevices
Ok,Mike , thanks that's clear!  

ars...@gmail.com

unread,
Jan 20, 2021, 10:56:31 PM1/20/21
to MppDevices

Boy, have I been out of the loop. Definitely have some catching up to do. I am presently using Google Home that has somehow found some of my devices I did not tell it about. It is a mixed group of Wemo and Tuya (Hallelujah) that I have never organized any way that makes sense. Not to mention the six or so apps I use for all the different devices plus my collection of android stuff to make it even more challenging to figure out why I needed to control something remotely. My antenna relays work very well....which was the original purpose of all this.
I am thrilled to see AM devices will be recognized by Google Home. Am I right about that ? I will program 4 or 5 NodeMcu's just to see them on Google home.
Oh WAIT !!!  There's the learning curve up ahead !!

MikeP 4 MPP

unread,
Jan 21, 2021, 10:17:26 AM1/21/21
to MppDevices
Yep, if you subscribe in AutomationOnDrive the AM devices that you select will be available in Google Assistant (they correct me every time I say "Google Home" for some reason...).
Weird about the other devices, you should have needed to deliberately authorize the wemo and tuya cloud services to connect to your google account (you'll need to do the same for AM too).

sergey

unread,
Jan 22, 2021, 5:07:19 AM1/22/21
to MppDevices
Mike , have you already finished the programming of reading sensors for humidity and temperature  for GA? Does the addition of two parameters going to be  be really difficult task ? I meant a pressure and a dew point?  

MikeP 4 MPP

unread,
Jan 22, 2021, 9:18:58 AM1/22/21
to MppDevices
Temperature is working already.  I haven't added humidity yet but it wouldn't be too hard if anyone needs it.  Dew point I think would map into temperature?  I don't think they have air pressure yet, so I'd need to figure out a way to map it into one of the other analog sensor types.  Any analog type not mapped can be mapped using AoD into temperature though it might sound a bit weird in GA.
In MppDevice/AM you'd map each sensor into separate devices; those would look to GA like separate devices as well.  You can group them together into homes/rooms if you wanted to rejoin them.

sergey

unread,
Jan 25, 2021, 5:44:12 AM1/25/21
to MppDevices
Thanks Mike, sure dew point is the temperature - the question is removed. Humidity and pressure would be very appreciated)  Point is that i decided to split my "Environment device" into two different device. The first is responsible for measuring all stuff with soil , the second measures air environment and tries to predict precipitation. The second device would be also very suitable as common "weather station", because there are quite accurate sensors installed.  I've developed my own set of sensors for this issue. I'm going post about it a bit later. I was so inspired that even  wrote  my own small library for these sensors))
Now the system has build in "time server" on DS3231 and can even predict a snow as precipitation...))) 

MikeP 4 MPP

unread,
Jan 25, 2021, 2:08:26 PM1/25/21
to MppDevices
Sounds pretty cool :).
Beta for AoD just released, supports humidity plus a few other tweaks.  Unfortunately air pressure and other weather station type traits are not supported by google home.

Reply all
Reply to author
Forward
0 new messages