Custom Widget for upcoming Events/Appointments

Hi friends,
I have a script which generate a JSON file from my Office 365 and Nextcloud appointments and stores the file on the the OpenHab Server. Calling http://openhab:8080/static/events.json gives me back the json-content. How can I use the data inside of a custom widget ?


As you can see in the screenshot, the resource is interpreted as Document but transferred with MIME type application/json, could this be an issue?
Hope anyone could help me to serialize the json as a java-script :slight_smile:

Now I´ve tried to put the content of the events.json into an item and simply put it in the ng-init.

<div ng-init="a = getItem('EventsJSON').state">	
  {{a }}
</div>

but it is interpreted as a string - which I can fully understand. Is there an Angular trick to serialize it when it comes from an item state ?

Try $eval:

I’d be interested to know how you get access to your outlook.com calendar? I didn’t know there was a way?

In general you could use the Office Graph API to access your calendar events : https://developer.microsoft.com/en-US/graph/docs/api-reference/v1.0/resources/calendar

In my approach I am using a public Calendar URL to access the calendar, I download the calendar in *.ics Format an then convert it to a JSON string and put the value inside of a Item in OpenHAB.

For now it looks ugly, but maybe someone has some ideas how to design it better :slight_smile: