Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/somada141/yarratramwatcher
This script uses the TramTracker SOAP API to check the arrival times for a given tram number and stop ID and fires an IFTTT Maker event if the upcoming arrivals are within given thresholds
https://github.com/somada141/yarratramwatcher
api australia ifttt ifttt-maker melbourne python soap suds tramsmitter xml yarra-trams
Last synced: 25 days ago
JSON representation
This script uses the TramTracker SOAP API to check the arrival times for a given tram number and stop ID and fires an IFTTT Maker event if the upcoming arrivals are within given thresholds
- Host: GitHub
- URL: https://github.com/somada141/yarratramwatcher
- Owner: somada141
- Created: 2017-07-02T05:23:29.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-07-02T05:28:06.000Z (over 7 years ago)
- Last Synced: 2024-11-18T08:30:11.516Z (3 months ago)
- Topics: api, australia, ifttt, ifttt-maker, melbourne, python, soap, suds, tramsmitter, xml, yarra-trams
- Language: Python
- Size: 4.88 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# yarratramwatcher
This script uses the TramTracker SOAP API to check the arrival times for a given tram number and stop ID and fires an IFTTT Maker event if the upcoming arrivals are within given thresholds.
## Usage
This script is meant to be run in an minutely basis over given period of times, e.g., via Cron, as such:
python tramwatcher.py --stop-tracker-id 3551 --route-number 86 --threshold-min-lower 4 --threshold-min-upper 6 --ifttt-event --ifttt-key
The above call will check for the arrivals of tram 86 at stop 3551 and if there is an upcoming arrival within 4-6 minutes fires an `ifttt-event-name` IFTTT Maker event using their API key `ifttt-key`.
> Note: The tram stop number is the one that appears in the TramTracker app, note the numbers used within the YarraTrams physical network.
## References
- API Docs: [http://ws.tramtracker.com.au/pidsservice/pids.asmx](http://ws.tramtracker.com.au/pidsservice/pids.asmx)
- Schema: [http://ws.tramtracker.com.au/pidsservice/pids.asmx?WSDL](http://ws.tramtracker.com.au/pidsservice/pids.asmx?WSDL)
- SOAP API Usage Example: [https://citycontrolpanel.com/api/example_scripts?l=PYTHON&fi=0](https://citycontrolpanel.com/api/example_scripts?l=PYTHON&fi=0).