The Calendar skill

The Calendar Skill

Use Mycroft to access local .ics files, or access CalDAV servers!

Github Repo

How to install the calendar skill

  • Install calendar skill by …

    • msm install https://github.com/LinusS1/calendar-skill.git
    • This should install the skill using the requirements.sh and requirements.txt. If it doesn’t do this THE TEST FAILED.
  • The calendar skill connects to a CalDAV server, or just a local ics file …

    • If you use a CalDAV server, login using mycroft home!
    • If you don’t have a server, just use the skill as is

How to test Calendar Skill

  • Speak Add an event
  • Mycroft should add an event to your calendar
  • Speak 'What’s on my calendar`
  • Mycroft should tell you what’s on your calendar
  • Speak How many events do I have
  • Mycroft should tell you how many events you have on the specified day

You should also be able to specify dates/times in your requests as well: what's on my calendar tomorrow?

Try using some of the utterances on the specification page, as those should be supported (mostly).

Feedback

I need tons of feedback, mostly if it adjusts to your timezone, if the interactions seem normal, if the skill is easy to use, if it works with major CalDAV servers etc…

Post feedback here, on the chat, or issues on GitHub

3 Likes

I attempted to install this skill on Picroft running version 19.02 release 4. After waiting 5+ minutes at this prompt:
INFO - Successfully ran requirements.sh for calendar-skill
INFO - Installing system requirements…
INFO - Installing requirements.txt for calendar-skill

I interrupted it with Control-C.

It returned this:

^CTraceback (most recent call last):
File “/home/pi/mycroft-core/.venv/bin/msm”, line 11, in
sys.exit(main())
File “/home/pi/mycroft-core/.venv/lib/python3.5/site-packages/msm/main.py”, line 121, in main
result = main_functionsargs.action
File “/home/pi/mycroft-core/.venv/lib/python3.5/site-packages/msm/main.py”, line 101, in
args.constraints, ‘cli’),
File “/home/pi/mycroft-core/.venv/lib/python3.5/site-packages/msm/mycroft_skills_manager.py”, line 53, in func_wrapper
ret = func(self, *args, **kwargs)
File “/home/pi/mycroft-core/.venv/lib/python3.5/site-packages/msm/mycroft_skills_manager.py”, line 179, in install
skill.install(constraints)
File “/home/pi/mycroft-core/.venv/lib/python3.5/site-packages/msm/skill_entry.py”, line 81, in wrapper
func(self, *args, **kwargs)
File “/home/pi/mycroft-core/.venv/lib/python3.5/site-packages/msm/skill_entry.py”, line 400, in install
self.run_pip(constraints)
File “/home/pi/mycroft-core/.venv/lib/python3.5/site-packages/msm/skill_entry.py”, line 231, in run_pip
pip_code = proc.wait()
File “/usr/lib/python3.5/subprocess.py”, line 1389, in wait
(pid, sts) = self._try_wait(0)
File “/usr/lib/python3.5/subprocess.py”, line 1339, in _try_wait
(pid, sts) = os.waitpid(self.pid, wait_flags)
KeyboardInterrupt

Now after several reboots, Mycroft usually just responds with “Please wait a moment as I finish booting up.” It will however update the volume on command, but that seems to be the only one it responds to.

Trying to recover at this point.

UPDATE: after wiping the .skills-repo/ as mentioned in another topic, I was able to reboot and the calendar-skill was present and working.
I was able to add an event. A couple of issues/learning items: 1) It didn’t ask for a time and set the time for 4 AM. How is the time to be set? 2) I created a calendar-skill folder in .mycroft, but now see that there is one created for calendar-skill.linuss1.

Unfortunately I see the similar behaviour as @gadgetguy described above. I tried to install the skill on a Mark-I and PiCroft (Jessie). There seems to be some problem with “lxml”, but I didn’t have to the time to investigate this in more depth…

Hi @gadgetguy and @Dominik, lxml takes a pretty long time to install, so just wait for it. I’m looking for ways to reduce it but haven’t found a good solution yet.

Specifically for @gadgetguy:

  1. You can set the time by saying something like: Hey Mycroft add an event called bob's birthday today at 4 pm. However, what I’m find odd is that the skill sets a default time value of midnight when no time is provided. Could you tell me whether you’re using a CalDAV server or a local .ics file? Also could you try creating a new event, then upload your skills.log - The calendar skill logs when an event is create.
  2. Thanks for catching this hole in my documentation! You should use the calendar-skill.linuss1. I’ve also updated the documentation.

Had some issues getting Mycroft going today. At one point I asked if I had any appointments today and it responded with “is that on the Japanese time zone?”. When i said “no” it told me I had no appointments. When I tried to add an event, it didn’t understand. After several reboots, it would finally listen and respond to me, but it seems to have lost the calendar skill.
I will attempt to re-install.

I was using a .ics file.

UPDATE: While Mycroft didn’t recognize the calendar skill as being installed, i had to uninstall it with the msm command and then re-install.
This time it installed quite quickly and was good to go after a reboot.
I was able to add an event successfully, however, it is using GMT for the time zone and not EDT. So my 5 Pm dinner was set for 9 PM.
When I ask Mycroft for the current time, it is correct.

okay, can you upload your skills.log file?

The file is rather large. Would you like me to filter on something? Or where can I put it?

Here is the log filtered on “calendar”:

14:03:49.087 - QuestionsAnswersSkill - INFO - Searching for how many appointments are on my calendar for today
14:12:04.556 - QuestionsAnswersSkill - INFO - Searching for what’s on my calendar
14:29:15.226 - mycroft.skills.core:load_skill:121 - INFO - ATTEMPTING TO LOAD SKILL: calendar-skill.linuss1 with ID calendar-skill.linuss1
14:29:16.664 - mycroft.skills.core:load_skill:150 - INFO - Loaded calendar-skill.linuss1
14:29:16.668 - mycroft.skills.core:load_skill:154 - INFO - First run of calendar-skill.linuss1
14:30:06.205 - Calendar - INFO - 2019-04-24 00:00:00-04:00
14:31:24.194 - Calendar - INFO - Calendar skill new event: date: 2019-04-24 17:00:00-04:00 event: dinner at 5 p.m.
14:31:40.870 - Calendar - INFO - 2019-04-24 00:00:00-04:00
14:47:06.945 - msm.skill_entry - INFO - Nothing new for calendar-skill.linuss1

Are you seeing anything that says Traceback? This indicates an error in the skill.

I’ll look at the timezone issue.

No Tracebacks associated with Calendar Skill. It is looking good.

Interestingly, when I schedule an event with the time and date in the first interaction (Hey Mycroft add an event called lunch on Friday at noon) it works properly with the time. When i do three steps (Hey Mycroft, add an event. Then in response to “what is the date?” after “what is the name of the event?”) the time doesn’t adjust to my time zone.

Alright, thanks for all the debugging info!
I just pushed a fix to GitHub that fixed this issue on my end so try it out. Just uninstall then reinstall the skill to use it!

or to get to the latest commit on the master branch of a skill, you can run:
mycroft-msm --latest install https://github.com/author/skill-repo

yes, that is working! I have added some further tests:

Case 1: (confused by time zone)
Current time is 20:18 EDT (Wednesday) or 00:18 GMT (Thursday).
What is my schedule for today?

Mycroft: “Did you mean the Tokyo Asia time zone?”
No
Mycroft: “I could not find the time zone for today.”

If I answer “Yes” to Tokyo Asia time zone query.
“It is Thursday, April 25th 2019.”

Case 2: (Confused by time zone).
Current time is 20:18 EDT (Wednesday) or 00:18 GMT (Thursday).
What is my schedule for tomorrow?

Mycroft: answers for Friday (not taking my time zone into account).

Case 3: (Very Good)
what is my schedule for Thursday?

It works as expected.

Case 4: (OK, but a bit confused)
“Add an event called Lunch on Saturday at noon.”

Mycroft: The first event on your schedule on saturday, the twenty-seventh is lunch on saturday at noon, at noon.

Event time is correct; event name is “lunch on saturday at noon”. i imagine the engine gets a bits confused by the time as stated with the name of the event.

Case 5: (Very Good)
“Add an event”
Mycroft: What is the name of the event?
Me: Dinner.
Mycroft: What day is the event on?
Me: Saturday at 5 PM.
Mycroft: OK, I have added dinner to your calendar.

Checking this, the time is correct now for both events.

gez-mycroft,
That command didn’t work for me (Picroft 19.02-4)

mycroft-msm --latest install https://github.com/LinusS1/calendar-skill.git
INFO - Problem performing action. Restoring skill to previous state…
AlreadyInstalled: calendar-skill.linuss1

Wow! Thanks for all this information! I’m not sure what is causing Mycroft to ask “Did you mean the Tokyo Asia time zone?” because the skill never asks that. It seems to be that there is an intent collision with the date time skill, so I’ll add this sample utterance.

Notes to myself:

  • Add more vocab
  • Fix engine saying “noon” is part of the name
  • Change all date time objects to match current time zone
  • change nice_date/time to have lang argument

Another question: Should the skill require a time when creating an event?

1 Like

Trying to vote that Time should be required, but clicking it isn’t working for me. May be my browser settings.

1 Like

I’m not able to configure my CalDav server on https://account.mycroft.ai/skills the skill is missing there…

@malevolent that sounds like a home issue. Can you tell if the skill’s loaded?

After deleting and re-adding the skill, now it appears on home.mycroft.ai.

I saw, but, a pair of things I don’t understand.

Its supposed to work with CalDav servers, but there is no option for CalDav servers, just iCal. I’ve tried to put NextCloud CalDav credentials and URL, but the skill just works with the local .ics it created, so I guess it did fallback into local ics.

The second question is… what is that second “password” field shown in the picture?

PS: I’m going to try configure CalDav through the yaml file and report back here.

No luck, CalDav server (Nextcloud) isn’t working, nor via home nor via yaml.
I’ve tested both the nextcloud CalDav URL and the ics URL