Automator.app Tip: Troubleshooting 3G/WLAN Connections

Today’s Tip:

Automator works fine locally (wifi) but will not connect through 3G.

This sounds too simple, but by far the #1 cause of this is the mios username and password are not correctly entered. Some assume they did enter it correctly because things work locally, but the reality is that these credentials aren’t used when directly connecting.

So if you are sure that you have correctly entered your mios username and password (and in the correct case) within Automator.app. Now let’s do some troubleshooting. The following steps will walk you through the same process used by Automator.app to discover and connect to your remote systems.

While you may perform the following from a computer over wifi, to correctly diagnose a 3G / remote related issues you should perform the following steps through Safari on your iPhone / iPad.

The following steps use the terms , , and <IP_ADDRESS> to refer to the mios username, mios password, and the ip address of your vera unit. Substitute the values accordingly. Use and exactly as you entered them into Automator.app.

Step 1: Verify The Device is Discoverable

The first step involves loading a mios service that will show all the vera systems associated with your username. Again, please do this over 3G to properly diagnose the issue.

In Safari on the iPhone/iPad, enter the following URL:

http://sta1.mios.com/locator_json.php?username=<USERNAME>

You should get back some JSON (javascript notation of a data structure) that lists your vera unit. To make it easier to read I have copied (and obfuscated for security purposes) the JSON retrieved for me with http://jsonlint.com/

{
    "units": [
        {
            "serialNumber": "12345",
            "FirmwareVersion": "1.5.322",
            "name": "VeraLite",
            "users": [
                "USER_A",
                "USER_B",
                "USER_C"
            ],
            "active_server": "fwd1.mios.com",
            "forwardServers": [
                {
                    "hostName": "fwd1.mios.com",
                    "primary": true
                },
                {
                    "hostName": "fwd2.mios.com",
                    "primary": false
                }
            ]
        }
    ]
}

So the first thing to verify is that your vera unit is returned in the listing. If the listing is not there then your vera unit is not authorized to be accessed by the mios username, , you provided. Create, if necessary, the mios username or authorize the user if it is already created to access your system.

Step 2: Check The Connection

For this step we will use information from the JSON, above, to construct a URL to test the remote connection. We will need the and entered into Automator.app and the serial number that is listed next to the entry “serialNumber”. In the case of the json above the serial number would be “12345” (without the quotes). We will also need to know which of the forward servers is active. This is the value listed next to “active_server” and will either be “fwd1.mios.com” or “fwd2.mios.com”. In the case above it is “fwd1.mios.com”. We call this value <FWD_SERVER>

So, now, use this information to construct the following URL in Safari:

https://<FWD_SERVER>/<USERNAME>/<PASSWORD>/<SERIAL_NUMBER>/data_request?id=lu_alive

So, if the forward server is “fwd1.mios.com” and my mios username entered in Automator.app is “fakeuser” and my password was “fakepassword” and my serial number was “12345”, the URL would be

https://fwd1.mios.com/fakeuser/fakepassword/12345/data_request?id=lu_alive

The service should return “OK”. If any of the parameters are wrong you will receive Invalid User/Pass and then probably be redirected to a login screen. Make sure that the values you entered are correct, and they are correctly entered in Automator.app.

If you get a blank result back make sure you entered the correct forward server as denoted as the “active_server” in the JSON. If it is correct try using the other server (e.g. use fwd2.mios.com if it stated the fwd1.mios.com is the active server). If that worked open a support ticket with MCV and let them know their discovery service is not handling the active server identification properly. That said, Automator.app should actually handle this situation.

What this request does is actually use the mios forwarding service to contact directly to your vera unit, and it is actually your vera unit that returns the OK.

If you do not receive OK and you have entered all the information correctly as outlined below the connection issue is a problem with MCV’s forwarding service. Reboot your vera unit and if that does not resolve it open a ticket with MCV.

If you do get OK, and have made sure that the username and password used to test this above is the same as that entered in Automator.app, then the issue is most likely a problem with Automator.app and you should contact me for additional support.

Side Note: Connecting Locally

So you may be wondering why, if you entered an incorrect password, that Automator.app is able to directly connect to your unit. Well, if the request to the sta1.mios.com locator service originates from the same IP address (internet IP, e.g. outside your local network) as vera box, then the locator service will include in the JSON the IP address of the vera unit. Automator.app will use this to directly connect to your unit.

Second Side Note: Why is my password in the URL?!?!?

While this may seem disconcerting, keep in mind that Automator.app is connecting to the forward servers using the SSL (https) protocol. This means that the entire request between Automator.app and the mios.com server is encrypted, including the part containing the requested URL. Your password, and entire session for that matter, is encrypted and safe from prying eyes.