Page 3 of 4

Re: Dashticz - Module - 112 Meldingen (Dutch)

Posted: Friday 24 April 2020 17:06
by Lokonli
In latest beta I've added a timeformat parameter:

Code: Select all

blocks[alarmmeldingen'] = {
  timeformat: 'dd HH:MM'
}
For a format guide see:
https://momentjscom.readthedocs.io/en/l ... 01-format/

Re: Dashticz - Module - 112 Meldingen (Dutch)

Posted: Tuesday 28 April 2020 15:36
by PietjePuck
There is a small error in the default timeformat in the alarmeldingen.js.
The default time format should be this in order to show two digits :
timeformat: 'ddd D MMM HH:MM'

Instead of
timeformat: 'ddd d MMM HH:MM'
Today it shows apr. 2 time alarmmelding

Re: Dashticz - Module - 112 Meldingen (Dutch)

Posted: Saturday 02 May 2020 22:42
by sschouten
Hey,

i want to change te location to Hoofddorp
i found the rss feed for hoofddorp
Spoiler: show
blocks['alarmmeldingen'] = {
rss: 'https://www.alarmeringen.nl/feeds/regio ... erland.rss',
filter: 'hoofddorp',
show_lastupdate: true,
width:12,
icon: 'fas fa-bullhorn',
interval: 180,
results: 5,
}
But in dashticz he is not filtering only hoofddorp

Re: Dashticz - Module - 112 Meldingen (Dutch)

Posted: Sunday 03 May 2020 14:24
by HansieNL
sschouten wrote: Saturday 02 May 2020 22:42 Hey,

i want to change te location to Hoofddorp
i found the rss feed for hoofddorp
Spoiler: show
blocks['alarmmeldingen'] = {
rss: 'https://www.alarmeringen.nl/feeds/regio ... erland.rss',
filter: 'hoofddorp',
show_lastupdate: true,
width:12,
icon: 'fas fa-bullhorn',
interval: 180,
results: 5,
}
But in dashticz he is not filtering only hoofddorp
Have you tried with a capital h -> Hoofddorp ?

Re: Dashticz - Module - 112 Meldingen (Dutch)

Posted: Tuesday 05 May 2020 10:06
by dorenberg
PietjePuck wrote: Tuesday 28 April 2020 15:36 There is a small error in the default timeformat in the alarmeldingen.js.
The default time format should be this in order to show two digits :
timeformat: 'ddd D MMM HH:MM'

Instead of
timeformat: 'ddd d MMM HH:MM'
Today it shows apr. 2 time alarmmelding
Yes, this seems to help, however all minutes are not displayed correctly too and all on 05 minutes?

So it must be this, or if you like without the ss of the seconds.:

timeformat: 'ddd D MMM hh:mm:ss'

Re: Dashticz - Module - 112 Meldingen (Dutch)

Posted: Saturday 20 June 2020 8:56
by Droid
Yesterday I've added the alarmeringen to my Dashticz:

Code: Select all

blocks['alarmmeldingen'] = {
        title: '112 meldingen Doetinchem',
        rss: 'https://alarmeringen.nl/feeds/city/doetinchem.rss',
        show_lastupdate: true,
        width: 12,
        refresh: 300,   //refresh rate in seconds
        results: 5,   //number of recent results to show
        image: '../custom/img/112meldingen.png'
}
It showed up nicely, but dat no recent items.

Checking it today gives the same result:
Aantekening 2020-06-20 085340.png
Aantekening 2020-06-20 085340.png (8.43 KiB) Viewed 1870 times
I checked the RSS file and there where some calls this night. So there should be results in here... What am I doing wrong here?

Re: Dashticz - Module - 112 Meldingen (Dutch)

Posted: Saturday 20 June 2020 10:19
by Lokonli
The title in the actual result ('P2000 brandweer meldingen') is not the same as in the block definition ('112 meldingen Doetinchem')

Can it be related to that? (do you maybe redefine the block somewhere?)

Re: Dashticz - Module - 112 Meldingen (Dutch)

Posted: Saturday 20 June 2020 10:21
by EdwinK
I also see that after some time there are no results. Could it be that some time after the last event the script just displays this message?

Re: Dashticz - Module - 112 Meldingen (Dutch)

Posted: Saturday 20 June 2020 10:34
by Droid
Lokonli wrote: Saturday 20 June 2020 10:19 The title in the actual result ('P2000 brandweer meldingen') is not the same as in the block definition ('112 meldingen Doetinchem')

Can it be related to that? (do you maybe redefine the block somewhere?)
No, I've changed it in between... it is the same now.

I did some further digging... in alarmmeldingen.js I've added this line:

Code: Select all

    function dataAlarmInfo(me, data) {
      console.log(data);
      var alarmobject = me.block;
      var html = '';
Then, checking the console, it says null
So no items were retrieved...

Re: Dashticz - Module - 112 Meldingen (Dutch)

Posted: Saturday 20 June 2020 10:42
by Droid
Found it, I had to open curl and openssl on my Synology server...


Another question, is it possible to filter on only the fire department messages?

Re: Dashticz - Module - 112 Meldingen (Dutch)

Posted: Saturday 20 June 2020 11:23
by Lokonli
There is a parameter 'filter' which could work.

Sent from my SM-A320FL using Tapatalk


Re: Dashticz - Module - 112 Meldingen (Dutch)

Posted: Wednesday 16 September 2020 18:59
by Larsoss
thanks for your script. I'm playing around with it, and it works ... but not as desired .. I live in berghem, village in the municipality of oss ...

But I get to see everything from the RSS feed?

Code: Select all

var alarmmeldingen = {
  rss: 'https://alarmeringen.nl/feeds/region/brabant-noord.rss',
  city: 'Oss,Heesch,Berghem,Traumaheli',
  show_lastupdate:true,
  width:12,
  interval: 180,
  results: 5}
I copied the alarms.js into my .js folder as said, and created the block neatly
columns[2]['blocks'] = [buttons.buienradar,calendars.f1,alarmmeldingen,'garbage'];

i see the block.
Image

so what did i wrong?

Re: Dashticz - Module - 112 Meldingen (Dutch)

Posted: Wednesday 16 September 2020 19:53
by Lokonli
Larsoss wrote: Wednesday 16 September 2020 18:59 thanks for your script. I'm playing around with it, and it works ... but not as desired .. I live in berghem, village in the municipality of oss ...

But I get to see everything from the RSS feed?

Code: Select all

var alarmmeldingen = {
  rss: 'https://alarmeringen.nl/feeds/region/brabant-noord.rss',
  city: 'Oss,Heesch,Berghem,Traumaheli',
  show_lastupdate:true,
  width:12,
  interval: 180,
  results: 5}
I copied the alarms.js into my .js folder as said, and created the block neatly
columns[2]['blocks'] = [buttons.buienradar,calendars.f1,'alarmmeldingen','garbage'];

i see the block.
Image

so what did i wrong?
No need to copy alarms.js I would say.
Define your block in CONFIG.js as follows:

Code: Select all

blocks['alarmmeldingen'] = {
  rss: 'https://alarmeringen.nl/feeds/region/brabant-noord.rss',
  city: 'Oss,Heesch,Berghem,Traumaheli',
  show_lastupdate:true,
  width:12,
  interval: 180,
  results: 5
}

columns[2]['blocks'] = [buttons.buienradar,calendars.f1,'alarmmeldingen','garbage']; 
 
(alarmmeldingen enclosed in tick marks)

or indeed, as an alternative, you can also define a variable. Use the following in CONFIG.js:

Code: Select all

var alarmmeldingen = {
  rss: 'https://alarmeringen.nl/feeds/region/brabant-noord.rss',
  city: 'Oss,Heesch,Berghem,Traumaheli',
  show_lastupdate:true,
  width:12,
  interval: 180,
  results: 5
}

columns[2]['blocks'] = [buttons.buienradar,calendars.f1, alarmmeldingen,'garbage']; 
 
(alarmmeldingen without tick marks)

I recommend the first method.

Re: Dashticz - Module - 112 Meldingen (Dutch)

Posted: Thursday 17 September 2020 21:10
by Larsoss
ok i took the top one because it is the best way according to you. No problem we will continue with that.

unfortunately, if I use this then I also get other places .. And that is not the intention .. Where does it go wrong?

Re: Dashticz - Module - 112 Meldingen (Dutch)

Posted: Friday 18 September 2020 23:06
by Lokonli
Larsoss wrote: Thursday 17 September 2020 21:10 ok i took the top one because it is the best way according to you. No problem we will continue with that.

unfortunately, if I use this then I also get other places .. And that is not the intention .. Where does it go wrong?
The parameter 'city' has been renamed to 'filter' to better reflect it's purpose.

Re: Dashticz - Module - 112 Meldingen (Dutch)

Posted: Monday 28 September 2020 22:50
by EdwinK
Screen Shot 2020-09-28 at 22.48.36.png
Screen Shot 2020-09-28 at 22.48.36.png (42.19 KiB) Viewed 1653 times
I got a strange date for an alert today. Somehow the system seems to think it's Mon September 1.

Re: Dashticz - Module - 112 Meldingen (Dutch)

Posted: Wednesday 30 September 2020 17:27
by EdwinK
Fixed. It should have been DD instead of dd

Re: Dashticz - Module - 112 Meldingen (Dutch)

Posted: Tuesday 29 December 2020 16:14
by FinalX
this is in my config.js :

blocks['alarmmeldingen'] = {
title: '<string>',
rss: 'https://alarmeringen.nl/feeds/city/hoeven.rss',
filter: 'Hoeven', //filter the messages for your town and if you want the cities around you
show_lastupdate: true,
width: 12,
refresh: 300, //refresh rate in seconds
results: 5 //number of recent results to show
}

but i keep seeing:
Image

Re: Dashticz - Module - 112 Meldingen (Dutch)

Posted: Tuesday 29 December 2020 16:35
by Lokonli
I can't see the image. Can you report, and indicate what's wrong?

Your block is ok, except for the title parameter. You have to remove the '<' and '>' symbols, and replace string with something more appropriate :)

Re: Dashticz - Module - 112 Meldingen (Dutch)

Posted: Tuesday 29 December 2020 16:46
by EdwinK
When I use this, I see the following:
[attachment=0]Screen Shot 2020-12-29 at 16.41.09.png[/attachment]