dew point & calendar not showing

Moderator: leecollings

geertvercamer
Posts: 84
Joined: Friday 12 May 2017 20:03
Target OS: -
Domoticz version:
Contact:

dew point & calendar not showing

Post by geertvercamer »

Hi,

just installed 3.4.0 beta and I have 2 problems
- I have a block in which I show 2 Google calendars combined. One is for my girlfriend and me, the 2nd one is just for me (so she doesn't get too much entries on her smartphone). It is not loading. It just reads 'laden...'
Another calendar is loading fine

Code: Select all

calendars.me = {calFormat: 1	,	dateFormat: 'dd DD/MM'	,	maxitems: 9 };
calendars.me.calendars = [	{ calendar:calendars.mine }
					,	{ calendar:calendars.justForMe,	color: '#cefad9' }
				       ];
- after every update I have to modify some javascript in order to provide a 'dew point' button. Not too big a problem, but how would I procede with this release?
Normally I add

Code: Select all

    if (typeof (device['DewPoint']) !== 'undefined') {
        if (single_block) {
            blockValues[0].value += ' / ' + device['DewPoint'] + ' °';
        } else {
            blockValues.push({
                icon: 'wi wi-fog',
                idx: idx + '_4',
                title: device['Name']+'x',
                value: device['DewPoint'],
                unit: _TEMP_SYMBOL
            });
        }
    }
Thanks.
Lokonli
Posts: 2271
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: dew point & calendar not showing

Post by Lokonli »

For dew point:
Can you post the json output of the Domoticz device?

Code: Select all

http://192.168.178.10:8080/json.htm?type=devices&rid=123
Use your own Domoticz IP address, and replace 123 with the Domoticz device id.
Lokonli
Posts: 2271
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: dew point & calendar not showing

Post by Lokonli »

geertvercamer wrote: Friday 27 March 2020 22:23 Hi,

just installed 3.4.0 beta and I have 2 problems
- I have a block in which I show 2 Google calendars combined. One is for my girlfriend and me, the 2nd one is just for me (so she doesn't get too much entries on her smartphone). It is not loading. It just reads 'laden...'
Another calendar is loading fine

Code: Select all

calendars.me = {calFormat: 1	,	dateFormat: 'dd DD/MM'	,	maxitems: 9 };
calendars.me.calendars = [	{ calendar:calendars.mine }
					,	{ calendar:calendars.justForMe,	color: '#cefad9' }
				       ];
Thanks.
On the calendar:

You have defined three calendar blocks:(?)
calendars.mine (=first calendar)
calendars.justForMe (=second calendar)
calendars.me (=combined calendar)

If you add calendars.mine and calendars.justForMe to a column, do they show up correctly?
Lokonli
Posts: 2271
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: dew point & calendar not showing

Post by Lokonli »

geertvercamer wrote: Friday 27 March 2020 22:23 Hi,

just installed 3.4.0 beta and I have 2 problems
- I have a block in which I show 2 Google calendars combined. One is for my girlfriend and me, the 2nd one is just for me (so she doesn't get too much entries on her smartphone). It is not loading. It just reads 'laden...'
Another calendar is loading fine

Code: Select all

calendars.me = {calFormat: 1	,	dateFormat: 'dd DD/MM'	,	maxitems: 9 };
calendars.me.calendars = [	{ calendar:calendars.mine }
					,	{ calendar:calendars.justForMe,	color: '#cefad9' }
				       ];
- after every update I have to modify some javascript in order to provide a 'dew point' button. Not too big a problem, but how would I procede with this release?
Normally I add

Code: Select all

    if (typeof (device['DewPoint']) !== 'undefined') {
        if (single_block) {
            blockValues[0].value += ' / ' + device['DewPoint'] + ' °';
        } else {
            blockValues.push({
                icon: 'wi wi-fog',
                idx: idx + '_4',
                title: device['Name']+'x',
                value: device['DewPoint'],
                unit: _TEMP_SYMBOL
            });
        }
    }
Thanks.
Has been added to latest beta.

What is the reason that you add 'x' to the name?
geertvercamer
Posts: 84
Joined: Friday 12 May 2017 20:03
Target OS: -
Domoticz version:
Contact:

Re: dew point & calendar not showing

Post by geertvercamer »

Hi,

I installed the latest beta and dew point is working fine. Thanks for that!

The 'x'... I don't know/remember.

About the calendars: I want 1 block showing 2 calendars, but each with its own colour. Maybe my method is not the best option for that?
That said, adding just one calendar doesn't solve the problem, keeps loading


KR,

Geert
Lokonli
Posts: 2271
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: dew point & calendar not showing

Post by Lokonli »

Thanks for confirming it's working. I"ll remove the x ...

For the calendar: Showing 1 block with a combined calendar is working.

But if the single calendar doesn't load, then first you have to solve that.
What is your PHP version? (In Dashticz click on the settings icon (upper right) and then on the info tab)

If you have PHP 7.0 or lower then the 'old' calendar module is used, which currently doesn't work for some calendars.
Lokonli
Posts: 2271
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: dew point & calendar not showing

Post by Lokonli »

I've pushed a change to the calendar module in the latest beta just now. Could you test?
geertvercamer
Posts: 84
Joined: Friday 12 May 2017 20:03
Target OS: -
Domoticz version:
Contact:

Re: dew point & calendar not showing

Post by geertvercamer »

installed the latest calendar.js, no change

Running PHP 7.3.0
geertvercamer
Posts: 84
Joined: Friday 12 May 2017 20:03
Target OS: -
Domoticz version:
Contact:

Re: dew point & calendar not showing

Post by geertvercamer »

The error is occuring in the getJSON apparently:
error in response from calendar with icalurl
"./vendor/dashticz/ical/?time=1585600958180&maxitems=6&url=https://calendar.google.com/calendar/ic ... /basic.ics"

v3.3.2 works fine with both the calendars in their own block (also combined)
It breaks on version v3.3.3

Info:
Domoticz version: 4.11597
dzVents version: 2.5.5
Python version: 3.6.4
PHP version: 7.3.0
Lokonli
Posts: 2271
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: dew point & calendar not showing

Post by Lokonli »

Could you install latest beta.
Open ./vendor/dashticz/ical/index.php
Change the debug variable from 0 to 1 on line 42
And test

Sent from my SM-A320FL using Tapatalk

geertvercamer
Posts: 84
Joined: Friday 12 May 2017 20:03
Target OS: -
Domoticz version:
Contact:

Re: dew point & calendar not showing

Post by geertvercamer »

That fixes it...
I guess this will help you.
Thanks for your time!
Ybuqc
Posts: 5
Joined: Monday 23 March 2020 22:23
Target OS: -
Domoticz version:
Contact:

Re: dew point & calendar not showing

Post by Ybuqc »

Hello,
I have a similar problem. Calendar is not loading. Can't tell for preivous version as it is my first installation of Dashticz (which is fantastic by the way!).

When I tried the
"./vendor/dashticz/ical/?time=1585600958180&maxitems=6&url=MY_CALENDAR_URL", I got the following

Code: Select all

JSON: SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

Code: Select all

RAW DATA: InvalidArgumentException: Invalid ICAL data format in /home/pi/dashticz/vendor/dashticz/ical/vendor/om/icalparser/src/IcalParser.php:65
Stack trace:
#0 /home/pi/dashticz/vendor/dashticz/ical/vendor/om/icalparser/src/IcalParser.php(46): om\IcalParser->parseString('\n<!DOCTYPE html...', NULL)
#1 /home/pi/dashticz/vendor/dashticz/ical/index.php(50): om\IcalParser->parseFile('https://calenda...')
#2 {main}
Ybuqc
Posts: 5
Joined: Monday 23 March 2020 22:23
Target OS: -
Domoticz version:
Contact:

Re: dew point & calendar not showing

Post by Ybuqc »

Just saw the previous answer.
Update to last version (thanks to git)
Modify the index.php file (set debug variable to 1)
--> Good news is that I don't have the 'loading...' displayed, bad news is that it doesn't show anything at all.

When trying to access through the ./vendor ... I now have

Code: Select all

RAW DATA:
{
  "_errors": []
}
geertvercamer
Posts: 84
Joined: Friday 12 May 2017 20:03
Target OS: -
Domoticz version:
Contact:

Re: dew point & calendar not showing

Post by geertvercamer »

@Ybuqc,
be sure the include the maxitem setting. The calendar doesn't load even with debug set to 1

@Lokonli,
set the debug to 1, forces the system to use the previous calendar lib, right?
debug 0 and using the formula 1 example from the documentation does work...
Ybuqc
Posts: 5
Joined: Monday 23 March 2020 22:23
Target OS: -
Domoticz version:
Contact:

Re: dew point & calendar not showing

Post by Ybuqc »

I have the maxitems defined.

Code: Select all

var calendars = {}
calendars.perso = {
        maxitems: 5,
        url: 'https://calendar.google.com/calendar/',
        icalurl: 'https://calendar.google.com/calendar?cid=...'
}

...

columns[5] = {
        blocks: [calendars.perso],
        width: 4
}

...

screens['tablet'][3] = {}
screens['tablet'][3]['background'] = 'bg9.jpg';
screens['tablet'][3]['columns'] = [5]
And then
Lokonli
Posts: 2271
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: dew point & calendar not showing

Post by Lokonli »

geertvercamer wrote: Tuesday 31 March 2020 7:18 @Lokonli,
set the debug to 1, forces the system to use the previous calendar lib, right?
debug 0 and using the formula 1 example from the documentation does work...
Yes.

And with the latest version PHP warnings are prevented, which could become visible in the PHP output if you run dashticz within Docker (via the automatic installation)
Lokonli
Posts: 2271
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: dew point & calendar not showing

Post by Lokonli »

Ybuqc wrote: Tuesday 31 March 2020 0:10 Hello,
I have a similar problem. Calendar is not loading. Can't tell for preivous version as it is my first installation of Dashticz (which is fantastic by the way!).

When I tried the
"./vendor/dashticz/ical/?time=1585600958180&maxitems=6&url=MY_CALENDAR_URL", I got the following

Code: Select all

JSON: SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

Code: Select all

RAW DATA: InvalidArgumentException: Invalid ICAL data format in /home/pi/dashticz/vendor/dashticz/ical/vendor/om/icalparser/src/IcalParser.php:65
Stack trace:
#0 /home/pi/dashticz/vendor/dashticz/ical/vendor/om/icalparser/src/IcalParser.php(46): om\IcalParser->parseString('\n<!DOCTYPE html...', NULL)
#1 /home/pi/dashticz/vendor/dashticz/ical/index.php(50): om\IcalParser->parseFile('https://calenda...')
#2 {main}
First double check your calendar URL: Does it give a valid ICS file as response?
If you open 'MY_CALENDAR_URL' in a browser, you can save the output. It should look like:

Code: Select all

BEGIN:VCALENDAR
PRODID:-//Google Inc//Google Calendar 70.9054//EN
VERSION:2.0
CALSCALE:GREGORIAN
METHOD:PUBLISH
X-WR-CALNAME:[email protected]
X-WR-TIMEZONE:Europe/Amsterdam
BEGIN:VTIMEZONE
TZID:Etc/UTC
X-LIC-LOCATION:Etc/UTC
BEGIN:STANDARD
TZOFFSETFROM:+0000
TZOFFSETTO:+0000
TZNAME:GMT
DTSTART:19700101T000000
END:STANDARD
END:VTIMEZONE
lzwfkv
Posts: 37
Joined: Sunday 11 August 2019 16:54
Target OS: -
Domoticz version:
Contact:

Re: dew point & calendar not showing

Post by lzwfkv »

Ybuqc wrote: Tuesday 31 March 2020 0:10 Hello,
I have a similar problem. Calendar is not loading. Can't tell for preivous version as it is my first installation of Dashticz (which is fantastic by the way!).

When I tried the
"./vendor/dashticz/ical/?time=1585600958180&maxitems=6&url=MY_CALENDAR_URL", I got the following

Code: Select all

JSON: SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

Code: Select all

RAW DATA: InvalidArgumentException: Invalid ICAL data format in /home/pi/dashticz/vendor/dashticz/ical/vendor/om/icalparser/src/IcalParser.php:65
Stack trace:
#0 /home/pi/dashticz/vendor/dashticz/ical/vendor/om/icalparser/src/IcalParser.php(46): om\IcalParser->parseString('\n<!DOCTYPE html...', NULL)
#1 /home/pi/dashticz/vendor/dashticz/ical/index.php(50): om\IcalParser->parseFile('https://calenda...')
#2 {main}
You likely have an outstanding TimeZone String in your ical file (.ics) that the calendar library used by Dashticz is not able to recognize as a valid TimeZOne. Try to download the .ics file of your calendar and look for the TimeZones used in there, compare them with the Timezones in /home/pi/dashticz/vendor/dashticz/ical/vendor/om/icalparser/src/WindowsTimezones.php file. If you find any of them missing in the WindowsTimezones.php file, then that-s it. In that case, a quick workaround can be to add to the WindowsTimezones.php file a reasonable Timezone mapping for your ical timezone.
For instance in my case i had 'Customized Time Zone' as timezone in one of my calendar events (it is a Microsoft Office 365 calendar - Exchange) and i had to map it to 'Europe/Berlin'.
Ybuqc
Posts: 5
Joined: Monday 23 March 2020 22:23
Target OS: -
Domoticz version:
Contact:

Re: dew point & calendar not showing

Post by Ybuqc »

Lokonli wrote: Tuesday 31 March 2020 11:30 ...

First double check your calendar URL: Does it give a valid ICS file as response?
If you open 'MY_CALENDAR_URL' in a browser, you can save the output. It should look like:

Code: Select all

BEGIN:VCALENDAR
PRODID:-//Google Inc//Google Calendar 70.9054//EN
...
Indeed, it doesn't return an ICS file.

when I retrieve the file with wget MY_CALENDAR_URL I have a full web page instead of an ICS file as you mentioned.
Just in case, I'm using both GoogleCalendar and NextCloud.
For both calendars, I'm using the 'export fonctionality.
Ybuqc
Posts: 5
Joined: Monday 23 March 2020 22:23
Target OS: -
Domoticz version:
Contact:

Re: dew point & calendar not showing

Post by Ybuqc »

Ok... my bad. Found the correct URL for my NextCloud calendars and it works like a charm :)
Now I'll dig for the GoogleCalendar link.
Thanks for your support.
Case closed for me.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests