maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [Announce] Erminig-NG: two-way synchronization Google Calendar <-> Fremantle Calendar (https://talk.maemo.org/showthread.php?t=40408)

shanttu 2012-03-16 13:39

Re: [Announce] Erminig-NG: two-way synchronization Google Calendar <-> Fremantle Calendar
 
Quote:

Originally Posted by reinob (Post 1180219)
Just to add: I've decided to remove all support for synchronizing alarms, so the alarms I set on the N900 stay there and the alarms I set in google calendar stay also there.

Now I'm a fully happy user of erminig :)

Would like that as well. Would you mind sharing the instructions (=what lines to edit)?

gbuergisser 2012-03-16 13:49

Re: [Announce] Erminig-NG: two-way synchronization Google Calendar <-> Fremantle Calendar
 
Or even better a unified diff.

reinob 2012-03-16 14:20

Re: [Announce] Erminig-NG: two-way synchronization Google Calendar <-> Fremantle Calendar
 
Quote:

Originally Posted by shanttu (Post 1180246)
Would like that as well. Would you mind sharing the instructions (=what lines to edit)?

Hmm.. I guess it's too late for that. It was a quick search-&-destroy-and-leave-no-backups kind of job :)

I only edited two files: Event.py and erminig-core.py

In Event.py you basically have to make sure that no matter what self.alarm is never assigned to anything other than -1.

At the very end you have the notorious def get_alarm that should stay as "return self.alarm" (i.e. NOT str(self.alarm)) or anything else. As a bonus you can also put "return -1" but that doesn't really matter.

What matters is at the beginning (def __init__ ...) The last line of that function should read "self-alarm = -1".

This way you make sure that anything coming from google (i.e. any event being created to be stored on the N900) will be stripped of any alarms.

For the other direction (i.e. no alarms of your N900 will go to google), you need to edit erminig_core.py.

The changes there were a bit larger. Basically removing any line dealing with the word "alarm" (except those calling the shared library, because I didn't want to recompile it.)

You can have a look here: http://geni.ath.cx/maemo/erminig-0.2.11.patch
That was the patch that brought the alarm framework to erminig, so basically you have to "undo" those changes, except, again, those dealing with the shared library.

So delete things like:
Code:

  if len(e.reminder) > 0:
                                alarm = int(e.reminder[0].minutes)

..

 if len(e.when[0].reminder) > 0:
                                alarm = int(e.when[0].reminder[0].minutes)

..

                if len(event.reminder) > 0:
                        event.reminder[0].minutes = evt.get_alarm()
                else:        event.reminder.append(gdata.calendar.Reminder(minutes=evt.get_alarm()));


..

                if len(event.when[0].reminder) > 0:
                        event.when[0].reminder[0].minutes = evt.get_alarm()
                else:
event.when[0].reminder.append(gdata.calendar.Reminder(minutes=evt.get_alarm()));

That's four small chunks, so it should be trivial to do.
Otherwise I can send you my erminig_core.py and you do the diff. Or you wait until I have time to grab the file from the .deb and do the diff myself (but I can't do it from work, i.e. now, and at home I usually have no time to hack around..)

Cheers.

HolgerN 2012-04-17 09:21

Re: [Announce] Erminig-NG: two-way synchronization Google Calendar <-> Fremantle Calendar
 
I want to make a new release of erminig containing the newest patches. I hope this is ok, but if you think i should not touch the package, than i will not do anything.

I want to add the patch from http://talk.maemo.org/showpost.php?p...&postcount=558 for full day events

Quote:

/opt/maemo/usr/share/erminig/erminig_core.py:
Quote:

tz = time.timezone
if (time.daylight):
tz = time.altzone
start_time += tz
end_time += tz
#start_time += time.timezone
#end_time += time.timezone
I also want to add the patch from http://talk.maemo.org/showpost.php?p...&postcount=595

which fixes the 0 minute alarm bug
Quote:

def get_alarm(self):
return self.alarm
Do you have more patches which i should inserted in the new version of erminig? What do you think?

I will only change those few line and nothing else.

HolgerN 2012-04-18 12:15

Re: [Announce] Erminig-NG: two-way synchronization Google Calendar <-> Fremantle Calendar
 
Ok i pushed a new version 0.2.12.5 to extras devel.

I fixed the full day events bug for daylight savings
Quote:

tz = time.timezone
if (time.localtime(start_time).tm_isdst):
tz = time.altzone
start_time += tz
end_time += tz
#start_time += time.timezone
#end_time += time.timezone

The 0 minute alarm bug is also fixed.

guilledoc 2012-04-18 12:31

Re: [Announce] Erminig-NG: two-way synchronization Google Calendar <-> Fremantle Calendar
 
Hi
Allways wanted to use Erminig but never being able to.
This is the log file I get when trying to modify, delete account or sync:

Traceback (most recent call last):
File "/opt/maemo/usr/share/erminig/settings_ui.py", line 17, del_google_acct(widget=<hildon.Button object at 0x41e743c8 (HildonButton at 0x5cc490)>, data=<hildon.Dialog object at 0x41e70698 (HildonDialog at 0x5bb9d0)>)
def del_google_acct(widget, data):
id = get_google_acct_id()
account = google_accounts.get_account_by_id(id)
variables: {'id': ('builtin', <built-in function id>), 'get_google_acct_id': ('global', <function get_google_acct_id at 0x416c9af0>)}
File "/opt/maemo/usr/share/erminig/settings_ui.py", line 14, get_google_acct_id()
(model, iter) = ts.get_selected()
return model.get_value(iter, 0)
variables: {'model.get_value': ('local', <built-in method get_value of gtk.ListStore object at 0x41e74170>), 'iter': ('local', None)}
TypeError: iter must be a GtkTreeIter

Any idea I really want to give it a try :(

ivgalvez 2012-04-18 12:55

Re: [Announce] Erminig-NG: two-way synchronization Google Calendar <-> Fremantle Calendar
 
Quote:

Originally Posted by guilledoc (Post 1193804)
Hi
Allways wanted to use Erminig but never being able to.
This is the log file I get when trying to modify, delete account or sync:

Traceback (most recent call last):
File "/opt/maemo/usr/share/erminig/settings_ui.py", line 17, del_google_acct(widget=<hildon.Button object at 0x41e743c8 (HildonButton at 0x5cc490)>, data=<hildon.Dialog object at 0x41e70698 (HildonDialog at 0x5bb9d0)>)
def del_google_acct(widget, data):
id = get_google_acct_id()
account = google_accounts.get_account_by_id(id)
variables: {'id': ('builtin', <built-in function id>), 'get_google_acct_id': ('global', <function get_google_acct_id at 0x416c9af0>)}
File "/opt/maemo/usr/share/erminig/settings_ui.py", line 14, get_google_acct_id()
(model, iter) = ts.get_selected()
return model.get_value(iter, 0)
variables: {'model.get_value': ('local', <built-in method get_value of gtk.ListStore object at 0x41e74170>), 'iter': ('local', None)}
TypeError: iter must be a GtkTreeIter

Any idea I really want to give it a try :(

Yes, once in I while I retest it and found all this weird crashes, my suggestion is to reinstall the application but first run a dpkg --purge and be sure that no configuration files are left.

ivgalvez 2012-04-18 13:33

Re: [Announce] Erminig-NG: two-way synchronization Google Calendar <-> Fremantle Calendar
 
Installed, entered the Google account and not checked the auto-synchronize option, then pressed the + button and the application stopped responding.

Now every time I open Erming-NG and press the + button it stops.

guilledoc 2012-04-18 19:53

Re: [Announce] Erminig-NG: two-way synchronization Google Calendar <-> Fremantle Calendar
 
Quote:

Originally Posted by ivgalvez (Post 1193810)
Yes, once in I while I retest it and found all this weird crashes, my suggestion is to reinstall the application but first run a dpkg --purge and be sure that no configuration files are left.

did it same problem any ideas?:(

BertvanDorp 2012-04-18 20:03

Re: [Announce] Erminig-NG: two-way synchronization Google Calendar <-> Fremantle Calendar
 
Wow, HolgerN, thanks for picking up on the development!

A while ago, I tried running Erminig 3.0 (from the repos, check garage) on the N900 (Maemo5), but I was not able to get it together. I believe it was something with the built-in calendar in Maemo4. However, I remember some fixes for the Google Accounts handling was included in the 3.0 version. The source/data can be found here: https://garage.maemo.org/frs/?group_id=702. Hope to be of help!

lazyfai 2012-04-19 06:47

Re: [Announce] Erminig-NG: two-way synchronization Google Calendar <-> Fremantle Calendar
 
Hi, thanks for fixing the 0 min alarm bug.
For the new feature suggestion, will users be able to set the synchronization time more frequent instead of daily? eg. Hourly or when IP address is changed (like disconnecting from network and reconnecting) which Android apps work?

BertvanDorp 2012-04-19 09:41

Re: [Announce] Erminig-NG: two-way synchronization Google Calendar <-> Fremantle Calendar
 
By the way, I kept the configuration files and fixed the password by installing Db Browser, where I could enter SQL commands to update the password for my Google account.

HolgerN, do you have some sort of feature request-list or bug-list? I would like to help out here; do you have instructions on how to get started?

HolgerN 2012-04-19 11:50

Re: [Announce] Erminig-NG: two-way synchronization Google Calendar <-> Fremantle Calendar
 
I am only syncing in a terminal with the command
Quote:

erminig -a
.

It is possible to use alarmed for synchronization. In alarmed a command execution string can be entered, which will be executed every definded intervall.

I think the source code of Erminig 3.0 will not help us, as the last entry is from 2008 and the erminig-NG was introduced 2010. There is also a git hub of erminig-NG:
https://github.com/thomasvs/erminig-ng

I have registered a garage project.

https://garage.maemo.org/projects/erminig-n900

BertvanDorp 2012-05-30 08:40

Re: [Announce] Erminig-NG: two-way synchronization Google Calendar <-> Fremantle Calendar
 
1 Attachment(s)
I've been using Erminig for quite a while now. Previously, I ran into the error after every sync, but this disappeared after I performed a reflash. Yesterday, I noted a meeting in my internal N900 agenda, in the agenda linked to do a sync with a google agenda. Now I'm recieving an error after every sync. The error is attached!

This seems to be the bug where Erminig can't upload new appointments from the device. Is someone looking into this? Can I do some further testing?

em28 2012-06-24 17:58

Re: [Announce] Erminig-NG: two-way synchronization Google Calendar <-> Fremantle Calendar
 
Hi, there.
Am I the only one who can't sync N900<-->Google calendar ? :confused:

Syncing look fine on N900 but nothing goes to Google and vise versa.

How & to whom can I send the log ?

reinob 2012-06-25 07:33

Re: [Announce] Erminig-NG: two-way synchronization Google Calendar <-> Fremantle Calendar
 
Quote:

Originally Posted by BertvanDorp (Post 1214825)
I've been using Erminig for quite a while now. Previously, I ran into the error after every sync, but this disappeared after I performed a reflash. Yesterday, I noted a meeting in my internal N900 agenda, in the agenda linked to do a sync with a google agenda. Now I'm recieving an error after every sync. The error is attached!

This seems to be the bug where Erminig can't upload new appointments from the device. Is someone looking into this? Can I do some further testing?

Could you post the output of:

$ ls -al /home/user/.erminig.db

the file should be owned by "user", group "users". Permissions should be -rw-r--r--

I suspect you may have run erminig as root at some point, which made the database unreadable/unwriteable to the normal user.

af7567 2012-09-14 00:03

Re: [Announce] Erminig-NG: two-way synchronization Google Calendar <-> Fremantle Calendar
 
Erminig seems to have stopped working properly for me now. It syncs ok from google to the phone, but any events I add on the n900 don't get sent to google.

I tried deleting .erminig.db and reconfigured it but it still won't sync anything I add on the n900. I also tried clearing my n900 calendar and let it refresh from the google calendar.

I have erminig running every hour and the events that I added on the n900 are still showing in the n900 calendar, just not on google calendar.

Is there anything else I can try?

edit:
Just added a new event on the n900 and ran erminig -a from a terminal to see what happened and I get:
Code:

RequestError({'status': 400, 'body': 'Illegal gd:reminder method or time  specified: 1347668400 seconds', 'reason': 'Bad Request'},)
Got a None event....skipping

All I did was added a new event on my n900 calendar and changed the date to be tomorrow

edit 2 :
I have fixed this for now by editing erminig_core.py line 373 to say "minutes=15" instead of "minutes=evt.get_alarm()". It seems to work ok, but obviously the reminder will always be 15 minutes before and ignore what is in the calendar :)

Xagoln 2012-10-02 00:16

Re: [Announce] Erminig-NG: two-way synchronization Google Calendar <-> Fremantle Calendar
 
af7567, perhaps we should dig into the code a bit deeper, looking at how that value changes with different appointments and do some data validation on that field?

Xagoln 2012-10-02 07:14

Re: [Announce] Erminig-NG: two-way synchronization Google Calendar <-> Fremantle Calendar
 
I was wondering if two-way synch between Erminig and Google Calendar would be reliable enough for me. It looks like perhaps not - possibly Google's slightly changed the way they process data and broken the interface gData uses?

I've started looking at the Google Tasks API that's available, but I'm hardly much of a programmer so it's unlikely anything will come of it. I would really love a reliable app that could synch both Tasks and Calendar between N900 and Google, and I think a lot of the logic from Erminig would be transferrable.

reinob 2012-10-02 10:32

Re: [Announce] Erminig-NG: two-way synchronization Google Calendar <-> Fremantle Calendar
 
@Xagoln,

With the patches I did (see above on post #602) I don't have any problems synchronizing with Google Calendar (basically, I disabled any reminders being propagated in any direction, which to me makes a lot of sense).

Syncevolution should also be able to synchronize with Google Calendar. I use only for contacts, for now. But my plan is to test it with the calendar as well. Unfortunately my lack of time prevents me from doing this (I want to backup everything first and try to get it right the first time..).

If I manage to do this, I will post here.

Ray-Ven 2013-03-29 15:03

Re: [Announce] Erminig-NG: two-way synchronization Google Calendar <-> Fremantle Calendar
 
Hey,
did enyone else experience, that if a event is set with alarm on n900 it won't sync to google via erminig-ng? Works if no alarm is set. But (!) works from google to n900.

I have to add: It syncs everything, except events made on n900 with alarm

Maybe this can be corrected easy...

Thanks for helping

darodi 2014-11-21 11:10

Re: [Announce] Erminig-NG: two-way synchronization Google Calendar <-> Fremantle Calendar
 
I'm having problems with erminig-ng for a few days.
403 Forbidden

Is anyone having the same issue?

I tried reinstalling erminig and now, I'm not even able to add an account.

Here is the stack trace

Code:

Traceback (most recent call last):
  File "/opt/maemo/usr/share/erminig/profile_ui.py", line 388, account_selector_changed(selector=<hildon.TouchSelector object at 0x41e12e18 (HildonTouchSelector at 0x4bd6d8)>, user_data=0)
      current_google_account_selected = account_id
      update_remote_data_source(consts.SYNC_TYPE_CAL, account_id)
  variables: {'update_remote_data_source': ('global', <function update_remote_data_source at 0x416aad70>), 'account_id': ('local', 1), 'consts.SYNC_TYPE_CAL': ('global', <module 'consts' fr
  File "/opt/maemo/usr/share/erminig/profile_ui.py", line 291, update_remote_data_source(sync_type=0, google_acct_id=1)
        google_item_picker.set_sensitive(True)
        for id, title in google_api.get_all_calendars():
          logger.append("ID->")
  variables: {'id': ('builtin', <built-in function id>), 'google_api.get_all_calendars': ('global', <function get_all_calendars at 0x416aa570>), 'title': (None, None)}
  File "/opt/maemo/usr/share/erminig/google_api.py", line 80, get_all_calendars()
      feed = run_google_action(gd_client.GetAllCalendarsFeed)
      for i,cal in enumerate(feed.entry):
  variables: {'feed': (None, None), 'gd_client.GetAllCalendarsFeed': ('global', <bound method CalendarService.GetAllCalendarsFeed of <gdata.calendar.service.CalendarService object at 0x41e4
  File "/opt/maemo/usr/share/erminig/google_api.py", line 45, run_google_action(func=<bound method CalendarService.GetAllCalendarsFee...ar.service.CalendarService object at 0x41e402f0>>, *a
            logger.append(repr(e))
            raise ErminigGoogleError(e)
            return None
  variables: {'ErminigGoogleError': ('global', <class 'ErminigGoogleError.ErminigGoogleError'>), 'e': ('local', RequestError({'status': 403, 'body': '<HTML>\n<HEAD>\n<TITLE>Forbidden</TITLE
ErminigGoogleError: RequestError({'status': 403, 'body': '<HTML>\n<HEAD>\n<TITLE>Forbidden</TITLE>\n</HEAD>\n<BODY BGCOLOR="#FFFFFF" TEXT="#000000">\n<H1>Forbidden</H1>\n<H2>Error 403</H2>\
~
~


NerdKnight 2014-11-21 14:41

Re: [Announce] Erminig-NG: two-way synchronization Google Calendar <-> Fremantle Calendar
 
Apparently google changed the api, and the library used by Erminig-NG (gdata) is not updated: https://code.google.com/p/googlecl/issues/detail?id=567

darodi 2014-11-21 16:51

Re: [Announce] Erminig-NG: two-way synchronization Google Calendar <-> Fremantle Calendar
 
new libraries like this one require python >=2.6 :(

https://github.com/google/google-api-python-client

aperles 2014-12-07 23:27

Re: [Announce] Erminig-NG: two-way synchronization Google Calendar <-> Fremantle Calendar
 
Hello,

Some guy has solved this issue?
Or I should move to other options like Nueva Calendar Sync?

Regards,
Àngel


Quote:

Originally Posted by darodi (Post 1448585)
I'm having problems with erminig-ng for a few days.
403 Forbidden

Is anyone having the same issue?


hardkorek 2015-01-14 17:38

Re: [Announce] Erminig-NG: two-way synchronization Google Calendar <-> Fremantle Calendar
 
I do have problem as well


All times are GMT. The time now is 10:11.

vBulletin® Version 3.8.8