Hi everyone:
I'm new to VoxCommando, so apologies if this request comes across as basic. But I need your help. I've not been able to find an implementation that I can adapt, so I'm posting here for help. Any kind of assistance would be appreciated.
I'm trying to voxcommando to provide me with ETA updates of the streetcar and if possible provide two reminders based on the results returned. So, for example, I'd like to be able to say something like "Westbound Queen Streetcar" or "Eastbound Dundas Streetcar" and voxcommando retrieves the estimated arrival times of the next two street cars from
http://www.nextbus.com.
From
www.nextubs.com, each streetcar and stop has a custom url. For example, in "
http://www.nextbus.com/#!/ttc/501/501_1_501Sun/1958" it's "
http://www.nextbus.com/#!/ttc/"STREETCAR LINE"/"DIRECTION"/"STOP". I noticed that the nextbus embeds the next two street car ETAs in the page title. Therefore, after watching a few tutorials online, I was able to scrape for ETAs and get voxcommando to read them out loud. I then made 4 separate commands (each with a unique url for the 4 possible streetcar lines and directions I needed ETAs for). Unfortunately, I noticed that the results returned didn't correspond with the updates for the desired streetcar lines and corresponding stops (i.e., voxcommando seemed to be scrapping from the same url, even though for each direction, I entered unique urls). I don't know what streetcar results it's returning. Should I have scraped elsewhere other than the title? I'm attaching the xml that I created.
1. Is there a streamlined way of doing this? I want to be able to have at least 4 unique results (2 street car lines, headed in 2 directions). I experimented with a payload list but didn't know what I was doing. For example, I thought I could just ask "Give me a street car status for" and then have voxcommando for for me to dictate a line and direction like "Westbound Queen" or "Eastbound Queen" or "Westbound Dundas" etc.
2. It takes me about 7 minutes to get from my house to the stops I've requested. At the end of every "streetcar status" inquiry where voxcommando returns at least one value greater than ten minutes, can voxcommando ask if I would like a reminder? If I respond "yes" then, it will set and announce reminders 10 and 7 minutes before the streetcar arrives.
For example, I ask voxcommando for the street car status and tell it for which line and direction. It tells me 12 and 15 minutes. Since at least one number is higher than 10 minutes, it then asks me if I would like a reminder. If I confirm "yes" for reminder, it sets the reminders, using the lower number of results returned that is greater than 10. (For instance, if the results returned were 3 minutes and 11 minutes the reminder would be based on 11 minutes). At 10 minutes away (i.e., 2 minutes after the result of 12 minutes was retrieved), voxcommando would speak "Westbound Queen Streetcar in 10 minutes" and at 7 minutes away (i.e., 5 minutes after the result of 12 minutes was retrieved) voxcommando would speak "Westbound Queen Streetcar in 7 minutes. Leave Now. Leave Now."
The general format is something like "2 min" and "9 min" and also "Due" or "Arriving" along with the direction.
Here are the directions and stops I'm interested in:
http://www.nextbus.com/#!/ttc/501/501_1_501Sun/1958 - Queen Westbound
http://www.nextbus.com/#!/ttc/501/501_0_501Sun/2666 - Queen Eastbound
http://www.nextbus.com/#!/ttc/505/505_1_505Sun/8606 - Dundas Westbound
http://www.nextbus.com/#!/ttc/505/505_0_505Sun/8159 - Dundas Eastboud
Any assistance would be appreciated.