naimo84 / node-red-contrib-ical-events

Node-RED module to get events from a iCal Calender (Google e.g.), icloud or Caldav Server via kalender-events
MIT License
47 stars 11 forks source link

Change Time Zone SensorNode #84

Closed TimVanBruyssel closed 2 years ago

TimVanBruyssel commented 3 years ago

Now we only have UTC time (Z) in the Sensor Node but not the local time.

Plebster commented 3 years ago

yes, I would second this, since moving to British Summer Time (GMT+1) this node has been an hour behind on it's display and hasn't picked up any calendar events. Unfortunately I've had to remove it

naimo84 commented 3 years ago

Hi folks,

can you provide me some more information, please? What version are you using? What kind of calendar? Caldav, icloud or ical?

With the latest beta, TZ set to Europe/London and Google Calendar, I seems to work correctly :/

image image image

Example (please provide your own URL):

[{"id":"9083dbc9.37d348","type":"inject","z":"b5e5b41c.cd7bd8","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":160,"y":60,"wires":[["f496f92a.086a08"]]},{"id":"6a631f8a.bb775","type":"debug","z":"b5e5b41c.cd7bd8","name":"always","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":630,"y":60,"wires":[]},{"id":"f496f92a.086a08","type":"ical-sensor","z":"b5e5b41c.cd7bd8","confignode":"855efa10.f6eca8","timeout":"20","timeoutUnits":"minutes","name":"","trigger":"always","filterProperty":"attendee","filterOperator":"between","combineResponse":false,"filter2":"","filter":".*tyris.*","x":310,"y":60,"wires":[["a7cda272.c8498"],[]]},{"id":"a7cda272.c8498","type":"change","z":"b5e5b41c.cd7bd8","name":"Change node","rules":[{"t":"set","p":"payload.eventStart2","pt":"msg","to":"$moment(msg.payload.eventStart).tz(\"Europe/London\").format('LLLL')","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":480,"y":60,"wires":[["6a631f8a.bb775"]]},{"id":"855efa10.f6eca8","type":"ical-config","url":"https://calendar.google.com/calendar/","caldav":"","caltype":"ical","name":"go","replacedates":false,"usecache":false,"username":"","password":"","calendar":"","pastWeeks":"0","futureWeeks":"4"}]

Greets, Benjamin

Plebster commented 3 years ago

I have copied your flow, changed calendar to mine... a public link from my iCloud account... using iCal

nodered: v1.2.9 in docker, time set to Europe/ London node-red-contrib-ical-events 0.23.0

Still showing Z time and not local, although now picking up events

Screenshot 2021-04-15 at 08 53 08

I will check out how it works over the day and let you know

naimo84 commented 3 years ago

If you like to test the newest beta version of my node, you can download a .tgz file from here https://github.com/naimo84/node-red-contrib-ical-events/releases/download/v1.0.0-beta.5/node-red-contrib-ical-events-1.0.0-beta.5.tgz

The Sensor only returns msg.on=true, if an event is currently running (eventStart <= now <= eventEnd). Otherweise false. (https://github.com/naimo84/node-red-contrib-ical-events#sensor)

If you wan't to see upcoming event, please have a look at the upcoming node.

I hope, this helps you.

I'll also check the behaviour of the v0.23.0.

naimo84 commented 3 years ago

Hi,

I've released v1.1.0. May you have a look at it? If you like the node, leave it a star ⭐ Thanks.

And I'll close the issue for now, because I think it schould be solved. Feel free to reopen it.

Greetings, Benjamin

TimVanBruyssel commented 2 years ago

Hi,

I have updated from V1.3 to v1.5.2 and since then the node-red-contrib-ical-events module no longer works.

naimo84 commented 2 years ago

Hi @TimVanBruyssel,

can you provide me some more Information? What's not working? the complete node? I'm sure, I've overseen something ;) Greets, Benjamin

image

TimVanBruyssel commented 2 years ago

Yes the complete node. I don't see any icons of the Ical Events anymore. The icons of Ical that I have already used in my project have also disappeared.

naimo84 commented 2 years ago

That sounds really strange... Can you send me the node-red logs? Here or via mail? Perhaps there are some useful hints in it ;)

Some more informations would be great: what node-red and nodejs version are you using?

I did check an update on linux, node-red 2.1.3 and nodejs v14.15.1.

The update from 1.3.0 to 1.5.2 worked as expected 😒

UPDATE: Also on Windows from 1.2.7 to 1.5.2... 6 Dec 12:57:22 - [info] Node-RED version: v1.3.5 6 Dec 12:57:22 - [info] Node.js version: v13.11.0