Page 2 of 2

Re: dew point & calendar not showing

Posted: Tuesday 31 March 2020 17:10
by jjnh
The issue is not solved for me. My google calendar link is not working since 5 days. I tried the URL and that downloads a basic.ics file. The timezone in the file is "Europe/Amsterdam". Any ideas why it's not working anymore?

Re: dew point & calendar not showing

Posted: Tuesday 31 March 2020 17:37
by jjnh
Found it. I was running PHP 7.033 on the Apache server. After upgrading to PHP 7.4 and connecting is to my Apache2 the calendar was working again.

Re: dew point & calendar not showing

Posted: Tuesday 31 March 2020 20:08
by geertvercamer
lzwfkv wrote: Tuesday 31 March 2020 11:32
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'.

I found Europe/Brussels, Africa/Ceuta (???)

So I have to add more entries like
'(UTC+01:00) Brussels' => 'Europe/Brussels',
'(UTC+01:00) Ceuta' => 'Africa/Ceuta',
?
Thanks!

Re: dew point & calendar not showing

Posted: Wednesday 01 April 2020 2:37
by lzwfkv
For new mappings, on the left of '=>' you must type your ical event timezone and on the right a know (conventional) timezone name which is known to the library, as much as possible coherent with your .ics timezone.
Therefore, if in your .ics you have TZID=Europe/Brussels and TZID=Africa/Ceuta, none of them is already known to the library and you should map both to Europe/Paris.
So, let's try this way:
make a backup of the original WindowsTimezones.php file.
edit WindowsTimezones.php and append these lines to the exisiting Timezone mappings list:
'Europe/Brussels' => 'Europe/Paris',
'Africa/Ceuta' => 'Europe/Paris',

Hope this helps.

Re: dew point & calendar not showing

Posted: Wednesday 01 April 2020 21:51
by geertvercamer
thanks for the explanation, lzwfkv
too bad it doesn't help

Re: dew point & calendar not showing

Posted: Wednesday 01 April 2020 22:03
by Lokonli
Check that you are using exactly the same timezone naming at the left of the '=>' symbol as in the ics file. Maybe you have to use:

Code: Select all

'(UTC+01:00) Brussels' => 'Europe/Paris',
'(UTC+01:00) Ceuta' => 'Europe/Paris',

Re: dew point & calendar not showing

Posted: Wednesday 01 April 2020 22:06
by geertvercamer
@Lokonli,

the dew point now shows values like '1.69', maybe better if that would be '2'?

Code: Select all

    if (typeof (device['DewPoint']) !== 'undefined') {
        if (single_block) {
            blockValues[0].value += ' / ' + Math.round(device['DewPoint']) + ' °';
        } else {
            blockValues.push({
                icon: 'wi wi-fog',
                idx: idx + '_4',
                title: device['Name'],
                value: Math.round(device['DewPoint']),
                unit: _TEMP_SYMBOL
            });
        }
    }

Re: dew point & calendar not showing

Posted: Wednesday 01 April 2020 22:22
by Lokonli
Are you willing to make the changes yourself? If you make a Pull Request (PR) I'll merge the changes.
I've documented the way of working here:
https://dashticz.readthedocs.io/en/beta ... b-workflow

If that sounds too challenging, then I'll make the change

Re: dew point & calendar not showing

Posted: Thursday 02 April 2020 8:20
by geertvercamer
OK, I'll have a look tonight

Re: dew point & calendar not showing

Posted: Thursday 02 April 2020 18:47
by geertvercamer
@Lokonli, I'm having trouble with point 10 in the documentation git push mynewfeature

So I used git push dewpoint1decimal, but I get an error;

fatal: 'dewpoint1decimal' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Re: dew point & calendar not showing

Posted: Thursday 02 April 2020 19:37
by Lokonli
Probably you have to use:

Code: Select all

git push origin dewpoint1decimal
I will adapt the documentation.

Re: dew point & calendar not showing

Posted: Thursday 02 April 2020 23:13
by geertvercamer
OK, I hope it's finished

Re: dew point & calendar not showing

Posted: Friday 03 April 2020 11:43
by Lokonli
Thanks for your contribution. Well done!
Could you test latest beta? (There are more changes ...)

Re: dew point & calendar not showing

Posted: Friday 03 April 2020 18:13
by geertvercamer
you're welcome.
Glad to learn something new.

new beta: the title of those blocks is gone

Code: Select all

<div class="col-xs-8 col-data">
	<strong class="title">11,4 °C</strong><br>
	<span class="value">THB</span>
</div>
before:

Code: Select all

<div class="col-xs-8 col-data">
	<strong class="title">Temperatuur</strong><br>
	<span class="value">11,4 °C</span>
</div>
problem with calendar still exists so I set debug to 1 again.

also, I have a Hue Go block. The colour selector is gone, just the small arrow, and the slider is sticking to the bottom of the block.