Library

We have an extensive library of various bOS configuration examples. Select your heating pump, AC, TV or almost any other device and import it to your smart building configuration. We also encourage all system integrators and DIYs to add their own examples to ComfortClick library.

iCal Calendar to bOS with Node-RED icon

iCal Calendar to bOS with Node-RED

Recive Event informations from an iCal Web-Calendar

Author: Mr

DOWNLOAD

This example shows how to get Calendar information from an iCal Web Calendar like the Google Calendar into bOS. This example also shows in general how to build an simple API in Node-RED to get any information from Node-RED into bOS.

Implementation

Requirements

To use this example Node-RED Server needs to be running and running bOS server. Furthermore you need a link to your iCal Calendar like this Google Calendar link. https://calendar.google.com/calendar/ical/yyyyyyyyyyyyyyyyyyyyyyyyyy%40group.calendar.google.com/private-xxxxxxxxxxxxxxxxxxxxx/basic.ics.

Importing the bOS Config

The Calendar.bos contains a implied bOS Backup. We only need the Calendar device (based on the HTTP Driver) and some Color Templates.

Import Color Tamplates

With these Colors you can change the look of the Frames to your project.

Import Device

As seen on Picture 3 and Picture 4 we have to change the number of the Cfg_DayNum for all Days. If you need the events from more than five day you can copy an existing Day, renamed it and set the Cfg_DayNum.

Setup Day0 Setup Day1

Cfg_DayNum = 0 -> is today
Cfg_DayNum = 1 -> is tomorrow
Cfg_DayNum = 2 -> is day after tomorrow
and so on.
This allows you to change the requested day at runtime. For Example you can display the next week.

Setup the Node-RED IP Address and Port

Setup HTTP Driver

This can be found in the browser address line

Imput the Cfg_UpdateEvetnEndpoind = UpdateEvetns. And setup the Cfg_CalNum to 1.

Setup Calendar Cfg_xxxxx variables

This is used by the "UpdateDay" Command for each day. If you want to use more than one Calendar please count Cfg_CalNum to 2,3 and so on.

With the "Cfg_HoursOffest" we can adopt the Start and End time to our time zone if needed.

Importing and setup Node-RED

Firt we need to install the "node-red-contrib-ical-events" palette.

Install Nodes

Importing the Flow with the .json you find in the downloaded *.zip file.

Import Flow Import Flow

After importing the Flow we have to adopt some of the nodes. For every Calendar in bOS we need to configure the corresponding Calendar node.

Setup iCal Node

Now we can run "UpdateAll" and the iCal is updated and the days are updated as well. The Node-RED Debug-Log should have message for everyday the message should look like in the picture.

Node-RED log

Comments

Please login to post a comment.

This website uses cookies

We use cookies to personalize content, use live chat, provide social media features and to analyze our traffic. We also share information about your use of our site with analytics partners who may combine it with other information that you’ve provided to them or that they’ve collected from your use of their services.