Syncing Evolution with Scheduleworld and BitPim.

This is an older tutorial that I had written when I was syncing evolution with scheduleworld and my Samsung phone with bitpim. Hopefully this will be of use to someone.

Today I'm posed with a dilemna.

I keep a calendar of gigs and events to let people know where I will be performing, and I make this calendar available to the world using Google Calendar.
So far, this has worked out perfectly for me. I book a gig somewhere, and return to my computer, where I log onto my google calendar, and add the information. By doing this, it automatically posts the information to my website. So I have a single place to keep track of my events.
I also have a seperate google calender for my personal appointments, that I keep to myself.

This is all great, but I'm a forgetful person. If I don't take care updating the gig calendar as soon as I book a gig… I forget, and that generally turns into disaster. And if I ever try to manually update the calendars everywhere that I want them displayed… I wouldn't have any time for gigging in the first place.

My goal here, is to tie everything together.
Not only do I want reminders beeping at me when I have something coming up, but I want to be able to add an event to my website by creating an appointment on my cell phone. For an added layer of complexity I would like to also syncronize this data with my personal computer calendar. Since I am an avid linux enthusiast, my scheduler of choice is Novell Evolution. Most of you however, will be using Microsoft Outlook.

I want as many things as possible beeping and blinking at me to ensure that I take care of everything I need to take care of, weather it be booking a gig, scheduling a newspaper interview, following up with a radio station submission, getting my eyes checked, or taking my girlfriend on a date.

There are quite a few different ways to acomplish this using expensive commercial software… But I'm a cheapskate, and if it can be done for free, I'll find a way.

My first step, was to create a calendar with google by registering at the address below:
http://www.google.com/calendar

After creating an account, I logged into my new google calendar, and created two calendars.

1.) Gig Calendar
2.) Personal Calendar.

After creating the calendars, I started adding my events. They are grouped by color, so that it's easy to see. A blue event on my calender is a gig, and a red one is a personal appointment. If I only want to look for my gigs for the next month, I can set my Personal Calendar to invisible and vise versa.

Now, I had to set the gig calender to be shared to the world.
Under the settings for the Gig Calendar there is an option called "Share this Calendar" … There are a few different options for sharing, and for this calender, I set the setting for "Share all information on this calendar with everyone". This gives the whole world access to see what I put on the calendar. My events even become archived in Google's Search results. On the Personal Calendar, I set the option "Do not share with everyone". I don't need the world paying attention to when my bills are due.

Google has now become the main place that I will store my data. Not only is the interface easy to use, but I can also access it anywhere that I can reach the interent. I will consider Google Calender as my calender "backend".

Now for my next trick, I want to display the gig calender on my website. Google makes this easy.
Here are the steps.

1.) Log into google calendar.
2.) Open up the settings menu for the Gig Calender.
3.) Select "Share this Calendar". This will open up the sharing options.
4.) Under the sharing options, there is a tab called "Calendar Details". Click on that tab.
5.) At the bottom of the options menu, there are 3 choices. XML, ICAL, and HTML. For this task, I chose the HTML option.
6.) Google will provide a link to the calender, that I can use anywhere I want. But I don't want my visitors to have to click a link to view my calender, I want it embedded on the page. For this reason, Google created the "Configuration Tool". This tool provides some options on controlling how the embedded calender will behave. Should it be a month view or an adgenta view.. Sould there be a title for the calender? Should users be able to cycle through the months, or do I only want to display a month at a time. It also lets me chose the background color to help it integrate seemlesly onto my page. After chosing my options, it provides a small bit of HTML that can be copied onto any webpage.
7.) Now, all I have to do is copy the HTML segment into my page. The results can be seen on www.lukemacneil.com/events.php. I can copy that code into any webpage where I want to display my calendar, and when new events are added to google, the websites will automatically reflect the pages.

This in itself saves me alot of work, and minimizes the risk that I'll make a mistake, or forget to update an events list somewhere.

Now, to take this a step further, I want to control the google calender from within my native scheduler, Evolution.
Evolution provides a plugin that will display the Google Calender information, that is very easy to use, but it's limited to viewing. Using this plugin I will be able to see my upcoming events, but I can't add, or change anything. That just doesn't do it for me, so I started searching around for another method. What I found, is a solution created by Mark Swanson called "ScheduleWorld". Aparently, Mark expereneced the same syncronization frustration, so he created ScheduleWorld to centralize his Schedule, and made it available to everyone. ScheduleWorld is a web application that acts as a middleman between google calender and other apps that need access to it.

The first step in implementing this solution, is to sign up for an account at http://www.scheduleworld.com

After the initial account is created, you can create calenders in ScheduleWorld the same way they were created in Google Calender. I made two, to reflect the calenders I made with Google.

1.) Gig Calender
2.) Personal Calender

After creating the calenders, in order to syncronize with google, permission must be granted to ScheduleWorld to do so. To grant that access, click on the ScheduleWorld "preferences" option. There will be three sets of options. A main options window, that controls the start and end of your day, your password, and some other general preferences, and then a set of options for each of the calenders that you created.
It is here that you must grant ScheduleWorld access to your Google Calender.

After granting ScheduleWorld the necissary access and saving your changes, scroll down to the bottom of the preferences page, and you will see 3 different sets of Configuration Settings.

These are the settings that your applications can use to access the ScheduleWorld data. There are three sets, for three different types of applications. Since I am using Evolution, I am only concerned with the bottom one, which for me, looks like this:

Server URL:           http://sync.scheduleworld.com/funambol/ds
Username:         *****
Password:         The same password you used to log in here.
Events URI:         cal2
Events type:         text/calendar
Tasks/Todos URI:     task2
Tasks/Todos type:     text/x-todo
Contacts URI:         card3
Contacts type:         text/vcard

This is the information that I will feed to evolution in order to allow it to talk with ScheduleWorld, and thus, Google Calender.

Now for my next trick.
How the hell do I tell evolution about this great middleman thats going to give it the power to update my google calender.

As of this writing, by Mark's suggestion, a program called syncevolution seems to be the best bet.
syncevolution is a command line tool that handles the actual data transfer from Evolution to ScheduleWorld… It can be obtained from http://www.estamos.de/projects/SyncML/

I've been struggling with syncevolution, but I will do my best here to outline the steps to configure it and make it work under my circumstances. YMMV.

1.) Download the syncevolution sourcecode from http://www.estamos.de/projects/SyncML/

2.) Decompress the source archive:
# gzip -d syncevolution-0.4.tar.gz
# tar -xvf syncevolution-0.4.tar

3.) After decompression the software must be compiled and installed.
# cd syncevolution-0.4
# ./configure
# make && make install
This will create the syncevolution binary, and install it's configuration files.

4.) There are a number of configuration files that need to be edited to make this work. On my machine they were installed in
/usr/local/etc/ .. Some of these files need to be copied to your home directory and modified.
# cd ~
# mkdir .sync4j/evolution
# cp -a /usr/etc/scheduleworld_1 ~/.sync4j/evolution

5.) After copying the configuration files, they must be edited.
The main configuration file is located in ~/.sync4j/evolution/scheduleworld_1/spds/syncml/config.txt

Update this file to look like this:

syncURL = http://sync.scheduleworld.com/funambol/ds
deviceId = sc-api-nat
username = (The username given to you in the ScheduleWorld preferences. This is not your login username or your google username)
password = (The password that you created to log into ScheduleWorld)
useProxy = F
proxyHost =
userAgent = SyncEvolution
logdir =
maxlogdirs =
maxModPerMsg = 100000
begin =
end =
firstTimeSyncMode = 0

Notice, that the only changes from the stock config file are username and password.
Also note, that syncevolution seems to really dislike whitespace at the end of each entry, so make sure there are no trailing spaces.

This should take care of interfacing with ScheduleWorld.
Now we've got to tell syncevolution about the calenders (also tasks and todos) in Evolution, so it knows what to update.
Typing syncevolution with no arguments will give you a list of available calenders. If you would like to create a seperate calender in evolution for the Google Calender data then create it now. After you've got evolution set up the way you want it run the following:

# syncevolution

My output looks like this:

[luke@cambridge syncml]$ syncevolution

address books:
Personal (file:///home/luke/.evolution/addressbook/local/system)
Everyone (file:///home/luke/.evolution/addressbook/local/1158164819.3026.0@cambridge.lukemacneil.com)

calendars:
Personal (file:///home/luke/.evolution/calendar/local/system)
Gig Calendar (file:///home/luke/.evolution/calendar/local/1161926726.21234.3@cambridge.lukemacneil.com)
Birthdays & Anniversaries (contacts:///)

tasks:
Personal (file:///home/luke/.evolution/tasks/local/system)
SyncEvolution test #1 (file:///home/luke/.evolution/tasks/local/1161927067.21234.5@cambridge.lukemacneil.com)

You can see that it points to the location of my Gig Calendar file that I've created in evolution. The location in this example is: file:///home/luke/.evolution/calendar/local/1161926726.21234.3@cambridge.lukemacneil.com

So now I have to plug that into the the syncevolution config file.
The calendar config file is located in ~/.sync4j/evolution/scheduleworld_1/spds/sources/calendar_1/config.txt
There are also addressbook and todo files in the ~/.sync4j/evolution/scheduleworld_1/spds/sources/ directory… Right now I am only concerned with the calendar.

My config.txt looks like this:

sync = two-way
syncModes = two-way,refresh-from-client,refresh-from-server
type = text/calendar
evolutionsource = file:///home/luke/.evolution/calendar/local/1161926726.21234.3@cambridge.lukemacneil.com
uri = cal2
evolutionuser =
evolutionpassword =
last =

Notice that the only change I have made is to evolutionsource, and it's value is the location that we found in the step above.
You may edit the configuration files for the addressbook and tasks the same way.

At this point, syncevolution is configured, and you can perform an actual sync by typing the following:
# syncevolution scheduleworld_1 calender_1

BITPIM.
My cell phone is a Samsung A650.
I'm using Bitpim to transfer my calender and contacts to it.
Upon recieving my data cable, I was unable to connect to the phone from bitpim.
Here was the problem:

After connecting the USB cable to my linux box (Fedora Core 5) and the phone (Samsung A650), I tried to detect the phone in Bitpim. The port was listed, but it was listed as unavailable.

This entry was posted in Computers.

Post a Comment

You must be logged in to post a comment.