Mycroft - Open Source AI

How to add a skill that tells your the waiting time in any airport?

  1. SSH to your Mark 1 device.
  2. Install the TSA skill using msm.
  3. Add api key you get from https://iatacodes.org (free) to /etc/mycroft/mycroft.conf.
  4. Reboot mycroft processes or restart the device.

Say this:

"Mycroft, what is the tsa wait for SEA?" (or any other airport code)

And you should hear something like:

"The current wait time at Seattle-Tacoma International is 1 minute"

Here is what's going on behind the scenes:

tail -f /var/log/mycroft-skills.log

Skills - DEBUG - {"type": "recognizer_loop:wakeword", "data": {"session": "b4b3b477-0ecc-4441-a444-f04422a2aa3c", "utterance": "my croft"}, "context": null}
Skills - DEBUG - {"type": "Command: mouth.reset", "data": {}, "context": null}
Skills - DEBUG - {"type": "recognizer_loop:utterance", "data": {"lang": "en-US", "session": "b4b3b477-0ecc-4441-a444-f04422a2aa3c", "utterances": ["what is the tsa wait for sea"]}, "context": null}
Skills - DEBUG - {"type": "TsaWaitSkill:WaitTimeIntent", "data": {"confidence": 0.6666666666666666, "target": null, "intent_type": "TsaWaitSkill:WaitTimeIntent", "TsaWaitKeyword": "tsa wait", "Airport": "sea", "utterance": "what is the tsa wait for sea"}, "context": {"target": null}}
tsa-wait-skill__init__ - DEBUG - Airport Code is: sea
tsa-wait-skill__init__ - DEBUG - This is the api key from the function: xxxxxxx-xxxxx-xxxx-xxxx-xxxxxxxxxxxxx
requests.packages.urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): apps.tsa.dhs.gov
requests.packages.urllib3.connectionpool - DEBUG - http://apps.tsa.dhs.gov:80 "GET /MyTSAWebService/GetTSOWaitTimes.ashx?ap=SEA HTTP/1.1" 200 None
requests.packages.urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): iatacodes.org
/usr/local/lib/python2.7/site-packages/requests/packages/urllib3/connectionpool.py:852: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  InsecureRequestWarning)
requests.packages.urllib3.connectionpool - DEBUG - https://iatacodes.org:443 "GET /api/v6/airports?api_key=xxxxxxx-xxxxx-xxxx-xxxx-xxxxxxxxxxxxx HTTP/1.1" 200 None
tsa-wait-skill__init__ - DEBUG - <_sre.SRE_Match object at 0x6b297ee0>
Skills - DEBUG - {"type": "speak", "data": {"expect_response": false, "utterance": "The current wait time at Seattle-Tacoma International is 1 minute"}, "context": null}
Skills - DEBUG - {"type": "recognizer_loop:audio_output_start", "data": {}, "context": null}
Skills - DEBUG - {"type": "Command: mouth.talk", "data": {}, "context": null}
Skills - DEBUG - {"type": "Command: mouth.viseme=4", "data": {}, "context": null}
Skills - DEBUG - {"type": "Command: mouth.viseme=3", "data": {}, "context": null}
<more lines here>
Skills - DEBUG - {"type": "Command: mouth.viseme=3", "data": {}, "context": null}
Skills - DEBUG - {"type": "Command: mouth.viseme=4", "data": {}, "context": null}
Skills - DEBUG - {"type": "enclosure.eyes.blink", "data": {"side": "b"}, "context": null}
Skills - DEBUG - {"type": "recognizer_loop:audio_output_end", "data": {}, "context": null}
Skills - DEBUG - {"type": "Command: eyes.blink=b", "data": {}, "context": null}
Skills - DEBUG - {"type": "Command: mouth.reset", "data": {}, "context": null}