Gladys 4 - Service CalDAV

Nickel, it works now

Thanks a lot

Hello, new to Gladys!
The first thing I set up is the synchronization of my Framagenda (Nextcloud) calendar on Gladys, and it seems to work.
But the question I ask myself is: wouldn’t it be possible to put the day’s agenda on the dashboard, make a kind of focus, todo…?

Hello @Einstein8854!

This is not currently possible.

If you want, we have a « Feature Requests » category on the forum where you can make this request if you would like it to be included in a future version of Gladys :slight_smile:

Hello everyone,

I’m having an issue while syncing Google Calendar.. I haven’t found if anyone has already encountered this problem.

I managed to set everything up thanks to the Gladys doc guide… but when I’m on my Agenda Dashboard, I only see one of my calendars displayed.
However, they are apparently all synchronized and checked:

I only have the Sophie schedule displayed on my interface:

I’m having the same issue on my end, only every other calendar is displayed

@guim31 If you launch the synchronization and look at the logs at the same time, no particular issues?

docker logs gladys -f

Where does this calendar come from?

@spenceur Same questions for you

It seems I saw some. I’ll check it out as soon as possible

Update:

2022-02-25T10:45:33+0100 <info> calendar.requests.js:52 () CalDAV : Found calendar xxxxxxxx
2022-02-25T10:45:33+0100 <info> calendar.syncUserCalendars.js:38 (CalDAVHandler.syncUserCalendars) CalDAV : Found 5 calendars.
2022-02-25T10:45:33+0100 <error> index.js:52 (Timeout.syncAllUsers [as _onTimeout]) UniqueConstraintError [SequelizeUniqueConstraintError]: Validation error
    at Query.formatError (/src/server/node_modules/sequelize/lib/dialects/sqlite/query.js:409:16)
    at Query._handleQueryResponse (/src/server/node_modules/sequelize/lib/dialects/sqlite/query.js:72:18)
    at Statement.afterExecute (/src/server/node_modules/sequelize/lib/dialects/sqlite/query.js:246:27) {
  errors: [
    ValidationErrorItem {
      message: 'selector must be unique',
      type: 'unique violation',
      path: 'selector',
      value: 'xxxxxxx',
      origin: 'DB',
      instance: [t_calendar],
      validatorKey: 'not_unique',
      validatorName: null,
      validatorArgs: []
    }
  ],
  fields: [ 'selector' ],
  parent: [Error: SQLITE_CONSTRAINT: UNIQUE constraint failed: t_calendar.selector] {
    errno: 19,
    code: 'SQLITE_CONSTRAINT',
    sql: 'INSERT INTO `t_calendar` (`id`,`user_id`,`service_id`,`name`,`selector`,`external_id`,`description`,`sync`,`notify`,`ctag`,`sync_token`,`color`,`created_at`,`updated_at`) VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14);'
  },
  original: [Error: SQLITE_CONSTRAINT: UNIQUE constraint failed: t_calendar.selector] {
    errno: 19,
    code: 'SQLITE_CONSTRAINT',
    sql: 'INSERT INTO `t_calendar` (`id`,`user_id`,`service_id`,`name`,`selector`,`external_id`,`description`,`sync`,`notify`,`ctag`,`sync_token`,`color`,`created_at`,`updated_at`) VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14);'
  },
  sql: 'INSERT INTO `t_calendar` (`id`,`user_id`,`service_id`,`name`,`selector`,`external_id`,`description`,`sync`,`notify`,`ctag`,`sync_token`,`color`,`created_at`,`updated_at`) VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14);'
}
2022-02-25T10:45:50+0100 <info> scene.actions.js:267 (Object.user.check-presence) CheckUserPresence action: No devices of the user "jennifer" were seen in the last 10 minutes.
2022-02-25T10:45:50+0100 <info> scene.actions.js:270 (Object.user.check-presence) CheckUserPresence action: Set "jennifer" to left home of house "home"
2022-02-25T10:45:53+0100 <info> device.calculateAggregate.js:38 (DeviceManager.calculateAggregate) Calculating aggregates device feature state for interval hourly
2022-02-25T10:46:23+0100 <info> device.calculateAggregate.js:105 (ChildProcess.<anonymous>) device.calculateAggregate: Finishing processing for interval hourly
2022-02-25T10:46:23+0100 <info> device.calculateAggregate.js:38 (DeviceManager.calculateAggregate) Calculating aggregates device feature state for interval daily
2022-02-25T10:46:31+0100 <warn> handleMqttMessage.js:100 () Zigbee2mqtt device 0x00158d0002bfa014, feature linkquality not configured in Gladys.
2022-02-25T10:46:35+0100 <warn> handleMqttMessage.js:100 () Zigbee2mqtt device 0x00158d0002bfa014, feature linkquality not configured in Gladys.
2022-02-25T10:46:38+0100 <info> device.calculateAggregate.js:105 (ChildProcess.<anonymous>) device.calculateAggregate: Finishing processing for interval daily
2022-02-25T10:46:38+0100 <info> device.calculateAggregate.js:38 (DeviceManager.calculateAggregate) Calculating aggregates device feature state for interval monthly
2022-02-25T10:46:54+0100 <info> device.calculateAggregate.js:105 (ChildProcess.<anonymous>) device.calculateAggregate: Finishing processing for interval monthly
2022-02-25T10:49:33+0100 <warn> handleMqttMessage.js:100 () Zigbee2mqtt device 0x54ef4410000c1618, feature illuminance not configured in Gladys.
2022-02-25T10:49:33+0100 <warn> handleMqttMessage.js:100 () Zigbee2mqtt device 0x54ef4410000c1618, feature linkquality not configured in Gladys.
2022-02-25T10:50:50+0100 <info> scene.actions.js:267 (Object.user.check-presence) CheckUserPresence action: No devices of the user "jennifer" were seen in the last 10 minutes.
2022-02-25T10:50:50+0100 <info> scene.actions.js:270 (Object.user.check-presence) CheckUserPresence action: Set "jennifer" to left home of house "home"
2022-02-25T10:51:00+0100 <info> scene.actions.js:267 (Object.user.check-presence) CheckUserPresence action: No devices of the user "vincent" were seen in the last 15 minutes.
2022-02-25T10:51:00+0100 <info> scene.actions.js:270 (Object.user.check-presence) CheckUserPresence action: Set "vincent" to left home of house "home"
2022-02-25T10:51:56+0100 <warn> handleMqttMessage.js:104 (Zigbee2mqttManager.handleMqttMessage) Zigbee2mqtt device 0x00158d00058a4293 not configured in Gladys.
2022-02-25T10:53:55+0100 <info> calendar.requests.js:52 () CalDAV : Found calendar My Calendar
2022-02-25T10:53:55+0100 <info> calendar.requests.js:52 () CalDAV : Found calendar Inbox
2022-02-25T10:53:55+0100 <info> calendar.requests.js:52 () CalDAV : Found calendar
Xxxxxxxxx
2022-02-25T10:53:55+0100 <info> calendar.requests.js:52 () CalDAV : Found calendar Fériés
2022-02-25T10:53:55+0100 <info> calendar.requests.js:52 () CalDAV : Found calendar xxxxxxxxxx
2022-02-25T10:53:55+0100 <info> calendar.syncUserCalendars.js:38 (CalDAVHandler.syncUserCalendars) CalDAV : Found 5 calendars.

Database uniqueness issue
:frowning:

Sorry for the superfluous information in the logs ^^

For my part, no bugs in the logs (unless I’m not looking in the right place maybe):
The command:
docker logs gladys
Returns:

2022-02-25T15:52:58+0100 <info> calendar.requests.js:52 () CalDAV : Found calendar Agenda Sophie
2022-02-25T15:52:58+0100 <info> calendar.requests.js:52 () CalDAV : Found calendar SPORT
2022-02-25T15:52:58+0100 <info> calendar.requests.js:52 () CalDAV : Found calendar Famille
2022-02-25T15:52:58+0100 <info> calendar.requests.js:52 () CalDAV : Found calendar Planning Romélie - Nounou
2022-02-25T15:52:58+0100 <info> calendar.requests.js:52 () CalDAV : Found calendar Jours fériés en France
2022-02-25T15:52:58+0100 <info> calendar.requests.js:52 () CalDAV : Found calendar Pro - Standard
2022-02-25T15:52:58+0100 <info> calendar.syncUserCalendars.js:38 (CalDAVHandler.syncUserCalendars) CalDAV : Found 7 calendars.

The UI tells me this:

That’s very helpful :slight_smile: What are the names of your calendars? Could there be two calendars with very similar names, for example?

It looks good on your side :slight_smile:

Which calendar service are you using? (I mean, which provider)

I use Google Calendar

Ok! I use the same and I feel like sometimes their API doesn’t send all the events

Often, when I connect Gladys, it takes several days to come, as if their backend « limits » the number of entries you can sync.

How long have you been connected to this calendar?

Did you connect it just once or did you disconnect/reconnect to see if it solves your problem?

It’s only been 2 days, I never took the time to set everything up (two-factor authentication / app password). So it’s very recent, I’ll monitor it over the days!

Hmmm I’m embarrassed but I actually had two calendars with the same name on Synology, my bad
The display of both calendars is okay

It’s not your fault, it’s also a bit abnormal that two calendars with the same name should block synchronization to this extent :slight_smile:

This is a known issue, and I had started development to allow this kind of thing, but it’s a lot of work.

On the Gladys side, we could maybe add a « 2 » to the second calendar, but then how to differentiate the two calendars?

In general, I don’t know if it’s very useful to have two calendars with exactly the same name (I wonder how you manage not to get confused right now ^^)

Actually, I only use one, the one that isn’t deactivated :winking_face_with_tongue:.
That’s why I don’t make mistakes ^^'.
Thanks anyway! I’m preparing my calendars for a new feature that’s coming:smiley:.

I merged the first part a few minutes ago :slight_smile:

Hello after a few checks here’s what I notice:

I have 3 active calendars:

  • Birthday (everything is OK)
  • Personal calendar (everything seems OK)
  • Public holidays (the drama)

In the last one, I simply have no display on Gladys.

While it seems to have imported the events.

And during the first import, I always have this error that pops up with 0 logs

I reproduce it every time I reset and resync

Any ideas? :frowning:

For info, public holidays are created via this data

Update:

Using this data everything is OK

Strange :thinking:

By chance, is it complicated to allow the user to choose the display to start the week on Monday (European style)?

Thanks for the source @spenceur, with that I can try to reproduce and investigate

I think it was the case before, it must be a regression since the transition from moment to dayjs, I’m looking into it as well

For information, I just proposed the fix for displaying the first day of the week (I started with the easiest one)
https://github.com/GladysAssistant/Gladys/pull/1446