Difference between revisions of "C+ Dav Synergy Connector"

From WebOS-Ports
Jump to navigation Jump to search
(34 intermediate revisions by 2 users not shown)
Line 9: Line 9:
 
== Important notes ==
 
== Important notes ==
  
=== webOS 2.1.1 and 2.1.2 ===
+
=== webOS 2.1.0, 2.1.1, and 2.1.2 ===
Only webOS 2.2.4 and webOS 3.0.5 (and LunesOS) are supported. If you have a Veer with 2.1.X, you can try to patch your sync framework to the version of 2.2.4. It worked for me on my Veer that currently is my daily driver. It might have side effects on other synergy connectors, though.
+
Only webOS 2.2.4 and webOS 3.0.5 (and LunesOS) are supported. If you have a Veer with 2.1.X, you can use the patches below to patch your sync framework to the version of 2.2.4. It worked for me on my Veer that currently is my daily driver. It might have side effects on other synergy connectors, though. Get the patches here:
 +
 
 +
* [https://www.dropbox.com/sh/lr663pjl8es6yll/AAAJERbfQZnIu1p-vns-SMJva/MojoTransportAndSyncFramework_210to224.patch?dl=1 webOS 2.1.0]
 +
* [https://www.dropbox.com/sh/lr663pjl8es6yll/AADlSThNRhvFPRxv1sNJ0YBUa/MojoTransportAndSyncFramework_211to224.patch?dl=1 webOS 2.1.1]
 +
* [https://www.dropbox.com/sh/lr663pjl8es6yll/AACr9UlXg33wcOIOVbHPRzbua/MojoTransportAndSyncFramework_212to224.patch?dl=1 webOS 2.1.2]
 +
 
 +
Sometimes those patches fail if used from WebOS Quick Install. Please copy them to your device and use Internalz Pro on your device to install them.
  
 
=== Sync fix for stable upload ===
 
=== Sync fix for stable upload ===
Also, please tripple check that you do not have the patch "System: Sync fix for stable upload" installed. It WILL run the connector in an endless loop eating up all your battery and your data volume quite fast!
+
Also, please triple check that you do not have the patch "System: Sync fix for stable upload" installed. It WILL run the connector in an endless loop eating up all your battery and your data volume quite fast!
 +
 
 +
=== Contacts Patch ===
 +
webOS has some issues with vCard processing, I patched these for all currently used 2.x webOS versions. If you don’t install the patch you’ll get strange characters in contact data fields. The patch will conflict with improved vCard export patch from the patch feed. You can safely uninstall it, it is included in the patch files.
 +
 
 +
* [https://www.dropbox.com/sh/lr663pjl8es6yll/AAD0DsUEIEE9--RAlOrdKWOza/contacts_2.1.0_5.patch?dl=1 webOS 2.1.0 Build 284]
 +
* [https://www.dropbox.com/sh/lr663pjl8es6yll/AAAN6tfbqOiNTZ4u0sZOkNmGa/contacts_2.1.0_285_5.patch?dl=1 webOS 2.1.0 Build 285]
 +
* [https://www.dropbox.com/sh/lr663pjl8es6yll/AAAzy5QL8kDmQ3GS20Z80M8Ua/contacts_2.1.1_5.patch?dl=1 webOS 2.1.1]
 +
* [https://www.dropbox.com/sh/lr663pjl8es6yll/AAC8Pfi7nW-KXeVV2tYBjxbpa/contacts_2.1.2_5.patch?dl=1 webOS 2.1.2]
 +
* [https://www.dropbox.com/sh/lr663pjl8es6yll/AABasGMUS70e3ady5IwsyEzIa/contacts_2.2.4_5.patch?dl=1 webOS 2.2.4]
 +
* [https://www.dropbox.com/sh/lr663pjl8es6yll/AABixLxXLWqEFuqefKRWvbupa/contacts_2.2.4Veer_5.patch?dl=1 webOS 2.2.4 on HP Veer]
 +
* [https://www.dropbox.com/sh/lr663pjl8es6yll/AACs2hbTqVD6s8pcUWY8yWX9a/contacts_3.0.5_5.patch?dl=1 webOS 3.0.5 TouchPad]
 +
 
 +
Sometimes those patches fail if used from WebOS Quick Install. Please copy them to your device and use Internalz Pro on your device to install them.
 +
 
 +
Current Patch Version: 4. To update the patch, you have to remove the old version. Luna restarts are not necessary.
 +
Old versions of the patch can be found in this [https://www.dropbox.com/sh/lr663pjl8es6yll/AACxeBXfKZIozIh14uTwJAOja?dl=0 dropbox folder].
  
 
=== First sync ===
 
=== First sync ===
 
The first sync can last very long, especially if the account has many entries on the server and the connection is not very stable. Please leave it for some time, best would be overnight on a good WiFi.
 
The first sync can last very long, especially if the account has many entries on the server and the connection is not very stable. Please leave it for some time, best would be overnight on a good WiFi.
  
=== Contacts Patch ===
+
=== Missing calendars on Google ===
A patch to the webOS contacts framework is necessary, see below.
+
If you are missing some of your google calendars, please go [https://www.google.com/calendar/syncselect to this page] and check if they are marked to sync.  
  
=== Enable upsync ===
+
=== Strange reminders with Google calendar ===
# Remove your account!
+
It seems google calendar enforces it's reminder settings for events comming in from caldav. To prevent that you should go to your google calendar and in settings remove all default reminders. Then it stops adding them to every event.
# Really, remove all old c+dav accounts
 
# Make sure you have a backup of all your data
 
# Install the upsync enabled ipk file
 
# Recreate your account(s)
 
  
 
== Status of the Software ==
 
== Status of the Software ==
Line 34: Line 52:
 
A complex mechanism for auto discovery is implemented. Servers are probed for a lot of different options. That "should" make configuration a bit easier. Additionally there are multiple account templates for popular services like iCloud, Google or Yahoo where you do not have to worry about finding the right URL.
 
A complex mechanism for auto discovery is implemented. Servers are probed for a lot of different options. That "should" make configuration a bit easier. Additionally there are multiple account templates for popular services like iCloud, Google or Yahoo where you do not have to worry about finding the right URL.
  
There is a C+Dav app that has some functionality, you can trigger a "slow" sync, a discovery and also manually trigger the synchronization. This is only for convenience.
+
There is a C+Dav app that has some functionality, you can trigger a "slow" sync (do that if you are missing events or contacts), a discovery and also manually trigger the synchronization. This is only for convenience and usually only necessary to use for debugging. So a normal user should not run the app at all.
  
== Required Patch ==
+
== How-To ==
  
webOS has some issues with vCard processing, I patched these for all currently used 2.x webOS versions. Please select the right patch from the dropbox folder and install it. If you don’t do that you’ll get strange characters in contact data fields.
+
=== Installation ===
 +
Install the software fitting your device either using Preware, Quick Install or palm-install. I strongly advise first to test the downsync only version with new servers. Personally I only test on ownCloud and a bit with Google, currently. All others are more or less untested.
  
The patch will conflict with improved vCard export patch from patch feed. You can safely uninstall it, it is included in the patch files in the Dropbox folder.
+
* [https://www.dropbox.com/sh/lr663pjl8es6yll/AABNwvSxoAbCH_52A-ptpufoa/org.webosports.cdav_tablet_no_upsync.ipk?dl=1 webOS 3.x and LuneOS (upsync disabled)]
 +
* [https://www.dropbox.com/sh/lr663pjl8es6yll/AAD9FwVwFTguBk-nvhhOdrv1a/org.webosports.cdav_phone_no_upsync.ipk?dl=1 webOS 2.x (upsync disabled)]
  
Current Patch Version: 2.
 
To update the patch, you have to remove the old version. Luna restarts are not necessary.
 
  
== How-Too ==
+
* [https://www.dropbox.com/sh/lr663pjl8es6yll/AACo-6756vzdBVXYpLJ8xyz_a/org.webosports.cdav_tablet_upsync.ipk?dl=1 webOS 3.x and LuneOS (upsync enabled)]
 +
* [https://www.dropbox.com/sh/lr663pjl8es6yll/AAC-RzHLIFfjnwjLOI1wagNMa/org.webosports.cdav_phone_upsync.ipk?dl=1 webOS 2.x (upsync enabled)]
  
=== Installation ===
+
Current version: 0.3.34.
Install the software fitting your device either using Preware, Quick Install or palm-install. I strongly advise first to test the downsync only version with new servers. Personally I only test on ownCloud, currently. All others are more or less untested.
 
  
 
=== Configuration ===
 
=== Configuration ===
Line 67: Line 85:
 
* iCloud: Testing is hard, because it seems I can't create a free iCloud account. No known issues, though.
 
* iCloud: Testing is hard, because it seems I can't create a free iCloud account. No known issues, though.
 
* Yahoo: The servers are strange. Calendar & Contacts should be working.
 
* Yahoo: The servers are strange. Calendar & Contacts should be working.
 +
 +
=== How to enable upsync if you previously had an upsync disabled version ===
 +
# Remove your C+Dav accounts!
 +
# Really, remove all C+Dav accounts
 +
# Make sure you have a backup of all your data
 +
# Install the upsync enabled ipk file (see above)
 +
# Recreate your account(s)
  
 
== Trouble shooting ==
 
== Trouble shooting ==
Line 73: Line 98:
  
 
=== Sending logs ===
 
=== Sending logs ===
Logging goes to the system log ( in /var/log/messages ). You can watch the log using Lumberjack. Please use a '''custom filter''' for "cdav". The nicest way is to select "Follow log" and then trigger a sync or discovery where I can see the errors (probably by creating events / contacts, if you have issues with upsync).
+
Newer versions of the connector write a log to
 +
    /media/internal/.org.webosports.cdav.service.log
 +
i.e. a file in the USB partition. You need to enable show hidden files on various operating systems (and Internalz Pro) to see the file. This file won't show hard crashes of the service but is sufficient for most issues. Please run a sync from the app (maybe even trigger a slow sync before), before sending the log my way so I get a fresh log with the issue.
 +
 
 +
Logging also goes to the system log ( in /var/log/messages ). You can watch the log using Lumberjack. Please use a '''custom filter''' for "cdav". The nicest way is to select "Follow log" and then trigger a sync or discovery where I can see the errors (probably by creating events / contacts, if you have issues with upsync).
 
Another possibility is to copy the file from the device and cut the relevant parts from it or use the command line like this:
 
Another possibility is to copy the file from the device and cut the relevant parts from it or use the command line like this:
 
     cat /var/log/messages | grep cdav > /media/internal/cdav.log
 
     cat /var/log/messages | grep cdav > /media/internal/cdav.log
Line 83: Line 112:
 
# Delete all c+dav accounts in the device manager
 
# Delete all c+dav accounts in the device manager
 
# Reboot the device
 
# Reboot the device
# Uninstall the c+dav connector (for example via Software manager)
+
# Uninstall the c+dav connector (you can skip this step if you plan to use C+Dav again later)
 
# Use Impostah to clean the on device database, to do this, start Impostah, select databases, then on the upper field select "Persistent".
 
# Use Impostah to clean the on device database, to do this, start Impostah, select databases, then on the upper field select "Persistent".
# From the second list first select org.webosports.cdav.account.config and then select "Delete all" from the app menu.
+
# From the "Database Kind" list first select org.webosports.cdav.account.config, tab "Query", and then select "Delete all" from the app menu.
 
# Do the same for org.webosports.cdav.account.calendar and org.webosports.cdav.account.contacts.
 
# Do the same for org.webosports.cdav.account.calendar and org.webosports.cdav.account.contacts.
 
# After that, do the same for the other org.webosports.cdav.* you find in the list
 
# After that, do the same for the other org.webosports.cdav.* you find in the list
 
# Go to Impostah => Acitivities, select "Service persistent" in the first field
 
# Go to Impostah => Acitivities, select "Service persistent" in the first field
 
# Look for acitivites with "org.webosports.cdav" in their name, select them and remember their activityIds.
 
# Look for acitivites with "org.webosports.cdav" in their name, select them and remember their activityIds.
# For each of those ids run this command from the command line (replace X with the activityId!):
+
# For each of those ids run this command from the command line (replace X with the id):
 
     luna-send -n 1 -a org.webosports.cdav.service palm://com.palm.activitymanager/cancel '{"activityId": X}'
 
     luna-send -n 1 -a org.webosports.cdav.service palm://com.palm.activitymanager/cancel '{"activityId": X}'
  

Revision as of 12:18, 14 September 2015

The legacy synergy connectors were not open sourced, so we had to create our own. CalDav and CardDav are now the standards with the broadest server support for syncing calendars and contacts, so we created a synergy connector for them. An incomplete list of servers supporting caldav and carddav:

  • ownCloud
  • iCloud
  • Google
  • Yahoo
  • eGroupware
  • SoGo

Important notes

webOS 2.1.0, 2.1.1, and 2.1.2

Only webOS 2.2.4 and webOS 3.0.5 (and LunesOS) are supported. If you have a Veer with 2.1.X, you can use the patches below to patch your sync framework to the version of 2.2.4. It worked for me on my Veer that currently is my daily driver. It might have side effects on other synergy connectors, though. Get the patches here:

Sometimes those patches fail if used from WebOS Quick Install. Please copy them to your device and use Internalz Pro on your device to install them.

Sync fix for stable upload

Also, please triple check that you do not have the patch "System: Sync fix for stable upload" installed. It WILL run the connector in an endless loop eating up all your battery and your data volume quite fast!

Contacts Patch

webOS has some issues with vCard processing, I patched these for all currently used 2.x webOS versions. If you don’t install the patch you’ll get strange characters in contact data fields. The patch will conflict with improved vCard export patch from the patch feed. You can safely uninstall it, it is included in the patch files.

Sometimes those patches fail if used from WebOS Quick Install. Please copy them to your device and use Internalz Pro on your device to install them.

Current Patch Version: 4. To update the patch, you have to remove the old version. Luna restarts are not necessary. Old versions of the patch can be found in this dropbox folder.

First sync

The first sync can last very long, especially if the account has many entries on the server and the connection is not very stable. Please leave it for some time, best would be overnight on a good WiFi.

Missing calendars on Google

If you are missing some of your google calendars, please go to this page and check if they are marked to sync.

Strange reminders with Google calendar

It seems google calendar enforces it's reminder settings for events comming in from caldav. To prevent that you should go to your google calendar and in settings remove all default reminders. Then it stops adding them to every event.

Status of the Software

Two-way sync of contacts and calendar events is implemented. Multiple calendars and addressbooks are supported and will be automatically discovered. The calendars will also show up in webOS, so you can define different colors for them.

A complex mechanism for auto discovery is implemented. Servers are probed for a lot of different options. That "should" make configuration a bit easier. Additionally there are multiple account templates for popular services like iCloud, Google or Yahoo where you do not have to worry about finding the right URL.

There is a C+Dav app that has some functionality, you can trigger a "slow" sync (do that if you are missing events or contacts), a discovery and also manually trigger the synchronization. This is only for convenience and usually only necessary to use for debugging. So a normal user should not run the app at all.

How-To

Installation

Install the software fitting your device either using Preware, Quick Install or palm-install. I strongly advise first to test the downsync only version with new servers. Personally I only test on ownCloud and a bit with Google, currently. All others are more or less untested.


Current version: 0.3.34.

Configuration

After installation go to the Accounts app on your device and create a new account. You'll see a bunch of new account templates starting with "C+DAV". Select one of those matching your service or the general one. If there is a special account for your server, please use it. It will make your life much easier.

In the next scene fill in all fields. For the generic one the URL is the most important one. If the server type is known and can be detected (for example the URL includes owncloud), then the software will take care of finding the right URL. If not, you need to supply an URL that "speaks" webdav (carddav and caldav rely on webdav), so we can use it to check the credentials and ask it for the users principal and home folders. For most servers it is not necessary to give a full calendar URL or something. Some examples:

If credentials are correct, you can create the account. webOS will now try to sync your data. Sometimes this fails on the initial sync. You can manually (re-)trigger a sync using the calendar or contacts app or the C+Dav app. If that brings up all your data, you are fine and can test more functions.

Account templates

The account templates exist for two reasons. On the one hand they make configuration easier on the other hand webOS does not allow multiple accounts of the same type with the same username, which can get a bit nasty if you use your e-mail address on multiple services. There are currently a number of account templates:

  • Google: This uses OAuth2.0 authorization (including support for two factor authorization), which is required for calendars now. Calendar & Contacts should work.
  • iCloud: Testing is hard, because it seems I can't create a free iCloud account. No known issues, though.
  • Yahoo: The servers are strange. Calendar & Contacts should be working.

How to enable upsync if you previously had an upsync disabled version

  1. Remove your C+Dav accounts!
  2. Really, remove all C+Dav accounts
  3. Make sure you have a backup of all your data
  4. Install the upsync enabled ipk file (see above)
  5. Recreate your account(s)

Trouble shooting

If anything goes wrong, please contact me ( garfonso at mobo.info ) and maybe already attach a log.

Sending logs

Newer versions of the connector write a log to

   /media/internal/.org.webosports.cdav.service.log

i.e. a file in the USB partition. You need to enable show hidden files on various operating systems (and Internalz Pro) to see the file. This file won't show hard crashes of the service but is sufficient for most issues. Please run a sync from the app (maybe even trigger a slow sync before), before sending the log my way so I get a fresh log with the issue.

Logging also goes to the system log ( in /var/log/messages ). You can watch the log using Lumberjack. Please use a custom filter for "cdav". The nicest way is to select "Follow log" and then trigger a sync or discovery where I can see the errors (probably by creating events / contacts, if you have issues with upsync). Another possibility is to copy the file from the device and cut the relevant parts from it or use the command line like this:

   cat /var/log/messages | grep cdav > /media/internal/cdav.log

This will create a cdav.log file in your media partition which you can e-mail me.

Clean the device

If you want to clean your device, please follow these steps in the right order:

  1. Delete all c+dav accounts in the device manager
  2. Reboot the device
  3. Uninstall the c+dav connector (you can skip this step if you plan to use C+Dav again later)
  4. Use Impostah to clean the on device database, to do this, start Impostah, select databases, then on the upper field select "Persistent".
  5. From the "Database Kind" list first select org.webosports.cdav.account.config, tab "Query", and then select "Delete all" from the app menu.
  6. Do the same for org.webosports.cdav.account.calendar and org.webosports.cdav.account.contacts.
  7. After that, do the same for the other org.webosports.cdav.* you find in the list
  8. Go to Impostah => Acitivities, select "Service persistent" in the first field
  9. Look for acitivites with "org.webosports.cdav" in their name, select them and remember their activityIds.
  10. For each of those ids run this command from the command line (replace X with the id):
   luna-send -n 1 -a org.webosports.cdav.service palm://com.palm.activitymanager/cancel '{"activityId": X}'

These steps are only necessary if something goes horribly wrong and make sure you have a clean start without visiting the doctor. Otherwise you might have phantom events/contacts and activities remaining in the database. Usually all of this should happen automatically. But there might be bugs in those procedures.

Links