Page 84 of 184
Re: Dashticz v2.0, custom positioning and multiple screens
Posted: Saturday 29 April 2017 14:44
by wizjos
Great new feature this ical calender add-on. However, I've noticed some strange behaviour as to the time of my appointments. They all are 2 hours off. Found it had to do with the dates being converted to utc. With an extra function to correct this, the dates and times of my appointments are correct now.
Strange however is that my appointments are not ordered from new to old, but randomly it seems... Anyone else noticed similar behaviour?
Regards,
Wizjos
Re: Dashticz v2.0, custom positioning and multiple screens
Posted: Saturday 29 April 2017 14:59
by madrian
mvveelen wrote:madrian wrote:mvveelen wrote:Any users with an Apple calendar? Trying to get the calendar plugin to work, but nothing shows up.
Me.

config.js is correctly configured? Google Calendar works?
I added the URL (webcal://p29-calendars.icloud.com/published/2/nhsdjfgdsfgdsjfhfy3ef_DSgEIaCw_Tv6VZAn0xMLLCMhlEE-RIreVpahV4zKT-fE_XyvWaKHmFSf4cTYEptui-tRa1buriW7k)
^^
the URL is just an example
But in the config.js I use buttons.calendar (the config_default.js isn't clear about what else to use) and nothing is showing up. I'm not using a Google calendar, but an Apple calendar.
Are you on beta branch? buttons.calendar is not for this module.
See my previous post from yesterday:
https://www.domoticz.com/forum/viewtopi ... 20#p131601
Re: Dashticz v2.0, custom positioning and multiple screens
Posted: Saturday 29 April 2017 15:01
by madrian
wizjos wrote:Great new feature this ical calender add-on. However, I've noticed some strange behaviour as to the time of my appointments. They all
Regards,
Wizjos
Timezone problem, I am working on this, but first I am trying to implement support for repeating events.
Re: Dashticz v2.0, custom positioning and multiple screens
Posted: Saturday 29 April 2017 15:03
by mvveelen
madrian wrote:mvveelen wrote:madrian wrote:
Me.

config.js is correctly configured? Google Calendar works?
I added the URL (webcal://p29-calendars.icloud.com/published/2/nhsdjfgdsfgdsjfhfy3ef_DSgEIaCw_Tv6VZAn0xMLLCMhlEE-RIreVpahV4zKT-fE_XyvWaKHmFSf4cTYEptui-tRa1buriW7k)
^^
the URL is just an example
But in the config.js I use buttons.calendar (the config_default.js isn't clear about what else to use) and nothing is showing up. I'm not using a Google calendar, but an Apple calendar.
Are you on beta branch? buttons.calendar is not for this module.
See my previous post from yesterday:
https://www.domoticz.com/forum/viewtopi ... 20#p131601
Yes, I am. But what IS ?
What do I use to display the calendar?
Code: Select all
var _ICALENDAR_URL = 'https://p9-calendars.icloud.com/published/2/nuh36ehsdfsdfsdf4TyqqnRy3ef_DSgEIaCw_Tv6VZAn0xMLLCMhlEE-sdfhkjdf-tRa1buriW7k'; //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 = 'nl'; //en,hu, etc.
Is altered, but I'm missing the piece to display the calendar

Re: Dashticz v2.0, custom positioning and multiple screens
Posted: Saturday 29 April 2017 15:09
by madrian
Ahh, sorry:
Code: Select all
columns[3] = {}
columns[3]['blocks'] = ['icalendar']
columns[3]['width'] = 2;
Re: Dashticz v2.0, custom positioning and multiple screens
Posted: Saturday 29 April 2017 15:17
by wizjos
madrian wrote:wizjos wrote:Great new feature this ical calender add-on. However, I've noticed some strange behaviour as to the time of my appointments. They all
Regards,
Wizjos
Timezone problem, I am working on this, but first I am trying to implement support for repeating events.
Ive added this function to ical_parser.js
Code: Select all
function ConvertUTCTimeToLocalTime(UTCDateString)
{
var convertdLocalTime = new Date(UTCDateString);
var hourOffset = convertdLocalTime.getTimezoneOffset() / 60;
convertdLocalTime.setHours( convertdLocalTime.getHours() + hourOffset );
return convertdLocalTime;
}
and in function makedate altered the line
var utcdatems = Date.UTC(dtutc.year, (dtutc.month-1), dtutc.day, dtutc.hour, dtutc.minute);
in
Code: Select all
var utcdatems = ConvertUTCTimeToLocalTime(Date.UTC(dtutc.year, (dtutc.month-1), dtutc.day, dtutc.hour, dtutc.minute));
Hope it helps...
Regards,
Wizjos
Re: Dashticz v2.0, custom positioning and multiple screens
Posted: Saturday 29 April 2017 15:30
by pvdhelm

- font.png (91.11 KiB) Viewed 1820 times
where can i change the fontsize of the text 'er wordt momenteel niets afgespeeld" and "Grouped"
On my pc eveerything looks ok, but on my ipad pro the text is out of the box
greets patrick
Re: Dashticz v2.0, custom positioning and multiple screens
Posted: Saturday 29 April 2017 15:34
by madrian
Excellent, thank you very much.
I did not experienced any problem with the timezone, I am in Budapest timezone UTC+1, in DST +2.
Items not in order, I tested, it's ok here:

- Calendar_and_Dashticz.jpg (37.47 KiB) Viewed 1820 times
Re: Dashticz v2.0, custom positioning and multiple screens
Posted: Saturday 29 April 2017 15:43
by SwordFish
Great job the calendar plugin.
Is it possible to add two google calendars on Dashticz, one for my wife and one for me?
Re: Dashticz v2.0, custom positioning and multiple screens
Posted: Saturday 29 April 2017 15:58
by madrian
SwordFish wrote:Great job the calendar plugin.
Is it possible to add two google calendars on Dashticz, one for my wife and one for me?
Not at this moment, but it's a great idea. Maybe if we ask @Rob nicely?

He is better in these things.
I can imagine the following format:
Code: Select all
var _ICALENDAR_URL = [
{"calendar":1,"title":"Lisa's calendar","url":"http://calendar.google.com/basic.ics"},
{"calendar":2,"title":"SwordFish's calendar","url":"webdav://adaospdaspdokaspdo.ics"},
];
If no title were given, do not display title (as now).

Re: Dashticz v2.0, custom positioning and multiple screens
Posted: Saturday 29 April 2017 15:59
by SwordFish
madrian wrote:SwordFish wrote:Great job the calendar plugin.
Is it possible to add two google calendars on Dashticz, one for my wife and one for me?
Not at this moment, but it's a great idea. Maybe if we ask @Rob nicely?

He is better in these things.
I can imagine the following format:
Code: Select all
var _ICALENDAR_URL = [
{"calendar":1,"title":"Lisa's calendar","url":"http://calendar.google.com/basic.ics"},
{"calendar":2,"title":"SwordFish's calendar","url":"webdav://adaospdaspdokaspdo.ics"},
];
If no title were given, do not display title (as now).

Yeah something like that.
Re: Dashticz v2.0, custom positioning and multiple screens
Posted: Saturday 29 April 2017 17:39
by EdwinK
mvveelen wrote:madrian wrote:mvveelen wrote:Any users with an Apple calendar? Trying to get the calendar plugin to work, but nothing shows up.
Me.

config.js is correctly configured? Google Calendar works?
I added the URL (webcal://p29-calendars.icloud.com/published/2/nhsdjfgdsfgdsjfhfy3ef_DSgEIaCw_Tv6VZAn0xMLLCMhlEE-RIreVpahV4zKT-fE_XyvWaKHmFSf4cTYEptui-tRa1buriW7k)
^^
the URL is just an example
But in the config.js I use buttons.calendar (the config_default.js isn't clear about what else to use) and nothing is showing up. I'm not using a Google calendar, but an Apple calendar.
From a few posts back (Question of mine)
You need to run the beta version of this dashboard
Re: Dashticz v2.0, custom positioning and multiple screens
Posted: Saturday 29 April 2017 17:57
by poudenes
Hi Guys,
Suddenly i got errors for the Moon...:
Error: EventSystem: in MOON 17.04.27: [string "-- Variables to customize -------------------..."]:136: attempt to concatenate global 'moonsetMinute' (a nil value)
It worked, didn't do anything about scripting of testing... it started .....
Re: Dashticz v2.0, custom positioning and multiple screens
Posted: Saturday 29 April 2017 18:02
by mvveelen
madrian wrote:Ahh, sorry:
Code: Select all
columns[3] = {}
columns[3]['blocks'] = ['icalendar']
columns[3]['width'] = 2;
This did the trick, thanks !
I see that you guys are working on the 2 hours time difference, but now at least I can see the calendar.
Now, we have more than 1 calendar (private, work, kids). Would it be possible to merge them?
Re: Dashticz v2.0, custom positioning and multiple screens
Posted: Saturday 29 April 2017 18:12
by tontze
Im trying to get this as map on dashboard, but for some reason, it doesnt work .. It works if i paste it to browser, but not shown in dashboard ?
Code: Select all
https://gadgets.buienradar.nl/gadget/zoommap/?lat=61.49911&lng=23.78712&overname=2&zoom=8&naam=Tampere&size=2&voor=0"%20scrolling=no%20width=256%20height=256
Re: Dashticz v2.0, custom positioning and multiple screens
Posted: Saturday 29 April 2017 18:20
by SwordFish
poudenes wrote:Hi Guys,
Suddenly i got errors for the Moon...:
Error: EventSystem: in MOON 17.04.27: [string "-- Variables to customize -------------------..."]:136: attempt to concatenate global 'moonsetMinute' (a nil value)
It worked, didn't do anything about scripting of testing... it started .....
I also still got an error and did nothing to the script since yesterday
Error: EventSystem: in Moon: [string "-- Variables to customize -------------------..."]:65: attempt to concatenate global 'moonsetMinute' (a nil value)
Re: Dashticz v2.0, custom positioning and multiple screens
Posted: Saturday 29 April 2017 18:37
by EdwinK
SwordFish wrote:poudenes wrote:Hi Guys,
Suddenly i got errors for the Moon...:
Error: EventSystem: in MOON 17.04.27: [string "-- Variables to customize -------------------..."]:136: attempt to concatenate global 'moonsetMinute' (a nil value)
It worked, didn't do anything about scripting of testing... it started .....
I also still got an error and did nothing to the script since yesterday
Error: EventSystem: in Moon: [string "-- Variables to customize -------------------..."]:65: attempt to concatenate global 'moonsetMinute' (a nil value)
Add me too it. Also Rain script is throwing this to me.
Code: Select all
2017-04-29 18:35:00.223 Error: EventSystem: in Regen Verwacht: [string "local RainTextIDX = 113 -- your domoticz te..."]:13: attempt to index global 'file' (a nil value)
2017-04-29 18:35:00.495 Error: EventSystem: in Moon: [string "-- Variables to customize..."]:54: attempt to index global 'file' (a nil value)
2017-04-29 18:35:37.130 Error: Logitech Media Server: No response from server 192.168.0.10:9000
2017-04-29 18:36:00.272 Error: EventSystem: in Regen Verwacht: [string "local RainTextIDX = 113 -- your domoticz te..."]:13: attempt to index global 'file' (a nil value)
2017-04-29 18:36:00.517 Error: EventSystem: in Moon: [string "-- Variables to customize..."]:54: attempt to index global 'file' (a nil value)
Re: Dashticz v2.0, custom positioning and multiple screens
Posted: Saturday 29 April 2017 18:40
by mvveelen
SwordFish wrote:poudenes wrote:Hi Guys,
Suddenly i got errors for the Moon...:
Error: EventSystem: in MOON 17.04.27: [string "-- Variables to customize -------------------..."]:136: attempt to concatenate global 'moonsetMinute' (a nil value)
It worked, didn't do anything about scripting of testing... it started .....
I also still got an error and did nothing to the script since yesterday
Error: EventSystem: in Moon: [string "-- Variables to customize -------------------..."]:65: attempt to concatenate global 'moonsetMinute' (a nil value)
Same here....
Could it be that Wunderground isn't sending the "moon set" at the moment?
See:
- Spoiler: show
Code: Select all
{
"response": {
"version":"0.1",
"termsofService":"http://www.wunderground.com/weather/api/d/terms.html",
"features": {
"astronomy": 1
}
}
, "moon_phase": {
"percentIlluminated":"15",
"ageOfMoon":"4",
"phaseofMoon":"Waxing Crescent",
"hemisphere":"North",
"current_time": {
"hour":"18",
"minute":"42"
},
"sunrise": {
"hour":"6",
"minute":"11"
},
"sunset": {
"hour":"21",
"minute":"03"
},
"moonrise": {
"hour":"8",
"minute":"40"
},
"moonset": {
"hour":"",
"minute":""
}
},
"sun_phase": {
"sunrise": {
"hour":"6",
"minute":"11"
},
"sunset": {
"hour":"21",
"minute":"03"
}
}
}
And, when I use the newsfeed, I get all feeds in 1 block. Sometime just 1 news item, but most of the time all items on 1 page.
I'm using this code:
Code: Select all
blocks['news_1'] = {} // NU.NL
blocks['news_1']['feed'] = 'https://crossorigin.me/http://www.telegraaf.nl/rss';
blocks['news_2'] = {} // TWEAKERS
blocks['news_2']['feed'] = 'https://crossorigin.me/http://feeds.feedburner.com/tweakers/nieuws';
columns[4] = {}
columns[4]['blocks'] = ['news_1','news_2']
columns[4]['width'] = 5;
Re: Dashticz v2.0, custom positioning and multiple screens
Posted: Saturday 29 April 2017 18:56
by madrian
This did the trick, thanks !
I see that you guys are working on the 2 hours time difference, but now at least I can see the calendar.
Now, we have more than 1 calendar (private, work, kids). Would it be possible to merge them?
1, work released, waiting for Rob to merge request.
2, this is a thing what Rob can do quickly, because only he has the super power.
Re: Dashticz v2.0, custom positioning and multiple screens
Posted: Saturday 29 April 2017 19:29
by koowee
How this
"turn off last update date per device" works? There are these two settings in CONFIG.js, "_SHOW_LASTUPDATE" and"_LASTUPDATE_FORMAT", but what should I add per device to turn off this last update per device? Maybe add something like this: blocks[idx]['lastupdate'] = 'OFF'; or have I understood this totally wrong
