Nearly Home Sms

Summary

I commute via train each day. My wife kindly picks me up from the station when I get home, but I can take one of two different lines, and thus arrive at two different stations. Additionally, the time I will get home varies drastically each day in no set pattern.

Thus, I created this set of profiles, which automatically send an SMS message when I'm nearing a destination, and when I get home, additionally informing me that I've arrived at my station in case I'm deep in a book and haven't noticed.

It uses a series of cell near profiles to set several variables, the combination of which triggers the SMS's. This prevents accidental triggering, and thus spurious messages.

Details

I use one profile to detect my homeward journey, with the following states:

  • Cell Near - Picked for a station I always start my journey from, regardless of route home.
  • Day of Week - Only week days
  • Time - After 1pm

This profile sets an %ON_TRAIN variable, to indicate to other profiles I have begun my long journey home. It also clears the %DESTINATION variable, just in case there's something left over from the day before.

Then, there are two more location profiles, one for each of my routes:

  • Cell Near
  • Variable %ON_TRAIN is set

Both of these set the variable %DESTINATION to the station I will be getting off at, for the current line I'm on.
If you only have one route home, then obviously you only need one of these profiles, and you can probably merge this and the following profile together.

The "Destination" profile is triggered as follows:

  • Variable %ON_TRAIN set
  • Variable %DESTINATION set

This then sends the "I'll be home soon" SMS, with the current time, and the value of %DESTINATION, so my long-suffering wife knows where to collect me from.

There's two more profiles for each of the stations I get off at. Both of these simply set the variable %STATION to whichever station I'm at, again based on cell near.

Finally:

  • Variable %STATION matches %DESTINATION
  • Variable %ON_TRAIN is set

This then sends a second SMS to say I have arrived at the station, and uses the say task to tell me which station I'm at over the media audio channel so I don't sail happily past my stop (it happens. Often). It then clears the %DESTINATION and %ON_TRAIN variables so that everything's ready to start over afresh the next day.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License