Currently Alexa comes with a built-in google calender. If you're devoted to privacy principles and running your own CalDav-Server such as Baikal, but still go along with latest technology trends, you may not come around the amazon Alexa natural language assistent. This skill gives you the opportunity to easily host your own CalDav skill, e.g. using Nginx on a Raspberry Pi, to make your Calendar transparently accessible for Alexa.
This skill uses Flask-Ask, a Python micro-framework that simplifies developing Alexa skills. Great work John Wheeler! With a little knowledge of Python and Flask it is very simple to extend.
If you haven't setup your own CalDAV server, I recommend looking at Jan Karres' Blog.
Note:
- If you're not confident using Nginx see the beginners guide!
- In order to be able to interact with Amazon Alexa, your endpoint either has to provide a certificate from a trusted certificate authority or you have to upload a self-signed certificate in X.509 format.
- Add the following entry to your Nginx configuration (you may find it at /etc/nginx/sites-available/default):
location /calexa {
rewrite ^/calexa/?(.*)$ /$1 break;
proxy_pass https://localhost:5000;
client_max_body_size 0;
proxy_connect_timeout 36000s;
proxy_read_timeout 36000s;
proxy_send_timeout 36000s;
}
-
Restart Nginx.
-
Start the CALexa skill as well:
python /yourpathtocalexa/calexa.py
Your service will now be available via https://yourdomain/calexa/
The configuration process is straigt forward, as known by other skills.
Copy the content of the Intent Schema file to the Intent Schema field of the Interaction Model tab while using the Alexa Skills Kit for configuration.
Add all Custom Slot Types defined by the files you can find in the Custom Slot Types directory, e.g.:
Enter Type
LIST_OF_CALENDAR_SYNONYMS
Enter Values
Kalender
Terminplaner
Agenda
Copy the content of the Sample Utterance file to the Sample Utterances field of the Interaction Model tab while using the Alexa Skills Kit for configuration.
User->Alexa: Alexa, was ist heute auf dem Kalender?
Note right of Alexa: Alexa does NLP
Alexa--> Skill: GetTodayEventsIntent
Note right of Skill: Skill accesses CalDAV server
Skill-->Alexa: String(Es sind folgende Termine auf dem Kalender ...)
Note right of Alexa: Alexa synthesises NL from string
Alexa-->User: Es sind folgende Termine auf dem Kalender ...