Page 1 of 4
Dashticz - Module - 112 Meldingen (Dutch)
Posted: Wednesday 18 March 2020 13:41
by PietjePuck
After using Dashticz for a while now i decided to return something.
I wrote a custom js script to display the last x 112 Alarm messages on my dashboard.
- 112.PNG (106.66 KiB) Viewed 4475 times
To use this on yourdashboard:
Copy the alarmmeldingen.js to your /js/components directory.
Edit the dashtics.js file in the /js directory and add this line just before the 'secpanel' line:
Then add the configuration settings to your config.js file in the /custom folder:
Code: Select all
var alarmmeldingen = {
rss: 'http://www.alarmeringen.nl/feeds/region/rotterdam-rijnmond.rss',
city: 'Poortugaal,Rhoon,Hoogvliet,Traumaheli,Pernis',
show_lastupdate:true,
width:12,
interval: 180,
results: 5}
Get the
rrs link from the site
http://www.alarmeringen.nl/ in this case i used my region 'Rotterdam-Rijnmond
With the
city variable you can filter the messages for your town and if you want the cities around you. Use Traumaheli to get all alarms containing the support of the Trauma Heli
If you would like to have an
icon in this block you can use the icon: variable
The
interval defines the refresh rate in seconds
results defines the number of resent results to show.
To use the formatting in my screenshot add these values to the custom.css file in the /custom folder.
Code: Select all
.alarmrow{
font-size: 14px !important;
}
.alarmrow a {
color: white;
}
.alarmrow strong{
display: inline-block;
}
Re: Dashticz - Module - 112 Meldingen (Dutch)
Posted: Wednesday 18 March 2020 14:27
by Lokonli
Thank you for your contribution!
I will merge this into the next beta version of Dashticz.
Re: Dashticz - Module - 112 Meldingen (Dutch)
Posted: Wednesday 18 March 2020 15:06
by PietjePuck
May be you can send me the instructions how to do this (i am not familiar with this yet) so i can do this next time on my own (or a little help from you).
Re: Dashticz - Module - 112 Meldingen (Dutch)
Posted: Wednesday 18 March 2020 16:55
by HansieNL
PietjePuck wrote: ↑Wednesday 18 March 2020 15:06
May be you can send me the instructions how to do this (i am not familiar with this yet) so i can do this next time on my own (or a little help from you).
Short instructions:
Create a GitHub account (that's where the Dashticz code files can be found)
Fork Dashticz (copy for yourself to change/edit)
Edit the files from the beta branch
Send a Pull Request (request to add your changes)
Re: Dashticz - Module - 112 Meldingen (Dutch)
Posted: Wednesday 18 March 2020 17:10
by EdwinK
Thanks.
I like this part:
city: 'Poortugaal,Rhoon,Hoogvliet,Traumaheli,Pernis',
Didn't really have to change anything as I happen to live there. I just deleted Hoogvliet and Pernis
Re: Dashticz - Module - 112 Meldingen (Dutch)
Posted: Wednesday 18 March 2020 17:52
by HansieNL
I tried with your own settings with Dashticz latest beta.
I get only a message: Loading...
The page is now one long page with a scrollbar. I can't swipe to other page anymore. Someone else has the same problem?
Re: Dashticz - Module - 112 Meldingen (Dutch)
Posted: Wednesday 18 March 2020 18:01
by Lokonli
PietjePuck wrote: ↑Wednesday 18 March 2020 15:06
May be you can send me the instructions how to do this (i am not familiar with this yet) so i can do this next time on my own (or a little help from you).
Hi PietjePuck,
That would be great!
Most of it is documented here:
https://dashticz.readthedocs.io/en/mast ... b-workflow
Maybe you can try to do the merging yourself?
If you need help please let me know.
Re: Dashticz - Module - 112 Meldingen (Dutch)
Posted: Wednesday 18 March 2020 23:43
by Boattailman
HansieNL wrote: ↑Wednesday 18 March 2020 17:52
I tried with your own settings with Dashticz latest beta.
I get only a message: Loading...
The page is now one long page with a scrollbar. I can't swipe to other page anymore. Someone else has the same problem?
Yes, same issue here
Re: Dashticz - Module - 112 Meldingen (Dutch)
Posted: Thursday 19 March 2020 9:55
by EdwinK
It works here for me.
Maybe you forgot to add the attached .js file or to edit dashticz.js?
Re: Dashticz - Module - 112 Meldingen (Dutch)
Posted: Thursday 19 March 2020 10:33
by PietjePuck
HansieNL wrote: ↑Wednesday 18 March 2020 17:52
I tried with your own settings with Dashticz latest beta.
I get only a message: Loading...
The page is now one long page with a scrollbar. I can't swipe to other page anymore. Someone else has the same problem?
Can you send me your config.js file (please remove api keys) and dashticz.js so i can check if you entered the right settings ?
Re: Dashticz - Module - 112 Meldingen (Dutch)
Posted: Thursday 19 March 2020 17:00
by HansieNL
- Spoiler: show
PietjePuck wrote: ↑Thursday 19 March 2020 10:33
HansieNL wrote: ↑Wednesday 18 March 2020 17:52
I tried with your own settings with Dashticz latest beta.
I get only a message: Loading...
The page is now one long page with a scrollbar. I can't swipe to other page anymore. Someone else has the same problem?
Can you send me your config.js file (please remove api keys) and dashticz.js so i can check if you entered the right settings ?
I used the settings as in 1st post:
Code: Select all
var alarmmeldingen = {
rss: 'http://www.alarmeringen.nl/feeds/region/rotterdam-rijnmond.rss',
city: 'Poortugaal,Rhoon,Hoogvliet,Traumaheli,Pernis',
show_lastupdate:true,
width:12,
interval: 180,
results: 5}
Added 'alarmmeldingen' to a column. So nothing special. Will try with stripped down config and see if something is conflicting.
Re: Dashticz - Module - 112 Meldingen (Dutch)
Posted: Thursday 19 March 2020 17:58
by HansieNL
- Spoiler: show
PietjePuck wrote: ↑Thursday 19 March 2020 10:33
HansieNL wrote: ↑Wednesday 18 March 2020 17:52
I tried with your own settings with Dashticz latest beta.
I get only a message: Loading...
The page is now one long page with a scrollbar. I can't swipe to other page anymore. Someone else has the same problem?
Can you send me your config.js file (please remove api keys) and dashticz.js so i can check if you entered the right settings ?
Tried with this default config:
Code: Select all
var config = {}
config['domoticz_ip'] = 'http://192.168.2.14:8081';
config['login_timeout'] = '60';
config['user_name'] = '';
config['pass_word'] = '';
config['app_title'] = 'Dashticz V3';
config['room_plan'] = '0';
config['domoticz_refresh'] = '5';
config['dashticz_refresh'] = '60';
config['default_news_url'] = 'http://www.nu.nl/rss/algemeen';
config['news_scroll_after'] = '7';
config['default_cors_url'] = '';
config['dashticz_php_path'] = './vendor/dashticz/';
config['standby_call_url'] = '';
config['standby_call_url_on_end'] = '';
config['theme'] = 'default';
config['background_image'] = 'img/bg2.jpg';
config['standby_after'] = '0';
config['start_page'] = '1';
config['enable_swiper'] = '2';
config['vertical_scroll'] = '2';
config['auto_swipe_back_to'] = '1';
config['auto_swipe_back_after'] = '10';
config['auto_slide_pages'] = '';
config['slide_effect'] = 'slide';
config['standard_graph'] = 'hours';
config['blink_color'] = '255, 255, 255, 1';
config['language'] = 'en_US';
config['timeformat'] = 'DD-MM-YY HH:mm';
config['calendarformat'] = 'dd DD.MM HH:mm';
config['calendarlanguage'] = 'en_US';
config['calendarurl'] = '';
config['boss_stationclock'] = 'RedBoss';
config['gm_api'] = '';
config['gm_zoomlevel'] = '';
config['gm_latitude'] = '';
config['gm_longitude'] = '';
config['speak_lang'] = 'en-US';
config['wu_api'] = '';
config['wu_city'] = 'Amsterdam';
config['wu_name'] = '';
config['wu_country'] = 'NL';
config['owm_api'] = '';
config['owm_city'] = 'Mainaschaff';
config['owm_name'] = '';
config['owm_country'] = 'de';
config['owm_lang'] = '';
config['owm_cnt'] = '4';
config['idx_moonpicture'] = '';
config['longfonds_zipcode'] = '';
config['longfonds_housenumber'] = '';
config['switch_horizon'] = '';
config['host_nzbget'] = '';
config['spot_clientid'] = '';
config['sonarr_url'] = '';
config['sonarr_apikey'] = '';
config['sonarr_maxitems'] = '';
config['garbage_company'] = '';
config['garbage_icalurl'] = '';
config['google_api_key'] = '';
config['garbage_calendar_id'] = '';
config['garbage_zipcode'] = '';
config['garbage_street'] = '';
config['garbage_housenumber'] = '';
config['garbage_housenumberadd'] = '';
config['garbage_maxitems'] = '';
config['garbage_width'] = '';
config['setpoint_min'] = '5';
config['setpoint_max'] = '40';
config['evohome_status'] = 'Auto';
config['evohome_boost_zone'] = '60';
config['evohome_boost_hw'] = '15';
config['loginEnabled'] = 0;
config['disable_update_check'] = 0;
config['enable_websocket'] = 0;
config['no_rgb'] = 0;
config['auto_positioning'] = 0;
config['use_favorites'] = 1;
config['disable_googleanalytics'] = 0;
config['last_update'] = 1;
config['hide_topbar'] = 0;
config['security_button_icons'] = 0;
config['edit_mode'] = 0;
config['hide_seconds'] = 0;
config['hide_seconds_stationclock'] = 0;
config['owm_days'] = 0;
config['owm_min'] = 0;
config['use_fahrenheit'] = 0;
config['use_beaufort'] = 0;
config['translate_windspeed'] = 1;
config['static_weathericons'] = 0;
config['hide_mediaplayer'] = 0;
config['garbage_hideicon'] = 0;
config['garbage_icon_use_colors'] = 1;
config['garbage_use_colors'] = 0;
config['garbage_use_names'] = 0;
config['garbage_use_cors_prefix'] = 1;
var publictransport = {}
publictransport.ovinfobus = { show_via: false, station: 'son-en-breugel/bushalte-penseelkever', provider: '9292-bus', icon: 'bus', width:5, results: 6 }
var tvguide = {}
tvguide.dutch = { key:'dutch', icon: 'fas fa-tv', width:7, channels: [1,3,4,31,46,92], maxitems: 5 }
var _STREAMPLAYER_TRACKS = [
{"track":1,"name":"Q-music","file":"http://icecast-qmusic.cdp.triple-it.nl/Qmusic_nl_live_96.mp3"},
{"track":2,"name":"538 Hitzone","file":"http://vip-icecast.538.lw.triple-it.nl/WEB11_MP3"},
{"track":3,"name":"Slam! NonStop","file":"http://stream.radiocorp.nl/web10_mp3"},
{"track":4,"name":"100%NL","file":"http://stream.100p.nl/100pctnl.mp3"},
];
var buttons = {}
buttons.nunl = {key: 'nunl', width:12, icon: 'fa-newspaper-o', title: 'Nu.nl', newwindow:true, url: 'http://www.nu.nl'}
buttons.nos = {key: 'nos', width:12, icon: 'fa-newspaper-o', title: 'Nos', url: 'http://www.nos.nl'}
var blocks = {}
blocks['blocktitle_1'] = {}
blocks['blocktitle_1']['key'] = 'blocktitle_1';
blocks['blocktitle_1']['type'] = 'blocktitle';
blocks['blocktitle_1']['title'] = 'Example';
var columns = {}
columns['bar'] = {}
columns['bar']['blocks'] = ['logo','miniclock','settings']
columns[1] = {}
columns[1]['blocks'] = ['alarmmeldingen']
columns[1]['width'] = 5;
columns[3] = {}
columns[3]['blocks'] = ['sunrise','streamplayer',buttons.nunl,buttons.nos]
columns[3]['width'] = 2;
var columns_standby = {}
columns_standby[1] = {}
columns_standby[1]['blocks'] = ['clock','weather']
columns_standby[1]['width'] = 12;
var screens = {}
screens[1] = {}
screens[1]['background'] = 'bg2.jpg';
screens[1]['columns'] = [1,2,3]
This was working fine till I added:
Code: Select all
var alarmmeldingen = {
rss: 'http://www.alarmeringen.nl/feeds/region/rotterdam-rijnmond.rss',
city: 'Poortugaal,Rhoon,Hoogvliet,Traumaheli,Pernis',
show_lastupdate:true,
width:12,
interval: 180,
results: 5}
Then I get:
And the rest of the blocks won't load anymore.
Re: Dashticz - Module - 112 Meldingen (Dutch)
Posted: Thursday 19 March 2020 18:52
by PietjePuck
And what about the first few rows of the dashticz.js ?
Re: Dashticz - Module - 112 Meldingen (Dutch)
Posted: Thursday 19 March 2020 18:54
by PietjePuck
I also see you did not define the default cors proxy. Can you define this and test ?
Re: Dashticz - Module - 112 Meldingen (Dutch)
Posted: Thursday 19 March 2020 19:37
by HansieNL
- Spoiler: show
PietjePuck wrote: ↑Thursday 19 March 2020 18:54
I also see you did not define the default cors proxy. Can you define this and test ?
Code: Select all
'tvguide',
'trafficinfo',
'alarmmeldingen',
'secpanel',
'graph'
Also tried with:
http://cors-anywhere.herokuapp.com
Still same problem of loading and not showing of other blocks. If I comment 'alarmmeldingen', everything works fine.
Re: Dashticz - Module - 112 Meldingen (Dutch)
Posted: Thursday 19 March 2020 19:41
by PietjePuck
And alarmmeldingen.js is in the js/components/ folder ?
Re: Dashticz - Module - 112 Meldingen (Dutch)
Posted: Thursday 19 March 2020 19:49
by Lokonli
I just merged "alarmmeldingen" into beta,
All credits go to @PietjePuck.
Instructions:
Define your "alarmmeldingen" block (optional):
Code: Select all
blocks['alarmmeldingen'] = {
rss: 'https://alarmeringen.nl/feeds/city/venlo.rss',
filter: 'Venlo',
}
Add "alarmmeldingen" to a column:
Code: Select all
columns[1]['blocks'] = [
'alarmmeldingen',
Use the site
https://alarmeringen.nl to find the rss-feed of your choice (region, city)
I've renamed the 'city' parameter to 'filter', because this better describes what the parameter is doing.
Filter is not case sensitive.
If you want to remove the icon, add the following to your block definition:
Code: Select all
icon: '', //This are two tick-marks
- alarmmeldingen.JPG (28.69 KiB) Viewed 4311 times
Re: Dashticz - Module - 112 Meldingen (Dutch)
Posted: Thursday 19 March 2020 19:52
by PietjePuck
Thx for your help in my first contribution to Dashticz
Re: Dashticz - Module - 112 Meldingen (Dutch)
Posted: Thursday 19 March 2020 19:53
by HansieNL
PietjePuck wrote: ↑Thursday 19 March 2020 19:41
And alarmmeldingen.js is in the js/components/ folder ?
Just downloaded your GitHub version and have the same problem. Not loaded and other blocks not shown.
CONFIG.js:
Code: Select all
var config = {}
config['domoticz_ip'] = 'http://192.168.2.14:8081';
config['login_timeout'] = '60';
config['user_name'] = '';
config['pass_word'] = '';
config['app_title'] = 'Dashticz V3';
config['room_plan'] = '0';
config['domoticz_refresh'] = '5';
config['dashticz_refresh'] = '60';
config['default_news_url'] = 'http://www.nu.nl/rss/algemeen';
config['news_scroll_after'] = '7';
config['default_cors_url'] = 'http://cors-anywhere.herokuapp.com';
config['dashticz_php_path'] = './vendor/dashticz/';
config['standby_call_url'] = '';
config['standby_call_url_on_end'] = '';
config['theme'] = 'default';
config['background_image'] = 'img/bg2.jpg';
config['standby_after'] = '0';
config['start_page'] = '1';
config['enable_swiper'] = '2';
config['vertical_scroll'] = '2';
config['auto_swipe_back_to'] = '1';
config['auto_swipe_back_after'] = '10';
config['auto_slide_pages'] = '';
config['slide_effect'] = 'slide';
config['standard_graph'] = 'hours';
config['blink_color'] = '255, 255, 255, 1';
config['language'] = 'nl_NL';
config['timeformat'] = 'DD-MM-YY HH:mm';
config['calendarformat'] = 'dd DD.MM HH:mm';
config['calendarlanguage'] = 'nl_NL';
config['calendarurl'] = '';
config['boss_stationclock'] = 'RedBoss';
config['gm_api'] = '';
config['gm_zoomlevel'] = '';
config['gm_latitude'] = '';
config['gm_longitude'] = '';
config['speak_lang'] = 'en-US';
config['wu_api'] = '';
config['wu_city'] = 'Amsterdam';
config['wu_name'] = '';
config['wu_country'] = 'NL';
config['owm_api'] = '';
config['owm_city'] = 'Mainaschaff';
config['owm_name'] = '';
config['owm_country'] = 'de';
config['owm_lang'] = '';
config['owm_cnt'] = '4';
config['idx_moonpicture'] = '';
config['longfonds_zipcode'] = '';
config['longfonds_housenumber'] = '';
config['switch_horizon'] = '';
config['host_nzbget'] = '';
config['spot_clientid'] = '';
config['sonarr_url'] = '';
config['sonarr_apikey'] = '';
config['sonarr_maxitems'] = '';
config['garbage_company'] = '';
config['garbage_icalurl'] = '';
config['google_api_key'] = '';
config['garbage_calendar_id'] = '';
config['garbage_zipcode'] = '';
config['garbage_street'] = '';
config['garbage_housenumber'] = '';
config['garbage_housenumberadd'] = '';
config['garbage_maxitems'] = '';
config['garbage_width'] = '';
config['setpoint_min'] = '5';
config['setpoint_max'] = '40';
config['evohome_status'] = 'Auto';
config['evohome_boost_zone'] = '60';
config['evohome_boost_hw'] = '15';
config['loginEnabled'] = 0;
config['disable_update_check'] = 0;
config['enable_websocket'] = 1;
config['no_rgb'] = 0;
config['auto_positioning'] = 0;
config['use_favorites'] = 0;
config['disable_googleanalytics'] = 0;
config['last_update'] = 1;
config['hide_topbar'] = 0;
config['security_button_icons'] = 0;
config['edit_mode'] = 0;
config['hide_seconds'] = 0;
config['hide_seconds_stationclock'] = 0;
config['owm_days'] = 0;
config['owm_min'] = 0;
config['use_fahrenheit'] = 0;
config['use_beaufort'] = 0;
config['translate_windspeed'] = 1;
config['static_weathericons'] = 0;
config['hide_mediaplayer'] = 0;
config['garbage_hideicon'] = 0;
config['garbage_icon_use_colors'] = 1;
config['garbage_use_colors'] = 0;
config['garbage_use_names'] = 0;
config['garbage_use_cors_prefix'] = 1;
var publictransport = {}
publictransport.ovinfobus = { show_via: false, station: 'son-en-breugel/bushalte-penseelkever', provider: '9292-bus', icon: 'bus', width:5, results: 6 }
var tvguide = {}
tvguide.dutch = { key:'dutch', icon: 'fas fa-tv', width:7, channels: [1,3,4,31,46,92], maxitems: 5 }
var _STREAMPLAYER_TRACKS = [
{"track":1,"name":"Q-music","file":"http://icecast-qmusic.cdp.triple-it.nl/Qmusic_nl_live_96.mp3"},
{"track":2,"name":"538 Hitzone","file":"http://vip-icecast.538.lw.triple-it.nl/WEB11_MP3"},
{"track":3,"name":"Slam! NonStop","file":"http://stream.radiocorp.nl/web10_mp3"},
{"track":4,"name":"100%NL","file":"http://stream.100p.nl/100pctnl.mp3"},
];
var buttons = {}
buttons.nunl = {key: 'nunl', width:12, icon: 'fa-newspaper-o', title: 'Nu.nl', newwindow:true, url: 'http://www.nu.nl'}
buttons.nos = {key: 'nos', width:12, icon: 'fa-newspaper-o', title: 'Nos', url: 'http://www.nos.nl'}
var blocks = {}
blocks['blocktitle_1'] = {}
blocks['blocktitle_1']['key'] = 'blocktitle_1';
blocks['blocktitle_1']['type'] = 'blocktitle';
blocks['blocktitle_1']['title'] = 'Example';
var alarmmeldingen = {
rss: 'http://www.alarmeringen.nl/feeds/region/rotterdam-rijnmond.rss',
city: 'Poortugaal,Rhoon,Hoogvliet,Traumaheli,Pernis',
show_lastupdate:true,
width:12,
interval: 180,
results: 5}
var columns = {}
columns['bar'] = {}
columns['bar']['blocks'] = ['logo','miniclock','settings']
columns[1] = {}
columns[1]['blocks'] = ['alarmmeldingen']
columns[1]['width'] = 5;
columns[2] = {}
columns[2]['blocks'] = ['blocktitle_1',tvguide.dutch,publictransport.ovinfobus]
columns[2]['width'] = 5;
columns[3] = {}
columns[3]['blocks'] = ['sunrise','streamplayer',buttons.nunl,buttons.nos]
columns[3]['width'] = 2;
var columns_standby = {}
columns_standby[1] = {}
columns_standby[1]['blocks'] = ['clock','weather']
columns_standby[1]['width'] = 12;
var screens = {}
screens[1] = {}
screens[1]['background'] = 'bg2.jpg';
screens[1]['columns'] = [1,2,3]
Re: Dashticz - Module - 112 Meldingen (Dutch)
Posted: Thursday 19 March 2020 19:58
by PietjePuck
Change
columns[1]['blocks'] = ['alarmmeldingen']
To
columns[1]['blocks'] = [alarmmeldingen]