Public Transport Victoria (Australia) has multiple modes of transport i.e. Train, Tram, Bus, VLine and Night Bus. User needs to know nearby stops, next departures on real time basis, facilities at the stop and routes for different modes of transports. This skill provides an integrated solution to address this requirements.
What it does
Alexa skill “Victoria trans info” provides various information about routes, stops, departures and nearby stops for Public Transport Victoria (PTV) link , Australia. Main objective of the skill is to get latest and up to date information using public API provided by the PTV for the developers. All the information is taken is using the API of PTV.
Launch skill using:
"Alexa, open Victoria Trans Info"
"Alexa, ask Victoria Trans Info to find routes"
"Alexa, ask Victoria Trans Info to search nearby stops"
Following are the main features:
(i) Get Transport Modes
To find all modes of transport. e.g. Train, Bus, Tram, VLine, Night Bus Sample Utterance: "get transport modes"
(ii) Get Routes
To get list of routes for a mode of transport. User has to provide name of mode Sample Utterance: "get routes ", "find routes for train",
(iii) Get Stops
To get list stops for a route and for a mode of transport. User provides mode and route name Sample Utterance: “get stops" “get train stops
(iv) Get Departures
To get next 5 departures from a stop. User has to provide name of stop and mode Sample Utterance: "get train departures", "get departures"
(v) Get Stop Info
To get information about facilities of a stop. Provide name of the stop Sample Utterance: "get stop info" "get stop info for Alamein,
(vi) Search Nearby Stops
Search stops nearby to the device address provided. Needs permission to read the address from the device. After reading the device address, it is converted into geocodes ( Lattitude and Longitude) using Google geolocation API and then using the geolocation nearby stops are identified using PTV API i Sample Utterance: "search nearby stops" "search stops near me",
Provides help to use the skill features. Sample Utterance: _"Help", _
(viii) Go Home
Take user to the home location. This helps to the users who are using display devices. Sample Utterance: _"Go Home", _ .
How I built it
- Used Alexa SDK for python ask-sdk and python 3.6.
- I have used APL to provide display interface for the user.
- Used 'TouchWrapper' for selecting the items on the Route Lists and Stop Lists. All information is displayed using APL.
- Used Google geolocation API for converting address into gecodes ( Lat, Long) since PTV API takes geocode to find nearby stops
- Used dynamoDB Table to store the latest data on launching the skill to avoid repetitive calls to PTV API
Challenges I ran into
Finding the correct size , padding, and Template to display the text for route names stops names atc. Main challenge was to accommodate the text on Eco Show. Testing of API for nearby was difficult since I am outside of Australia.
Accomplishments that I'm proud of
providing dynamic info for Alexa skill , Finding nearby stops using geocodes and PTV API
What I learned
learned APL , Google geolocation API,
What's next for Victoria Trans Info
- To add more parameters in the information,
- To add location service to provide support for moving devices ( Smart watch , mobile etc.)