https://github.com/platisd/vasttrafik-google-assistant
Make your Google Assistant talk to Västtrafik
https://github.com/platisd/vasttrafik-google-assistant
flask google-actions google-assistant python rest-api vasttrafik
Last synced: 12 months ago
JSON representation
Make your Google Assistant talk to Västtrafik
- Host: GitHub
- URL: https://github.com/platisd/vasttrafik-google-assistant
- Owner: platisd
- License: mit
- Created: 2018-07-12T22:33:41.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2019-04-10T20:37:52.000Z (about 7 years ago)
- Last Synced: 2025-04-10T01:15:08.049Z (about 1 year ago)
- Topics: flask, google-actions, google-assistant, python, rest-api, vasttrafik
- Language: Python
- Size: 19.5 KB
- Stars: 8
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# VasttraPi on Google Assistant
A simple Python web server, in Flask, which is interfaced with an Action on Google Assistant. The server reuses code from [VasttraPi](https://github.com/platisd/vasttraPi) to communicate with Västtrafik so to fetch the latest departures for the selected stations.
Read more about the project [here](https://platis.solutions/blog/2018/07/15/custom-actions-for-google-assistant/).

## Get started
If you want a custom Google Action that talks to a sample Python server, then please follow this [Instructable](https://www.instructables.com/id/Create-Custom-Actions-for-Google-Assistant/).
To set up a REST server that retrieves departures from Västtrafik:
* Install PyTrafik
* `git clone https://github.com/axelniklasson/PyTrafik.git`
* `sudo pip3 install PyTrafik/`
* Create an `api-config` file in the root folder of this repository with your [Västtrafik API tokens](https://developer.vasttrafik.se/portal/#/applications)
* Edit `bus_assistant.py` by providing your business logic (e.g. stations of interest)
* Run `bus_assistant.py`
* `python3 bus_assistant.py`
## Media
* [Demo video](https://www.youtube.com/watch?v=Qh_gcRqFTzE)
* [Article on platis.solutions](https://platis.solutions/blog/2018/07/15/custom-actions-for-google-assistant/)
* [Tutorial on Instructables](https://www.instructables.com/id/Create-Custom-Actions-for-Google-Assistant/)