Tuesday, November 13, 2018

...I fixed an Issue Where IFTTT Couldn't See the Name of The WiFI Network My Phone was Connecting to

I've entered the IoT world and bought my first smart bulb. Nothing fancy, just cheap. Something to play with. I'd the bright idea (pun absolutely intended) of turning on a light to the rear of the house as soon as my wife's (android) phone connected to our home's WiFi network.

IFTTT is usually a good option for this and I'd tested its "Android Device" services trigger - "Connects to a specific WiFi network" with good results. An integration with the "Smart Life" service allowed me to turn the light on once the trigger had been activated.

This was all well and good on my own phone, but when it came to my wife's, the simple applet refused to do what it said on the tin.

I debugged by creating a simple Applet which used the same trigger, but instead of turning the light on it sent a system notification from the IFTTT with a simple message "Connected to $SSID_NAME". In the case of my own phone, $SSID_NAME resolved to the name of our network, however on my wife's it displayed "unknown ssid". Because of this, the "specific WiFi network" name was never matched.

Strange.

The applets were identical. I'd not done anything differently when installing IFTTT and the Smart Life apps on our phones. No extra permissions, nothing.

A spate of googling later, brought me to the realisation that my wife's IFTTT app needed the "Location" permission in order to see the WiFi network's name. I'd been messing around with random IFTTT services on my own phone. These included location service, which had of course prompted me to grant the Location permission.

Once I'd manually granted IFTTT the location permission through the system app settings, my wife's phone was able to turn on the light as soon as she'd arrived home.

4 comments:

  1. Hi, many thanks for your advice. Helps me a lot to get the SSID in the IFTTT app.

    ReplyDelete
  2. Hello, had the same problem and your solution helped.Thanks

    ReplyDelete
  3. is there a way around needing location turned on? if there isnt then i might as well turn things on with a geo fence rather than connecting or disconnecting from a wifi signal which is what i would rather do.

    ReplyDelete