New Calendar add-on adaptor

With plenty of assistance and goodwill from @mstegeman, I published the Calendar add-on / adaptor.
This manages the working week, holidays and other events so that, for example, rules will not trigger a morning alarm on a public or personal holiday. With version 0.1.2, this provides integration with the Calendarific API to automatically download public holidays for the current and next calendar year.
I intend to add at least one further holiday API provider (please tell me if you know a good one).
I do think that the UI aspects could use some review from someone that is not me.

Sounds great! What countries are supported? Every country has different holidays. Is it regional? I assume Calendarific take care of that?

I tested with sg and with us-ny and both worked as far as I can tell. I will integrate at least one additional free api provider when I get time to do some research.

Of course, the main part of the add on does not care, it will support whatever you input for public holidays, personal holidays, or other events.

I documented what this addon does at https://github.com/chas-iot/calendar#readme
I would be grateful for a review of the UI, both the Thing and the configuration, as I know that I have blindspots.

I now think this addon is ‘complete’.
I added a 3rd very different holiday API provider and enhanced events to allow recurring annual events such as birthdays.

Hi, Chas,just seen your calender and it’s just what I need I think. Looks brilliant.

I’m only a week in with WT, so it’s a steep learning curve for me so I’ll apologise for what might sound stupid questions as it’s my lack of understanding not your software.

I’ve just installed it, on the drop-down I picked a provider, then got stuck. I don’t know where to look for the API KEY, COUNTRY CODE (UK) STATE REGION ( is this needed in UK) ETC. I am sure they need to be a universal format. Also what is the date list and its function. Really sorry for the questions but hope you can help me. Thanks Alex

Hi Alex,

I’m away from my computer for a few days, so parts of this are from memory.

Most importantly, it is not necessary to have a calendar API provider. You may add and remove holidays for the addon from the settings.

The date list provides information that you can use in WebThings rules to vary conditions. For example I have rules that turn on the lights every weekday morning at my alarm time. If today is a holiday, then the rules mean that the lights do not get turned on so that I can lie-in.

If you do want the convenience of an automatically updated date list, there are currently two supported calendar API providers. Each requires that you log into their website to register a free API key before you can get their list of holidays.

Once you have an API key, the provider needs to know for which country you will request holiday dates and, for larger countries, which state and/or region. For example in the USA, you would likely want both federal and state holidays; and in the UK, holidays in England are slightly different to Scotland/Wales/Northern Ireland. Each API provider covers different countries and regions.

Calendarific stopped working for me recently and I did not get an immediate response to my query. I will follow up on this when I return to my computer. I’m not certain if the issue is related to my account or to a change in the API - perhaps you could let me know your experience.

Hi Charles, sorry for calling you the wrong name initially.

Ok, thanks very much for taking time to explain this. But let’s say if I forget the API for now just to get the calendar “on screen” so I don’t choose a calendar provider. It asks for country , codes which I’m guessing is a universal standard. For example England, is 44 if we are talking phone codes, likewise London is 020. So are these the codes as I entered my specific codes in nothing happened. Should it have and where or how do I find the calender. I’d really appreciate a little more help with this if possible because I need things to happen differently at weekends than weekdays.

Plus from memory, I think I came across one of your posting ( sorry I can’t remember accurately) you’ve been using IKEA Zigbee devices. I’m hoping my ZB dongle arrives later today, if you was the person did you get them to work, are the devices which WT can control out of the box or do we need the IKEA hub and a few more tweaks. Again and info or help you can give would be appreciated. Thanks again Alex

Hi again, seems to have now decided to work I think, just testing it. So I think I’m ok with this , well for the moment.

But any advice on the IKEA devices and pairing them would be appreciated if you have come across them Charles. Thanks again. Alex

I think that you mention that you are in the UK, so the default working week should work for you. Mon-Fri working days, Sat. & Sun weekend.

So in the addon settings, you can skip the Working Week and Connection sections and go to Date List.

You may need to click on the + to bring up a new blank Date subsection - sorry can’t remember that step.

To fill in the Date subsection, you first type in a date, for example of a public holiday in the format 2021-12-25.

See https://github.com/chas-iot/calendar#readme for details of sub-section and how to fill it in. After reading it, please let me know if it is unclear at any point?

Plus + again to add further dates.

Regarding the Connection Details, these follow the API provider’s requirements. Typically the Country Code is the two character alphabetical code, eg GB for UK or SG for Singapore. The State / Region need research on the provider’s website and may not be required at all, depending on your location and needs.

Many thanks again, because been new to this I’m very grateful for your help and nuggets of advice like this.

Yes, and I think I get this now, thanks.

I’ll give it a go but at the moment her ladyship has a few jobs so better sort them out first . But your help has been so helpful. Thanks again Charles.:+1: