AutomationOnDrive
Once AutomationOnDrive is running, log into your google account to reach the AoD remote web page for your home. Note this script runs under your id and authorization. The first time you use the script you will need to authorize it to access your Drive account. You can bookmark the site but it may occasionally be moved (at google's whim).
Add AutomationOnDrive (free, android only, see Running MPP Servers/Hubs) to your AutomationManager/AutomationServer to use your Google Drive account as a cloud server for remote access and for logging device state changes. Your Drive account is owned by you - you control access with no vendor in the way. This is the easiest of the AutomationManager/AM Remote access methods.
Now works with Google Home! Use AutomationOnDrive to publish your AM Server managed devices to Google Assistant for use with voice and Google Home. See the instructions below.
AutomationOnDrive provides for use of your AutomationManager hosted devices through Google Home enabling voice control and remote access. There is a small subscription fee to offset the cost of hosting the integration server on the Google cloud. Privacy for AM/AoD is preserved by persisting only the anonymous tokens needed to link users and devices to their AoD server, no other personal information is retained. See the "Google Home" menu in the AoD app.
Why would I want to use AutomationOnDrive?
It's the easiest way to set up remote access
Your device state changes can be logged to a Drive Sheet (like a spreadsheet) which you can examine or even add formulas for graphing on times, power use, etc.
It comes with a web page allowing you to control your devices from any web browser (including from a MAC or iPhone).
Google via your google account provides security access and control
You can register your phone for access remotely, you don't need to be present at the server (handy if you lose your phone while travelling).
You can enable/authorize or revoke other users to access your devices, again without being present at the AutomationServer.
You can even build your own web pages to customize your views.
To set up remote access:
When you're finished with the following steps your dedicated AutomationServer tablet/phone will be set up like this:
It will be always on, always connected to your Wifi
AutomationManager / AutomationServer installed
AutomationServer widget added to any home page, activating the server
(optional) the HTTP, REST, and GCM services disabled
AutomationOnDrive installed
Each of your client android devices will be set up with:
Automation Manager / AutomationManager installed
AutomationServer widget NOT added to any home page
AutomationOnDrive NOT installed
Use AutomationManager and the AutomationDevice or AutomationSwitch widgets when you ARE at home.
AutomationManager preferences set to "only on wifi" and listing your home SSIDs to keep it from running when you're away
Use the AM Remote app or the AM Remote widgets when you're NOT at home
Select an (always on, always local) android device to be your rules and remote server. Remember this device must remain on and connected to the same network as your devices to provide remote access.
Activate the AutomationServer
If this is a dedicated phone/tablet be sure to activate "always on while charging" in android settings "Developer Options". If "Developer Options" is not available, go to "settings>About>Software Information>Build Number" (sometimes it's under "more"). Tap "Build Number" seven times to enable it.
Check your advanced wifi settings to confirm wifi will not be turned off to save power. If you have a task killer on your device add the AutomationServer (and AutomationOnDrive if you're using it) to the list of exceptions.
On some android devices you may need to set the screen to stay on at all times.
Start the AutomationServer by adding the AutomationServer widget to one of your home screens of the android you're planning to use as the SERVER. To add the AutomationServer widget either long press your home screen and select "widgets" or open your "all apps" view and touch the "widgets" folder at the top (which depends on your version of android). Scroll to AutomationManager, select one of the AutomationServer widgets (the smallest is usually the best) and drag it to your home screen.
If you're using AutomationOnDrive you don't need the Remote, Rest, Http and GCM services in AutomationServer preferences so if you've enabled them previously they can be disabled.
Install AutomationOnDrive ONLY on the same android device where you're running the AutomationServer. Start it up and configure it with your google account and the name you want to use for this location (the default is fine). Each separate installation of the AutomationServer/AutomationOnDrive combination needs a different location name. Once its running you'll find a status file with this location name in your online Google Drive account. The web (google) side of the application is published under the id troglite.too@gmail.com so you should accept any permission requests to access the OnDrive files.
Check settings / device maintenance / battery manager, settings / app manager ./ special access / Optimize battery use. Confirm the app is set to unmonitored for battery savings.
Install AutomationManager on the phone you wish to use for remote access of your devices. Open the AM Remote app (included free in the package).
Use the "+" or "add server" menu item to create a new OnDrive server definition.
Use any memorable name for the Server Name
Leave the default client name or use one that you will remember (the client name is not used for AutomationOnDrive).
Set the Location Name to the name you assigned in AutomationOnDrive (the default is "home").
Touch the "register" button on the AM Remote menu and it will attempt to register with the AutomationServer. Select the same Google account as you used to register the AutomationOnDrive server. Accept any permissions needed, the web (google) side of the application is published under the id troglite.too@gmail.com.
Your AM Remote connection is now ready to use anywhere you have internet access. Security and encryption is provided by your Google account and Google Drive.
Once the AM Remote is enabled you can use the AM Remote widgets on your home screen.
To use with Google Assistant / Google Home:
Install AutomationManager to run as a server.
Setup AutomationOnDrive (AoD) as above.
Confirm AutomationOnDrive is running properly with your google account and location name.
Make sure the subscription has been created and accepted by AutomationOnDrive
You can cancel the subscription at any time using Google Play.
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, a sensor into a door sensor, etc.
Install and open Google Home
Use the "+" button (top left) to add a device.
Select "+ Set up device"
Under "Works with Google" select "Have something already set up?"
The service list is alphabetic - scroll or search for Automation Manager, you'll see the AM icon. Select it.
A web page opens that shows the AoD locations on your Google Drive account (you can have multiple homes)
Select 1 or more of the locations you want to use with Google Home.
Touch the "Link to Home" button.
You should be taken back to Google Home.
If you have multiple homes defined in Google Home, wait a few seconds for the list of new devices to come up to assign devices to your homes and rooms.
Return to the Google Home main page to assign your devices to 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 reasonably plain and understandable 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 in that room.
I don't have a spare tablet!
As mentioned above, there are a number of alternatives. Probably the easiest is to pick up a low cost android phone from Walmart or BestBuy (see: Running MPP Servers).
How do I log onto Google Drive?
Use a web browser to visit Google Drive and log in using your google account.
Use the android Drive app, again using your google account.
How do I see and control my devices from a web browser?
Open and bookmark the link at the top of this page, logging into your own google account. This is your own web page, it can be shared via google with other users if needed. The web (google) side of the application is published under the id troglite.too@gmail.com.
How do I use my own custom images?
Create a Google Sheet with the name "mpp_images" in a folder "wemo", e.g. wemo/mpp_images
For each UDN with a custom image add a row:
column A: the UDN of the device (use the AM menu to open "Intents" and the UDN button to copy it to the clipboard)
column B: a URL to the image
To use images from your google drive account, upload the image file to your google drive. Find the image in your account, copy the link web link from the "Get Link" popup.
How do I create my own CUSTOM web page?
Check out ReadMe.html here: AutomationRemoteSample. Using this you create your own Google App Scripts project that you own and control, and can share or sell to other users.
How do I setup up automation through AM Remote?
You can use the Event Devices (add an OnEvents trigger to your rules) to fire events while you're remote and add them to your phone home screen as remote event widgets.
Another option is to use Tasker or Automagic to trigger AM Remote intents. See HowTo for more details.
What are the security best practices for AutomationOnDrive?
For maximum security you'll want to use a dedicated account for AutomationOnDrive. This will allow you to add and remove access as needed.
Install AutomationOnDrive and when asked to choose an account, create a new one (you can use "logout" from the menu of AutomationOnDrive to start over).
Once AutomationOnDrive is running, log into that new account with a web browser. Find the status file and use the "share" option to share the file with any of your other google accounts. Use "Can Comment" mode.
To revoke access (for example if you lose your phone) you return to this master account to remove the user from the list of accounts with which you've shared the status file.
To allow a user read only access to the devices, share the status file in "Can View" mode.
I keep getting error 403 in AM Remote when I try to access my devices remotely!
Older versions of AM Remote, especially if you are using AM Remote widgets would poll your Drive account too often and google may lock them out. This should no longer be the case.
The easiest way to fix this is:
Log into your Drive account
Find the status file for that location and delete it.
Log into AutomationOnDrive and choose "restart" from the menu. This will recreate the status file.
Start AM Remote, find the server, and use "register".
I'm getting a 401 error when I try to access AM Remote!
Permissions to access Drive from
AM Remote may have changed. To work around this, you can go to your online
AM Remote account: AM Remote, refresh the page and then accept the permissions.
You may need to re-register in
AM Remote.
I'm getting "UserRecoverableAuthAction" in my AutomationOnDrive log!
AutomationOnDrive has been logged out of Google. Use menu>Logout, then log in with the account you wish to use. Accept the permissions listed.
If the problem continues,
If the problem persists its likely that Google has updated the permissions required to run this application and you need to completely reauthorize:
Use a web browser to visit Google Drive and log in using your google account.
On the top right you should see a "gear" icon. Click it to open your drive settings.
Select "Managing Apps"
Find AutomationOnDrive in the list, option "options" and select "Disconnect From Drive"
Open AutomationOnDrive and use menu>Logout as above.
Use a browser to open AM Remote, logging into your own google account and accepting the permissions.
Open AM Remote and re-register, again accepting the permissions.
My "location.log" file on Drive (the AutomationOnDrive event log) is no longer updating. It's very big.
Drive limits the size of these Sheet files. Open
AutomationOnDrive, and use "menu>Archive Events Now" which will copy the current log into a dated backup file and start a new event log Sheet. You may want to change the "archive period" in the AutomationOnDrive preferences to keep this from re-occurring. You can also archive events from your AM Remote web page.
My AutomationOnDrive service stops running occasionally!
Android will occasionally stop the AutomationOnDrive service if AoD is not excluded from all of the power saving / task management options. It may also stop AoD if it's running low on resources (depending on the other running apps).
Adding the AutomationOnDrive widget (not the app shortcut!) to one of your home pages will allow android to restart AoD within 30 minutes in this case.
My AutomationOnDrive isn't working, what do I do?
Confirm your AutomationServer is operating correctly - the AutomationServer widget has been added to the same phone where you're running AutomationOnDrive and is showing the correct count for your devices, they're all running (the indicator should be green). If not, return to the AutomationServer setup instructions above.
Open a web browser to your drive account (Google Drive)
Log in with your google id (the same one you used with AutomationOnDrive). You may need to log out of your main google account first.
Confirm you can see your location file (default home, or you may have renamed it when you started AutomationOnDrive).
Single click on the location file to view the edit history. This will show status updates by AutomationOnDrive, and any commands submitted from AM Remote.
Open AutomationOnDrive on your server device and have a look at the log for any errors.
Typical errors are problems with id and authorization.
Use menu>logout and re-select the correct account
Use menu>restart to get things going again
Open AM Remote on your phone. Use "edit server" to confirm the google account and location name both match AutomationOnDrive. If there is any doubt edit the server name and re-register.
Observe the timestamp at the top; this is represents the last time AutomationOnDrive updated status to the location file.
Pick one of the devices and confirm the AM Remote state agrees with the actual device state.
Manually change a device state - click the on/off button.
Check the AutomationOnDrive log, confirm the state change was seen by AutomationOnDrive and the status was updated (sent) to google Drive.
Troubleshoot authorization errors as earlier.
If the event isn't seen by AutomationOnDrive, this means it's not being seen by your AutomationServer. Check that section for help.
Look at the browser, confirm the location file was updated (timestamp has changed, edit record visible in details). If it's not, there may be a mismatch between the location or account names in AutomationOnDrive.
Touch refresh in AM Remote, confirm the timestamp has been changed to the new value.
If not, double check the google account and location names used.
To repair the location, type the correct location (file name) in the server definition.
To repair the account, use menu>Register
Have a look at the device in the list to confirm it now reflects the new state.
Visit Your AutomationOnDrive web page to confirm you can manage your devices from there.
To reset your permissions and start over:
Use a web browser to visit Google Drive and log in again.
Click on the "gear" icon on the top right, then "settings" and select "manage apps". Find AutomationOnDrive and remove it from the permitted applications.
Open AutomationOnDrive and use menu>logout.
Open AM Remote and click "register", then exit the app.
The next time you use the web app, AutomationOnDrive, or AM Remote you'll be asked to re-authorize AutomationOnDrive.
On later androids there can be a "screen overlay detected" error when AutomationOnDrive or AM Remote/OnDrive requests access permissions. This link may help: https://www.androidpit.com/how-to-fix-screen-overlay-detected-error.