And here is the Config now keep in mind I used someone else's Template so there's lots of comments and stuff and it's huge, to be ready for the future:
Code: Select all
config = {}
config['domoticz_ip'] = 'http://192.168.REDACTED';
config['app_title'] = 'Dashticz Dashboard';
config['domoticz_refresh'] = '5';
config['dashticz_refresh'] = '30';
config['login_timeout'] = '60';
config['user_name'] = 0;
config['pass_word'] = 0;
config['domoticz_timeout'] = '2000';
config['colorpicker'] = '2';
config['default_news_url'] = 'http://www.nu.nl/rss/algemeen';
config['news_scroll_after'] = '7';
config['default_cors_url'] = 0;
config['dashticz_php_path'] = './vendor/dashticz/';
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'] = 0;
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'] = 0;
config['boss_stationclock'] = 'RedBoss';
config['setpoint_min'] = '5';
config['setpoint_max'] = '40';
config['owm_api'] = 'REDACTED';
config['owm_city'] = 'Waalre';
config['owm_name'] = '';
config['owm_country'] = 'NL';
config['owm_lang'] = 'en';
config['owm_cnt'] = '3';
config['owm_min'] = 1;
config['owm_days'] = 1;
config['use_fahrenheit'] = 0;
config['use_beaufort'] = 0;
config['translate_windspeed'] = 1;
config['disable_update_check'] = 0;
config['loginEnabled'] = 0;
config['enable_websocket'] = 1;
config['auto_positioning'] = 1;
config['use_favorites'] = 0;
config['last_update'] = 1;
config['disable_googleanalytics'] = 0;
config['hide_topbar'] = 0;
config['swiper_touch_move'] = 1;
config['security_button_icons'] = 0;
config['security_panel_lock'] = 0;
config['edit_mode'] = 0;
config['hide_seconds'] = 0;
config['hide_seconds_stationclock'] = 0;
config['static_weathericons'] = 0;
config['hide_mediaplayer'] = 0;
// --------------------------------------------------------------------------------------------
// Screen definitions
// --------------------------------------------------------------------------------------------
var max_resolution_desktop = 'default';
var max_resolution_smart = 'tablet';
// --------------------------------------------------------------------------------------------
// Title Definitions
// --------------------------------------------------------------------------------------------
var title_misc = 'title_misc';
var title_hue = 'title_hue';
var title_presence = 'title_presence';
var title_temperature = 'title_temperature';
var title_gas_and_elektra = 'title_gas_and_elektra';
var title_news = 'title_news'
var title_tweakers = 'title_tweakers';
var title_tvguide_1 = 'title_tvguide_1';
var title_tvguide_2 = 'title_tvguide_2';
var title_radio = 'title_radio';
var title_raspberry = 'title_raspberry';
var title_solar = 'title_solar'
// --------------------------------------------------------------------------------------------
// IDX Definitions
// --------------------------------------------------------------------------------------------
var phone_thur = 46;
var phone_peet = 47;
var temp_woonkamer_setpoint = 30;
var temperatuur_woonkamer = 31;
var temperatuur_buiten = 34;
//var temperatuur_zolder = '154_1';
//var temperatuur_garage = '794_1';
var p1_gas = 2;
var p1_elektra_nu = 1;
var p1_gas_nu = '2_1';
var p1_gas_totaal = '2_2';
var p1_elektra_nu = '1_1';
var p1_elektra_vandaag = '1_2';
var p1_elektra_totaal = '1_3';
//var p1_solar_nu = 43;
var p1_grafiek_gas = 'graph_2';
var p1_grafiek_elektra = 'graph_1';
var solar_nu = 82;
var solar_totaal = 81;
var solar_inverter = 83;
var pi_cpu_temperature = 48;
var pi_cpu_usage = 51;
var pi_cpu_speed = 52;
var pi_cpu_memory = 54;
var pi_up_time = 53;
var pi_memory_usage = 50;
var pi_domoticz_memory = 62;
var news_1 = 'news_1';
var news_2 = 'news_2';
// --------------------------------------------------------------------------------------------
// Buttons
// --------------------------------------------------------------------------------------------
var buttons = {}
// --------------------------------------------------------------------------------------------
// Nieuws sites
// --------------------------------------------------------------------------------------------
buttons.nos = { width:3, icon: 'far fa-newspaper', title: "NOS ", url: 'http://www.nos.nl' }
buttons.nunl = { width:3, icon: 'far fa-newspaper', title: "Nu.nl", url: 'http://www.nu.nl' }
buttons.telegraaf = { width:3, icon: 'far fa-newspaper', title: "Telegraaf", url: 'http://telegraaf.nl' }
// --------------------------------------------------------------------------------------------
// Buienradar
// --------------------------------------------------------------------------------------------
buttons.buienradar = {width:6, isimage:true, btnimage: 'http://api.buienradar.nl/image/1.0/RadarMapNL?w=175&h=175', url: 'https://hetweerlokaal.nl/nederland/noord-brabant/waalre'}
// --------------------------------------------------------------------------------------------
// TV Gids
// --------------------------------------------------------------------------------------------
// 1 = NPO1, 2 = NPO2, 3 = NPO4, 4 = RTL4, 31 = RTL5, 36 = SBS6, 46 = RTL7, 37 = NET5, 34 = Veronica, 92 = RTL8
// 435 = 24Kitchen, 6 = Canvas, 466 = Ziggo Sport, 148 = Fox Sports Eredivisie
var tvguide = {}
tvguide.dutch_1 = { key:'dutch', width:12, channels: [1,2,3,4,31,36,46,37,34,92], maxitems: 8 }
tvguide.dutch_2 = { key:'dutch', width:12, channels: [435,466,148], maxitems: 5 }
// --------------------------------------------------------------------------------------------
// Logging
// --------------------------------------------------------------------------------------------
buttons.log = {key:'log', width:12, icon:'fas fa-microchip', title: 'Logging Domoticz', log:true, level: 2}
// --------------------------------------------------------------------------------------------
// Radio
// --------------------------------------------------------------------------------------------
var _STREAMPLAYER_TRACKS = [
{"track":1,"name":"Radio 538","file":"http://playerservices.streamtheworld.com/api/livestream-redirect/RADIO538.mp3"},
{"track":2,"name":"Q-music","file":"http://icecast-qmusic.cdp.triple-it.nl/Qmusic_nl_live_96.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"},
{"track":6,"name":"NPO Radio 1","file":"http://icecast.omroep.nl/radio1-bb-mp3"},
{"track":7,"name":"Omroep Brabant","file":"http://streaming.omroepbrabant.nl/mp3"},
];
// --------------------------------------------------------------------------------------------
// Blocks
// --------------------------------------------------------------------------------------------
var blocks = {}
// Phone Thursten
blocks[phone_thur] = {}
blocks[phone_thur]['title'] = 'Thur';
blocks[phone_thur]['icon'] = 'fas fa-male';
blocks[phone_thur]['width'] = 3;
blocks[phone_thur]['last_update'] = true;
blocks[phone_thur]['protected'] = true;
blocks[phone_thur]['hide_data'] = false;
// Phone Peet
blocks[phone_peet] = {}
blocks[phone_peet]['title'] = 'Peet';
blocks[phone_peet]['icon'] = 'fas fa-female';
blocks[phone_peet]['width'] = 3;
blocks[phone_peet]['last_update'] = true;
blocks[phone_peet]['protected'] = true;
blocks[phone_peet]['hide_data'] = true;
// Temperatuur Woonkamer
blocks[temperatuur_woonkamer] = {}
blocks[temperatuur_woonkamer]['title'] = 'Woonkamer'
blocks[temperatuur_woonkamer]['width'] = 3;
blocks[temperatuur_woonkamer]['switch'] = true;
blocks[temperatuur_woonkamer]['last_update'] = false;
// Temperatuur Buiten
blocks[temperatuur_buiten] = {}
blocks[temperatuur_buiten]['title'] = 'Buiten'
blocks[temperatuur_buiten]['width'] = 3;
blocks[temperatuur_buiten]['switch'] = true;
blocks[temperatuur_buiten]['last_update'] = false;
// Woonkamer Temp Setpoint
blocks[temp_woonkamer_setpoint] = {}
blocks[temp_woonkamer_setpoint]['width'] = 4;
blocks[temp_woonkamer_setpoint]['last_update'] = false;
// Smartmeter Gas
blocks[p1_gas] = {}
blocks[p1_gas]['width'] = 4;
blocks[p1_gas]['last_update'] = false;
blocks[p1_gas]['protected'] = true;
blocks[p1_gas_nu] = {}
blocks[p1_gas_nu]['width'] = 4;
blocks[p1_gas_nu]['title'] = 'Gas Vandaag';
blocks[p1_gas_nu]['last_update'] = false;
blocks[p1_gas_nu]['protected'] = true;
blocks[p1_gas_totaal] = {}
blocks[p1_gas_totaal]['width'] = 4;
blocks[p1_gas_totaal]['title'] = 'Gas Totaal';
blocks[p1_gas_totaal]['last_update'] = false;
blocks[p1_gas_totaal]['protected'] = true;
// Smart Meter Elektra: _1 = Huidig Elektra, _2 = Elektra Vandaag, _3 = Elektra Totaal
// Smartmeter Elektra
blocks[p1_elektra_nu] = {}
blocks[p1_elektra_nu]['width'] = 4;
blocks[p1_elektra_nu]['title'] = 'Energie Nu';
blocks[p1_elektra_nu]['last_update'] = false;
blocks[p1_elektra_nu]['protected'] = true;
blocks[p1_elektra_vandaag] = {}
blocks[p1_elektra_vandaag]['width'] = 4;
blocks[p1_elektra_vandaag]['last_update'] = false;
blocks[p1_elektra_vandaag]['protected'] = true;
blocks[p1_elektra_totaal] = {}
blocks[p1_elektra_totaal]['width'] = 4;
blocks[p1_elektra_totaal]['title'] = 'Energie Totaal';
blocks[p1_elektra_totaal]['last_update'] = false;
blocks[p1_elektra_totaal]['protected'] = true;
// Definition 'Gas' graph (= device 137)
blocks[p1_grafiek_gas] = {
title: 'Gas',
width: 6,
height: '200px',
custom : {
"maand": {
graph: 'bar',
range: 'month',
groupBy: 'day',
data: {
Gas: 'd.v_2'
}
},
"week per dag": {
graph: 'bar',
range: 'month',
groupBy: 'day',
filter: '7 days',
data: {
Gas: 'd.v_2'
},
},
"jaar": {
graph: 'bar',
range: 'year',
groupBy: 'month',
data: {
Gas: 'd.v_2'
},
},
"dag": {
graph: 'bar',
range: 'day',
groupBy: 'hour',
data: {
Gas: 'd.v_2'
}
},
},
legend: false,
datasetColors: ['gray'],
displayFormats : {
minute: 'h:mm',
hour: 'h:mm',
day: 'DD MMM',
week: 'DD MMM',
month: 'MMM',
}
}
// Definition 'Elektriciteit' graph (= device 1)
blocks[p1_grafiek_elektra] = {
title: 'Elektriciteit',
width: 6,
height: '200px',
custom : {
"maand": {
graph: 'bar',
range: 'month',
groupBy: 'day',
data: {
Elektra: 'd.v_1+d.v2_1'
}
},
"week per dag": {
graph: 'bar',
range: 'month',
groupBy: 'day',
filter: '7 days',
data: {
Elektra: 'd.v_1+d.v2_1'
},
},
"jaar": {
graph: 'bar',
range: 'year',
groupBy: 'month',
data: {
Elektra: 'd.v_1+d.v2_1'
},
},
"dag": {
graph: 'bar',
range: 'day',
groupBy: 'hour',
data: {
Elektra: 'd.v_1+d.v2_1'
}
},
},
legend: false,
datasetColors: ['gray'],
displayFormats : {
minute: 'h:mm',
hour: 'h:mm',
day: 'DD MMM',
week: 'DD MMM',
month: 'MMM',
}
}
// Solar Info - Growatt
blocks[solar_nu] = {}
blocks[solar_nu]['width'] = 4;
blocks[solar_nu]['title'] = 'Solar Nu';
blocks[solar_nu]['last_update'] = false;
blocks[solar_nu]['protected'] = true;
blocks[solar_totaal] = {}
blocks[solar_totaal]['width'] = 4;
blocks[solar_totaal]['title'] = 'Solar Totaal';
blocks[solar_totaal]['last_update'] = false;
blocks[solar_totaal]['protected'] = true;
blocks[solar_inverter] = {}
blocks[solar_inverter]['title'] = 'Inverter';
blocks[solar_inverter]['width'] = 3;
blocks[solar_inverter]['last_update'] = false;
blocks[solar_inverter]['protected'] = true;
blocks[solar_inverter]['hide_data'] = true;
//
// Raspberry PI statistics
//
blocks[pi_cpu_temperature] = {};
blocks[pi_cpu_temperature]['width'] = 6;
blocks[pi_cpu_temperature]['icon'] = 'fa fa-microchip';
blocks[pi_cpu_temperature]['last_update'] = false;
blocks[pi_cpu_usage] = {};
blocks[pi_cpu_usage]['width'] = 6;
blocks[pi_cpu_usage]['icon'] = 'fa fa-microchip';
blocks[pi_cpu_usage]['last_update'] = false;
blocks[pi_cpu_speed] = {};
blocks[pi_cpu_speed]['width'] = 6;
blocks[pi_cpu_speed]['icon'] = 'fa fa-microchip';
blocks[pi_cpu_speed]['last_update'] = false;
blocks[pi_cpu_memory] = {};
blocks[pi_cpu_memory]['width'] = 6;
blocks[pi_cpu_memory]['icon'] = 'fa fa-microchip';
blocks[pi_cpu_memory]['last_update'] = false;
blocks[pi_up_time] = {};
blocks[pi_up_time]['width'] = 6;
blocks[pi_up_time]['icon'] = 'fa fa-microchip';
blocks[pi_up_time]['last_update'] = false;
blocks[pi_memory_usage] = {};
blocks[pi_memory_usage]['width'] = 6;
blocks[pi_memory_usage]['icon'] = 'fa fa-microchip';
blocks[pi_memory_usage]['last_update'] = false;
blocks[pi_domoticz_memory] = {};
blocks[pi_domoticz_memory]['width'] = 6;
blocks[pi_domoticz_memory]['icon'] = 'fa fa-microchip';
blocks[pi_domoticz_memory]['last_update'] = false;
// Newsfeed
blocks[news_1] = {}
blocks[news_1]['feed'] = 'http://www.nu.nl/rss/algemeen';
blocks[news_1]['title'] = 'NU.nl RSS Feed';
blocks[news_1]['width'] = 12;
blocks[news_1]['maxheight'] = 'auto';
blocks[news_1]['protected'] = true;
blocks[news_2] = {}
blocks[news_2]['feed'] = 'https://feeds.feedburner.com/tweakers/nieuws';
blocks[news_2]['width'] = 12;
blocks[news_2]['protected'] = true;
// --------------------------------------------------------------------------------------------
// Title Blocks
// --------------------------------------------------------------------------------------------
// Title: HUE lichten
blocks[title_hue] = {}
blocks[title_hue]['type'] = 'blocktitle'
blocks[title_hue]['title'] = 'Hue Lichten'
// Title: Aanwezigheid
blocks[title_presence] = {}
blocks[title_presence]['type'] = 'blocktitle'
blocks[title_presence]['title'] = 'Aanwezigheid'
// Title: Temperatuur
blocks[title_temperature] = {}
blocks[title_temperature]['type'] = 'blocktitle'
blocks[title_temperature]['title'] = 'Temperatuur'
// Title: Gas & Elektra
blocks[title_gas_and_elektra] = {}
blocks[title_gas_and_elektra]['type'] = 'blocktitle'
blocks[title_gas_and_elektra]['title'] = 'Gas & Elektra'
// Title: Nieuws
blocks[title_news] = {}
blocks[title_news]['type'] = 'blocktitle'
blocks[title_news]['title'] = 'Nieuws'
// Title: Tweakers
blocks[title_tweakers] = {}
blocks[title_tweakers]['type'] = 'blocktitle'
blocks[title_tweakers]['title'] = 'Tweakers'
// Title: TV Gids - NL Zenders
blocks[title_tvguide_1] = {}
blocks[title_tvguide_1]['type'] = 'blocktitle'
blocks[title_tvguide_1]['title'] = 'TV Gids - NL Zenders'
// Title: Radio
blocks[title_radio] = {}
blocks[title_radio]['type'] = 'blocktitle'
blocks[title_radio]['title'] = 'Radio'
// Title: Raspberry
blocks[title_raspberry] = {}
blocks[title_raspberry]['type'] = 'blocktitle'
blocks[title_raspberry]['title'] = 'Raspberry'
// Title: Diversen
blocks[title_misc] = {}
blocks[title_misc]['type'] = 'blocktitle'
blocks[title_misc]['title'] = 'Diversen'
// Title: Solar Info
blocks[title_solar] = {}
blocks[title_solar]['type'] = 'blocktitle'
blocks[title_solar]['title'] = 'Solar Info'
// --------------------------------------------------------------------------------------------
// Garbage Collector
// --------------------------------------------------------------------------------------------
config['garbage_company'] = 'REDACTED';
config['garbage_zipcode'] = 'REDACTED';
config['garbage_street'] = 'REDACTED';
config['garbage_housenumber'] = 'REDACTED';
config['garbage_maxitems'] = '4';
config['garbage_width'] = '5';
config['garbage_use_names'] = true;
config['garbage_use_colors'] = true;
config['garbage'] = {
gft: {kliko: 'green', code: '#375b23', name: 'GFT'},
pmd: {kliko: 'orange', code: '#db5518', name: 'PMD'},
rest: {kliko: 'brown', code: '#7c3607', name: 'Restafval'},
papier: {kliko: 'blue', code: '#153477', name: 'Papier'},
// kca: {kliko: 'red', code: '#b21807', name: 'Chemisch afval'},
// brown: {kliko: 'brown', code: '#5e5d5c', name: 'Bruin'},
// black: {kliko: 'black', code: '#000000', name: 'Zwart'},
};
// --------------------------------------------------------------------------------------------
// Columns
// --------------------------------------------------------------------------------------------
var columns = {}
columns[1] = {}
columns[1]['blocks'] = [title_presence, phone_thur, phone_peet, title_temperature, temperatuur_woonkamer, temperatuur_buiten, title_solar, solar_inverter, solar_nu, solar_totaal]
columns[1]['width'] = 4;
columns[2] = {}
columns[2]['blocks'] = [title_misc, 'garbage', title_gas_and_elektra, temp_woonkamer_setpoint, p1_gas_nu, p1_gas_totaal, p1_elektra_nu, p1_elektra_vandaag, p1_elektra_totaal, p1_grafiek_gas, p1_grafiek_elektra]
columns[2]['width'] = 5;
columns[3] = {}
columns[3]['blocks'] = ['sunrise', buttons.log]
columns[3]['width'] = 2;
columns[5] = {}
columns[5]['blocks'] = [title_news, news_1, 'currentweather_big_owm', 'weather_owm']
columns[5]['width'] = 4;
columns[6] = {}
columns[6]['blocks'] = [title_tvguide_1, tvguide.dutch_1]
columns[6]['width'] = 4;
columns[9] = {}
columns[9]['blocks'] = [title_raspberry, pi_up_time, pi_cpu_usage, pi_cpu_temperature, pi_memory_usage, title_radio, 'streamplayer']
columns[9]['width'] = 4;
// --------------------------------------------------------------------------------------------
// Screens
// --------------------------------------------------------------------------------------------
var screens = {}
screens[max_resolution_desktop] = {}
screens[max_resolution_desktop]['maxwidth'] = 2560;
screens[max_resolution_desktop]['maxheight'] = 1440;
screens[max_resolution_desktop][1] = {}
//screens[max_resolution_desktop][1]['background'] = 'bg14_lightgray.jpg';
screens[max_resolution_desktop][1]['columns'] = [1,2,3]
screens[max_resolution_desktop][2] = {}
//screens[max_resolution_desktop][2]['background'] = 'bg14_lightgray.jpg';
screens[max_resolution_desktop][2]['columns'] = [5,6,9]