First IOT home project – Bus announcement system

Recently my daughter’s school came up with some fancy application called falcon parent. It basically provides tracking of the school bus and the student’s commute information. The application is quite good. It provides

  • Live tracking of the bus location on a map
  • Send alert once it is near to the boarding point
  • Send alert about the student boarding and alighting

Initially I check the app and alert my family members when the bus is nearby. Engineers in general have a common trait, they come up with the most complicated solution so that they need not do the simple thing (basically laziness). In my case I wanted to automate my work (alerting the family regarding the bus). All solutions (journey) start simple.

Simple Solution

I have tasker for android(the app I don’t regret paying for) & NotificationListener plugin. I did the following

  1. Intercept the notification from falcon app in my phone.
  2. Use Google TTS and speak out the notification.

 

Simple thing worked fine. But it works in my phone and if I leave early to office the alert was of no use to me and my family. Actually during an official interview presentation my phone spoke “Fathima boarded the bus” in full volume.

 

It works only in my phone

I thought the solution should work independent of my phone. Then I remembered my sister’s galaxy note that I spoiled (tried to replace the glass and burnt the display). No one was using it. Everything works but the display was unusable (became black & white). I thought just move the solution to that phone and it works independently. But past always haunt the present solution. It had android 4.1 and notification intercept is not supported. Either I have to root or find another alternative. At last PushBullet came to my rescue. It can intercept pushbullet message and trigger an action in tasker based on a trigger word. The solution became

  1. Intercept the notification from falcon app in my phone.
  2. Send a message to galaxy note via push bullet.
  3. Based on a trigger word the galaxy note will trigger an action.
  4. The action use Google TTS and speak out the notification.

Usability study

I thought everything was fine. I kept pestering my mother, wife & sister regarding the feedback. They said it was ok. But the Google tts announcement was like our railway station announcements. People just understood that the system is trying to tell something and ignored it most of the time. After doing some study and breaking my head, I found that we can identify known music easily even with lot of noise. Now I tweaked the solution like

  1. Intercept the notification from falcon app in my phone.
  2. Send a message to galaxy note via push bullet.
  3. Based on a trigger word the galaxy note will trigger an action.
  4. The action use Google TTS and speak out the notification.
  5. Based on the type of notification play a known music(for eg airtel ad, bond theme music, MI theme music, bus honk)

Sustaining the solution

I thought all is fine the system is working fine. Now on hearing the bus honk my kids hurry and go down to catch the bus. After couple of days I checked and found that the phone switched off due to low charge. Initially I thought of keeping the phone always connected to the power (battery might go off soon) or to save the battery I have to charge it manually. But like I said earlier the laziness kicked in again. I wanted a solution that will charge automatically and also save the battery. Again I had a Kankun sp3 smart plug lying around for some time without any use. That came to my rescue. I did the following to charge the phone

  1. Connect the smart switch to wifi with a static IP.
  2. Installed a REST api inside the smart switch (Thanks to Hackaday) .
  3. Connect the phone charger to smart switch.
  4. Tasker switches the charger ON (using the REST api) when the battery level is <50%.
  5. Tasker switches the charger OFF (using the REST api) when the battery level is 99%.

Now the automated solution is part of our day to day activities. The system just works now. May be some surprise might come in future. Cheers.

–Ferose

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s