Dashticz - Module - Calendar

Dashticz, alternative dashboard based on HTML, CSS, jQuery

Moderators: leecollings, htilburgs, robgeerts

User avatar
wizjos
Posts: 78
Joined: Monday 07 March 2016 19:35
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Dashticz - Module - Calendar

Post by wizjos »

It would be nice to have the calendar display the endtime as well, and even better, when an appointment lasts the whole day let that be displayed too 8-)
Just made something:
calender all day and endtime.PNG
calender all day and endtime.PNG (11.97 KiB) Viewed 3243 times

Code: Select all

				if(_ICALENDAR_DATEFORMAT == 'friendly') {
					var widget = '<div style="color:'+event.color+';">' + moment(date+' '+time,'DD/MM/YYYY HH:mm').locale(_ICALENDAR_LOCALE).calendar() + ' - <b>' + event.SUMMARY + '</b></div>';	
				} 
				else { 
					if (date == enddate) {
						var widget = '<div style="color:'+event.color+'">' + moment(date+' '+time,'DD/MM/YYYY HH:mm').format(_ICALENDAR_DATEFORMAT) + ' - ' + endtime + ' - <b>' + event.SUMMARY + '</b></div>';
					} else {
						if (enddate.substring(0,2)-date.substring(0,2)==1) {
							var widget = '<div style="color:'+event.color+'">' +  moment(date,'DD/MM/YYYY').format('DD-mm-YYYY') + ' Hele dag&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - <b>' + event.SUMMARY + '</b></div>';
						} else {
							var widget = '<div style="color:'+event.color+'">' + moment(date+' '+time,'DD/MM/YYYY HH:mm').format(_ICALENDAR_DATEFORMAT) + ' - ' + moment(enddate+' '+endtime,'DD/MM/YYYY HH:mm').format(_ICALENDAR_DATEFORMAT)+ ' - <b>' + event.SUMMARY + '</b></div>';
						}
					}
				}
Perhaps it needs some overhauling, but this is the general idea...

And come to speak of it: I cannot read my calendar directly since it does not support ICS... Solution that works for me is copying the database file (sqlite) to Dashticz and read from there... Works but is not very elegant. Made a link in hte calendar to display the complete and editable calendar with the use of caldavZap. Nice product and able to connect correctly. Any chance in implementing something like this?

BTW The reason I cannot connect directly is because the call made from Dashticz does not support the use of a username/password in the url (Digest authentication problems)

Regards,
Wizjos
User avatar
mvveelen
Posts: 678
Joined: Friday 31 October 2014 10:22
Target OS: NAS (Synology & others)
Domoticz version: Beta
Location: Hoorn, The Netherlands
Contact:

Re: Dashticz - Module - Calendar

Post by mvveelen »

Rob is doing the best he can, so be patient. He is aware of the issues. One big step forward today with the latest beta :)
RPi3b+/RFXCOM rfxtrx433E/Shelly/Xiaomi Gateway/Philips HUE Lights/Atag Zone One/2 SunnyBoy inverters/AirconWithMe/P1 smartmeter/Domoticz latest Beta
madrian
Posts: 231
Joined: Saturday 27 August 2016 1:18
Target OS: -
Domoticz version:
Contact:

Re: Dashticz - Module - Calendar

Post by madrian »

Repeating events -recurrence- is quite hard to add.

RRULE:FREQ

https://github.com/jakubroztocil/rrule

or search for "recurrence" parsing. ✋
lukev
Posts: 66
Joined: Friday 21 October 2016 10:42
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Dashticz - Module - Calendar

Post by lukev »

I noticed that the calendar is available from outside my house without logging in whatsoever. Maybe that's something to take in consideration when using this block!
User avatar
EdwinK
Posts: 1820
Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:

Re: Dashticz - Module - Calendar

Post by EdwinK »

That would indeed not be a good idee. Thanks for the warning.
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
robgeerts
Posts: 1273
Joined: Saturday 24 January 2015 22:12
Target OS: NAS (Synology & others)
Domoticz version: 3.7067
Location: NL
Contact:

Re: RE: Re: Dashticz - Module - Calendar

Post by robgeerts »

lukev wrote:I noticed that the calendar is available from outside my house without logging in whatsoever. Maybe that's something to take in consideration when using this block!
Yes it is.... but people need to know the exact url of your calender...
lukev
Posts: 66
Joined: Friday 21 October 2016 10:42
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Dashticz - Module - Calendar

Post by lukev »

Is that so? If I check my dashboard with a device on 4g, it does show my calendar? No need to know the url of my Gmail calendar. And my dashticz url is not that hard to guess ;-)
User avatar
mvveelen
Posts: 678
Joined: Friday 31 October 2014 10:22
Target OS: NAS (Synology & others)
Domoticz version: Beta
Location: Hoorn, The Netherlands
Contact:

Re: Dashticz - Module - Calendar

Post by mvveelen »

Do you guys have your dashboard accessible externally ?! Why ?
RPi3b+/RFXCOM rfxtrx433E/Shelly/Xiaomi Gateway/Philips HUE Lights/Atag Zone One/2 SunnyBoy inverters/AirconWithMe/P1 smartmeter/Domoticz latest Beta
robgeerts
Posts: 1273
Joined: Saturday 24 January 2015 22:12
Target OS: NAS (Synology & others)
Domoticz version: 3.7067
Location: NL
Contact:

Re: RE: Re: Dashticz - Module - Calendar

Post by robgeerts »

lukev wrote:Is that so? If I check my dashboard with a device on 4g, it does show my calendar? No need to know the url of my Gmail calendar. And my dashticz url is not that hard to guess ;-)
Ah thats what you mean.... but i think its worse people can access your dashboard then only your calendar...
robgeerts
Posts: 1273
Joined: Saturday 24 January 2015 22:12
Target OS: NAS (Synology & others)
Domoticz version: 3.7067
Location: NL
Contact:

Re: RE: Re: Dashticz - Module - Calendar

Post by robgeerts »

mvveelen wrote:Do you guys have your dashboard accessible externally ?! Why ?
I can access it externally too... but I just use that for demo purposes ;)
User avatar
mvveelen
Posts: 678
Joined: Friday 31 October 2014 10:22
Target OS: NAS (Synology & others)
Domoticz version: Beta
Location: Hoorn, The Netherlands
Contact:

Re: Dashticz - Module - Calendar

Post by mvveelen »

Yeah, but if people don't want their calendars to be accessible, then just don't make your dashboard accessible. People can switch your lights, know when you're at home, just block it all if you don't want people to access anything. Right?
RPi3b+/RFXCOM rfxtrx433E/Shelly/Xiaomi Gateway/Philips HUE Lights/Atag Zone One/2 SunnyBoy inverters/AirconWithMe/P1 smartmeter/Domoticz latest Beta
lukev
Posts: 66
Joined: Friday 21 October 2016 10:42
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Dashticz - Module - Calendar

Post by lukev »

mvveelen wrote:Yeah, but if people don't want their calendars to be accessible, then just don't make your dashboard accessible. People can switch your lights, know when you're at home, just block it all if you don't want people to access anything. Right?
Dashboard is on my webserver so accesable. But all the switches and domoticz info isn't visible, only the weather, Clock, traffic, etc. And the calendar ;-)
blacksn0w
Posts: 99
Joined: Friday 10 March 2017 22:27
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Germany
Contact:

blacksn0w

Post by blacksn0w »

lukev wrote:
mvveelen wrote:Yeah, but if people don't want their calendars to be accessible, then just don't make your dashboard accessible. People can switch your lights, know when you're at home, just block it all if you don't want people to access anything. Right?
Dashboard is on my webserver so accesable. But all the switches and domoticz info isn't visible, only the weather, Clock, traffic, etc. And the calendar ;-)
To be honest, following your argumentation the switches and all other Domoticz things aren't visible. But who will stop people from looking into your CONFIG.js, find the info about your Domoticz installation and go to the Domoticz backend? Leaving this unprotected in the net is more then careless.

Edit: lol,you are really doing this, do you think this login mask will stop anyone?
Image

Edit2: Never Thought someone would be that dumb, after having access to your config, there were some credentials to log in, tried them at your domoticz Installation, and now im in. Goddamn, secure your shit!
Image
Migration done, hello Home Assistant.
tontze
Posts: 317
Joined: Thursday 12 January 2017 15:30
Target OS: Linux
Domoticz version: Beta Ch
Location: Finland
Contact:

Re: Dashticz - Module - Calendar

Post by tontze »

Im having some difficulties .. Im trying to add our football teams calendar .. So far :

Code: Select all

var calendars = {}
calendars.hd = { url: 'https://some_url/file/all.ics', icalurl: 'some_url/file/all.ics' }

columns[40]['blocks'] = [calendars.hd]

Anything to fix here ?
-----------------------------------------
Smartthings
zigbee2mqtt
RFLink 433mhz / Nrf 2.4Ghz
Mi Light
esp8266MiLight Hub
OpenHab/HomeAssistant/Domoticz
HP T610 & Debian 5.10.19-1 x86_64[/b]
robgeerts
Posts: 1273
Joined: Saturday 24 January 2015 22:12
Target OS: NAS (Synology & others)
Domoticz version: 3.7067
Location: NL
Contact:

Re: Dashticz - Module - Calendar

Post by robgeerts »

Try adding this in front of the icalurl:

https://cors-anywhere.herokuapp.com/

So:
https://cors-anywhere.herokuapp.com/htt ... to/all.ics

But there is a new version coming soon.
tontze
Posts: 317
Joined: Thursday 12 January 2017 15:30
Target OS: Linux
Domoticz version: Beta Ch
Location: Finland
Contact:

Re: Dashticz - Module - Calendar

Post by tontze »

robgeerts wrote:Try adding this in front of the icalurl:

https://cors-anywhere.herokuapp.com/

So:
https://cors-anywhere.herokuapp.com/htt ... to/all.ics

But there is a new version coming soon.
That didnt make any difference, problem is, that i dont see anything at all about the calendar. Not frames, graphics, nothing, shouldnt i atleast see some headers or such ?

Im with the beta btw
-----------------------------------------
Smartthings
zigbee2mqtt
RFLink 433mhz / Nrf 2.4Ghz
Mi Light
esp8266MiLight Hub
OpenHab/HomeAssistant/Domoticz
HP T610 & Debian 5.10.19-1 x86_64[/b]
robgeerts
Posts: 1273
Joined: Saturday 24 January 2015 22:12
Target OS: NAS (Synology & others)
Domoticz version: 3.7067
Location: NL
Contact:

Re: Dashticz - Module - Calendar

Post by robgeerts »

Is the 40 right in columns [40]?
tontze
Posts: 317
Joined: Thursday 12 January 2017 15:30
Target OS: Linux
Domoticz version: Beta Ch
Location: Finland
Contact:

Re: Dashticz - Module - Calendar

Post by tontze »

robgeerts wrote:Is the 40 right in columns [40]?
Am i making fool of myself here, i do use 10 increments in columns, does it matter ?

I have like 10, 20, 30,40 so i can add something between if i want to ? So 40 is 4th column ..
-----------------------------------------
Smartthings
zigbee2mqtt
RFLink 433mhz / Nrf 2.4Ghz
Mi Light
esp8266MiLight Hub
OpenHab/HomeAssistant/Domoticz
HP T610 & Debian 5.10.19-1 x86_64[/b]
robgeerts
Posts: 1273
Joined: Saturday 24 January 2015 22:12
Target OS: NAS (Synology & others)
Domoticz version: 3.7067
Location: NL
Contact:

Re: Dashticz - Module - Calendar

Post by robgeerts »

Could you send me your config.js (withouth api keys etc..) ?
tontze
Posts: 317
Joined: Thursday 12 January 2017 15:30
Target OS: Linux
Domoticz version: Beta Ch
Location: Finland
Contact:

Re: Dashticz - Module - Calendar

Post by tontze »

robgeerts wrote:Could you send me your config.js (withouth api keys etc..) ?
Here you go :)

Code: Select all

var _LANGUAGE                   = 'en_US'; //or: en_US, fr_FR, hu_HU
var _HOST_DOMOTICZ              = 'http://xxx.xxx.xxx:8080';
var _DOMOTICZ_REFRESH           = 5; //in seconds
var _DASHTICZ_REFRESH           = 30; //in minutes
var _THEME                      = 'default'; // default = dashticz default theme
/*
IF YOU HAVE A MEDIABOX FROM ZIGGO (HORIZON), COPY SWITCH_HORIZON.PHP ON A WEBSERVER INSIDE YOUR NETWORK AND CHANGE THE IP.
ENTER THE PATH TO THIS FILE BELOW.
*/
var _HOST_ZIGGO_HORIZON                 = ''; //e.g. http://192.168.1.3/domoticz/switch_horizon.php';
var _APIKEY_WUNDERGROUND                = '';
var _WEATHER_CITY                       = 'Tampere';
var _WEATHER_CITYNAME                   = ''; //show a different city name, leave empty if same as _WEATHER_CITY
var _WEATHER_COUNTRY                    = 'FI';
var _USE_AUTO_POSITIONING               = false; //don't want to configure positions, use auto positioning
var _USE_FAVORITES                      = false; //only used when using auto positioning
var _HIDE_SECONDS_IN_CLOCK              = false; //do not show the seconds in the clock
var _HIDE_MEDIAPLAYER_WHEN_OFF          = false; //when you have a mediaplayer connected, hide it if nothing is playing
var _NEWS_RSSFEED                       = 'http://feeds.feedburner.com/ampparit-kaikki-rss';
var _USE_FAHRENHEIT                     = false;
var _USE_BEAUFORT                       = false; //Bft instead of m/s
var _TRANSLATE_SPEED                    = false; //windspeed, north northwest instead of NNW
var _STANDBY_AFTER_MINUTES              = 10; //enter amount of minutes like: 5 (5 minutes)
var _SCROLL_NEWS_AFTER                  = 7000; //milliseconds, so 7000 is 7 seconds
var _SHOW_LASTUPDATE                    = true;
var _LASTUPDATE_FORMAT                  = 'DD-MM-YY HH:mm';
var _SCREENSLIDER_EFFECT                = 'slide'; //'slide' or 'fade' or 'cube' or 'coverflow' or 'flip'

var _APIKEY_MAPS                        = '';
var _MAPS_LATITUDE                      = '';
var _MAPS_LONGITUDE                     = '';

var _AUTO_SWIPEBACK_TO                  = 1; //when no activity, swipe back to main screen after x seconds
var _AUTO_SWIPEBACK_TIME                = 10; //seconds

//predefined colors, when you have RGB-lamps
var _SAVED_COLORS = ['black', 'white', 'blanchedalmond','rgb(255, 128, 0);', 'hsv 100 70 50', 'lightyellow'];

// Online Radio Stream Plugin, Note: you must enable  plugin in column section 'streamplayer', see columns[3]['blocks'] example below.
var _STREAMPLAYER_TRACKS        = [
                                                                {"track":1,"name":"Music FM","file":"http://stream.musicfm.hu:8000/musicfm.mp3"},
                                                                {"track":2,"name":"Radio 1","file":"http://213.181.210.106:8000/high.mp3"},
                                                                {"track":3,"name":"Test FM","file":"http://213.181.210.106:8000/high.mp3"},
                                                          ];

// iCalendar Plugin, supports all .ics calendar types like Google Calendar, Apple Calendar
//var _ICALENDAR_URL                    = 'https://testurl.com/ical.ics'; //supports .ics type calendars (Google Calendar, Apple Calendar etc.)
//var _ICALENDAR_DATEFORMAT     = 'friendly'; //'friendly', 'MM.DD.YYYY HH:mm', 'DD.MM.YYYY HH:mm', 'YYYY.MM.DD HH:mm'
//var _ICALENDAR_LOCALE         = 'en'; //en,hu, etc.

var calendars = {}
calendars.hobbydeed = { url: 'https://some_url/file/all.ics', icalurl: 'https://some_url/file/all.ics' }

//Buttons or images to open webpages in an iframe, like a news website or weather forecast
var buttons = {}

buttons.radio = {width:12, image: 'img/radio_on.png', title: 'Radio', url: 'http://livetaajuus.fi'}
buttons.nunl = {width:12, icon: 'fa-newspaper-o', title: 'Nu.nl', url: 'http://feeds.feedburner.com/ampparit-kaikki-rss'}
buttons.moon = {width:12, isimage:true, refreshimage:60000, image: 'moon'}


//CUSTOM POSITIONING:
//defining wich blocks to show, de numbers represents the IDX of the device in Domoticz
//only define if you want to use a custom width instead of the default

var blocks = {}

var columns = {}

// First Column
columns[10] = {}
columns[10]['blocks'] = ['clock','weather']
columns[10]['width'] = 4;
// Second Column
columns[20] = {}
columns[20]['blocks'] = ['weather']
columns[20]['width'] = 4;
// Fourth Column
columns[30] = {}
columns[30]['blocks'] = ['clock','sunrise','horizon','streamplayer',buttons.radio,buttons.nunl]
columns[30]['width'] = 2;
// Third Column
columns[25] = {}
columns[25]['blocks'] = [buttons.moon]
columns[25]['width'] = 2;

columns[40]['blocks'] = [calendars.hd]
var columns_standby = {}
columns_standby[1] = {}
columns_standby[1]['blocks'] = ['clock','weather']
columns_standby[1]['width'] = 12;

//if you want to use multiple screens, use the code below:
//var screens = {}
//screens[1] = {}
//screens[1]['background'] = 'bg1.jpg';
//screens[1]['background_morning'] = 'bg_morning.jpg';
//screens[1]['background_noon'] = 'bg_noon.jpg';
//screens[1]['background_afternoon'] = 'bg_afternoon.jpg';
//screens[1]['background_night'] = 'bg_night.jpg';
//screens[1]['columns'] = [1,2,3]

//screens[2] = {}
//screens[2]['background'] = 'bg3.jpg';
//screens[2]['background_morning'] = 'bg_morning.jpg';
//screens[2]['background_noon'] = 'bg_noon.jpg';
//screens[2]['background_afternoon'] = 'bg_afternoon.jpg';
//screens[2]['background_night'] = 'bg_night.jpg';
//screens[2]['columns'] = [4,5,6]
-----------------------------------------
Smartthings
zigbee2mqtt
RFLink 433mhz / Nrf 2.4Ghz
Mi Light
esp8266MiLight Hub
OpenHab/HomeAssistant/Domoticz
HP T610 & Debian 5.10.19-1 x86_64[/b]
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests