Simple Groupware SyncML integration

SyncML is a platform-independent Synchronization Markup Language. SyncML communicates on top of the HTTP protocol and can be used with a normal network or internet connection. This means that you can synchronize all kinds of information between Simple Groupware and your mobile devices. Some mobile devices support SyncML natively, others are used in combination with a special client software on the device to make it SyncML ready.
Free SyncML clients are available from Funambol for: Windows Mobile, Blackberry, iPod, iPhone, Outlook, Evolution, Palm, Thunderbird, Gmail, Yahoo, Lotus Domino and Exchange

Most newer mobile phones from Motorola, Nokia and Sony Ericsson include SyncML natively, others may be able to use the J2ME client from Funambol.

The SyncML clients cover appointments, tasks, notes and contacts whereas emails are synced over POP3 and IMAP in combination with some push techniques. Inside the SyncML messages, other data formats like iCalendar, vCard or SIF (Sync4j Interchange Format) are used. All the conversions between the different formats are handled by the Funambol server.

Simple Groupware itself does not include its own protocol handler for SyncML. Therefore it communicates with the free SyncML server from Funambol (former Sync4j).

Starting with Simple Groupware 0.420, this communication is done over the database. The Funambol server supports MySQL and PostgreSQL. So both systems need to be installed on the same database using the same credentials for the database. Since Simple Groupware has its own table schemas, datasets between both systems get converted using SQL views for import and export. To find changes, the "last_update" field is used in combination with "status" field (D=deleted, N=new, U=updated). To get started with an installation, follow the installation manual.

Before 0.420, the communication is done by exchanging XML files written in the Sync4j Interchange Format (SIF). Exchanging SIF files is done asynchronously over the filesystem, which means, you can always restart one of the servers without any unwanted dependencies. The folder used for interaction is "<Funambol-installation-folder>/ds-server/db". This location needs to be added to Simple Groupware's setup-settings (see Installation SyncML Server). In order to make notification between Simple Groupware and the Funambol Data Synchronization Server more efficient, I've implemented a changelog mechanism which needs to be added manually after the installation. See the diagram for an overview of all components:

Simple Groupware - Funambol Data Synchronization Server interaction

Simple Groupware - Funambol Data Synchronization Server interaction

From the user's point of view, all contacts in his personal contact folder and all appointments in his personal calendar folder get synchronized to the mobile device (only this folder, no subfolders or any other contact/calendar folders). When a new contact or appointment is created / updated / deleted, Simple Groupware writes a SIF dataset in the database. When a synchronization is in the process, the Funambol server reads the SIF datasets and adapts them to the changes delivered by the mobile device. In earlier version, the changes were documented in a changelog file on the filesystem, but this is no longer required. When a user visits his contacts or his calendar the next time within Simple Groupware, all new datasets get processed and the changes are merged into the database.

The synchronization is done in two-ways with only one exception: When a user deletes an item on the mobile device, then the item will still remain within Simple Groupware. Normally mobile devices can only carry a limited number of datasets. That way you can delete items from the mobile device without loosing them completely (you can change this behavior in the system configuration, see "Sync4j remote delete items"). If you need these items again, simply do a slow synchronization on the device which forces a complete new synchronization without taking knowledge about previous synchronizations.

Every user can have many devices used for synchronization. Inside the Funambol Administration Tool, every combination of a user and a device is called a "principal". You need to create a new user in order to get the synchronization working (the device and the principal will be automatically added).

The Funambol Data Synchronization Server has its own user database, so you only need to match the usernames between both systems. E.g. you have a username called "bsimpson" in Simple Groupware with password "trab". Now you create a new user called "bsimpson" in the Funambol Administration Tool and give him the password "asil", create a new device and a new principal. When the user synchronizes his mobile device he needs to provide the username "bsimpon" and "asil" as the password. So the usernames need to match between both systems, but the password on the Funambol system can be different. The URL used for the synchronization will be "http://<funambol-server-ip>:8080/funambol/ds".


Screenshots


Simple Groupware Synchronization with Outlook (calendar)
Synchronization with Outlook
(calendar)
Simple Groupware Synchronization with Windows Mobile (calendar)
Synchronization with Windows Mobile (calendar)
  
Simple Groupware Synchronization with Outlook (tasks)
Synchronization with Outlook (tasks)
Simple Groupware Synchronization with Outlook (notes)
Synchronization with Outlook (notes)
  
Simple Groupware Synchronization with Outlook (contacts)
Synchronization with Outlook
(contacts)
Simple Groupware Synchronization with Windows Mobile (contacts)
Synchronization with Windows Mobile (contacts)


Troubleshooting


When installing the Funambol SyncML server, make sure that the network port 8080 is unused and not blocked by a firewall.
When the synchronization fails, take a look at the logfile located at "<Funambol-installation-folder>/logs/ds-server/ds-server.log".

Database permissions: Both, Simple Groupware and the Funambol server need to access the same database. Therefore it is recommended to connect under the same user account and provide the right privileges.

Deleted items appear again: Please make sure that the Funambol server and the mobile clients have the same date and time configured. If the time is not synchronized properly, it can happen that deleted items come up again after the next sync.


Funambol v7


Simple Groupware 0.420 has support for Funambol version 7.0.
Funambol version 7.0 normally uses the Java-based HSQL database to store the contacts, appointments, tasks and notes. In combination with Simple Groupware, it needs to be installed with MySQL or PostgreSQL (see installation instructions). Any other additional patches are not required.

Workarounds for using Funambol 7.x with Thunderbird/Lightning:

  • Appointment recurrences: If appointment recurrences get lost during synchronization, you might need to change the configuration in the "Funambol Administration Tool", change the type from vCalendar to iCalendar
Funambol SyncSource configuration
  • Timezone conversion: If appointments appear in the wrong timezone within Simple Groupware, you might need to change the timezone handling in the "Funambol Administration Tool":
    • Navigate to <server>/Devices
    • Find the Thunderbird devices (starting with fmz...)
    • Open each item, set the Timezone and click Save
Funambol timezone configuration
Inside Thunderbird, open the Menu Tools->Options->Lightning->Timezone and set your Timezone. Then restart Thunderbird.
Thunderbird timezone configuration


Funambol v6.5


Simple Groupware 0.400 - 0.414 has support for Funambol version 6.5.
Funambol version 6.5 normally uses the Java-based HSQL database to store the contacts, appointments, tasks and notes. A patch was written to get back the old behavior for writing single files to the file system (see installation instructions). Also a new foundation .jar was built to write the changelog files. Using the Funambol v6.5 SyncML server with MySQL (instead of HSQLdb) is not supported.


Other locations


Clients for devices that don't include native support for SyncML can be downloaded here.

Clients for programs that don't include native support for SyncML can be downloaded here.

Documentation about the Funambol Data Synchronization server and the SyncML clients is available here.