Code: Select all
// Configuratie
var config = {}
config['language'] = 'nl_NL';
config['domoticz_ip'] = 'http://192.168.0.11:8080';
config['app_title'] = 'HOME Control';
config['domoticz_refresh'] = '5';
config['dashticz_refresh'] = '60';
config['default_news_url'] = 'http://www.nu.nl/';
config['news_scroll_after'] = '15';
config['standby_after'] = 1;
config['auto_swipe_back_to'] = 1;
config['auto_swipe_back_after'] = '600';
config['auto_slide_pages'] = 0;
config['slide_effect'] = 'slide';
config['standard_graph'] = 'hour';
config['timeformat'] = 'DD-MM-YY HH:mm';
config['calendarformat'] = 'dd DD.MM HH:mm';
config['calendarlanguage'] = 'nl_NL';
config['calendarurl'] = 'calendar.google.com/public/basic.ics'; // still don't know what to put in here
config['idx_moonpicture'] = 0;
config['switch_horizon'] = 0;
config['selector_instead_of_buttons'] = 0;
config['auto_positioning'] = 0;
config['use_favorites'] = 0;
config['last_update'] = 0;
config['hide_topbar'] = 1;
config['hide_seconds'] = 0;
config['hide_seconds_stationclock'] = 0;
config['use_fahrenheit'] = 0;
config['use_beaufort'] = 1;
config['translate_windspeed'] = 0;
config['static_weathericons'] = 0;
config['calendar_parse_localy']=true;
config['hide_mediaplayer'] = 0;
config['logo'] = '';
config['last_update'] = 0;
config['gm_api'] = '';
config['boss_stationclock'] = 'RedBoss';
config['hide_seconds_stationclock'] = 0;
//OpenWeather
config['owm_api'] = ';
config['owm_city'] = 'Rhoon';
config['owm_name'] = '';
config['owm_country'] = 'nl';
config['static_weathericons'] = 0;
//Vuilnis Module
config['garbage_company'] = '';
config['garbage_icalurl'] = 0;
config['garbage_zipcode'] = '3161LH';
config['garbage_street'] = 'Jonkerhof';
config['garbage_housenumber'] = '27';
config['garbage_maxitems'] = '3';
config['garbage_width'] = '12';
config['garbage_hideicon'] = 0;
config['garbage_use_names'] = true;
config['garbage_use_colors'] = true;
config['garbage_icon_use_colors'] = true;
config['garbage_use_cors_prefix'] = false;
config['garbage'] = {
gft: {kliko: 'green', code: '#FF8C00', name: 'GFT', icon: 'img/garbage/kliko_brown.png'},
pmd: {kliko: 'orange', code: '#db5518', name: 'PMD', icon: 'img/garbage/kliko_orange.png'},
rest: {kliko: 'grey', code: '#7CFC00', name: 'Restafval', icon: 'img/garbage/kliko_green.png'},
papier: {kliko: 'blue', code: '#00BFFF', name: 'Papier', icon: 'img/garbage/kliko_blue.png'},
kca: {kliko: 'red', code: '#b21807', name: 'Chemisch afval', icon: 'img/garbage/kliko_red.png'},
brown: {kliko: 'brown', code: '#7c3607', name: 'Bruin', icon: 'img/garbage/kliko_brown.png'},
black: {kliko: 'black', code: '#000000', name: 'Zwart', icon: 'img/garbage/kliko_black.png'},
milieu: {kliko: 'yellow', code: '#f9e231', name: 'Geel', icon: 'img/garbage/kliko_yellow.png'},
kerstboom: {kliko: 'green', code: '#375b23', name: 'Kerstboom', icon: 'img/garbage/tree.png'},}
config['lineColors'] = ['#f1c40f', '#40e0d0', '#eee'];
var frames = {}
frames.artwork = {width:12, isimage:true, refresh:2000, image: 'http://192.168.0.10:9002/music/current/cover.jpg?player=b8:27:eb:00:62:03'}
frames.weather = {refreshiframe:1800000,height:230,frameurl:"http://forecast.io/embed/#lat=51.860062&lon=4.412646&name=Rhoon&lang=nl&color=#00aaff&font=Helvetica&fontcolor=#ffffff&units=si",width:12}
//Knoppen var aanmaken
var buttons = {}
buttons.ipcam1 = {key: 'cam1' , width:12, isimage:true, image: ' https://spacetrack.eu/iss/globe.php?114126457&'}
//buttons.ipcam2 = {key: 'cam2' , width:12, isimage:true, image: ' https://spacetrack.eu/iss/globe.php?114126457&'}
buttons.energie = {key: 'EnergiePag', width:12, icon: 'fas fa-plug', title: 'Ga naar Energie' ,slide:2 }
buttons.home = {key: 'Homepage' , width:12, icon: 'fas fa-home', title: 'Ga naar Thuis Scherm' ,slide:1 }
buttons.bedien = {key: 'Bedienpage' , width:12, icon: 'fas fa-user-alt', title: 'TOON®/Schakelaars' ,slide:3 }
//OV
var publictransport = {}
publictransport.trein1= { show_via: true, station: 'station-kampen', title:'NS Kampen Centraal', show_lastupdate:true, provider: '9292-train', icon: 'train', results: 5 };
publictransport.trein2= { show_via: true, station: 'station-kampen-zuid', title:'NS Kampen Zuid', show_lastupdate:true, provider: '9292-train', icon: 'train', results: 5 };
publictransport.bus= { show_via: true, station: 'station-kampen', title:'Bus', show_lastupdate:true, provider: '9292-bus', icon: 'bus', results: 5 };
//Calendar
var calendars = {}
calendars.business = { url: 'https://calendar.google.com/calendar/r', icon:'fa-calendar', maxitems: 5, color:'red',icalurl: 'https://calendar.google.com/calendar/ical/' }
calendars.private = { icon: 'fa-calendar', maxitems: 5, color:'green',icon:'fa-calendar', color:'green', icalurl: 'https://calendar.google.com/calendar/ical/' }
calendars.combined = {}
calendars.combined.maxitems = 5 ;
calendars.combined.calendars = [
{ color:'green', calendar:calendars.business },
{ color:'red', calendar:calendars.private }
]
calendars.combined.url = 'https://calendar.google.com/calendar';
//buttons.moon = {key: 'moon'width:12, isimage:true, refreshimage:60000, image: 'moon'}
var blocks = {}
// Bloknamen
blocks['blocktitle_1'] = {}
blocks['blocktitle_1']['type'] = 'blocktitle';
blocks['blocktitle_1']['title'] = 'TOON®'
blocks['blocktitle_1']['width'] = 12 ;
blocks['blocktitle_2'] = {}
blocks['blocktitle_2']['type'] = 'blocktitle';
blocks['blocktitle_2']['title'] = 'WEER'
blocks['blocktitle_2']['width'] = 12 ;
blocks['blocktitle_3'] = {}
blocks['blocktitle_3']['type'] = 'blocktitle';
blocks['blocktitle_3']['title'] = 'Energie/GAS'
blocks['blocktitle_3']['width'] = 12 ;
blocks['blocktitle_4'] = {}
blocks['blocktitle_4']['type'] = 'blocktitle';
blocks['blocktitle_4']['title'] = 'Lampen/Schakelaars'
blocks['blocktitle_4']['width'] = 12 ;
blocks['blocktitle_5'] = {}
blocks['blocktitle_5']['type'] = 'blocktitle';
blocks['blocktitle_5']['title'] = 'Agenda / Nieuws'
blocks['blocktitle_5']['width'] = 12 ;
blocks['blocktitle_6'] = {}
blocks['blocktitle_6']['type'] = 'blocktitle';
blocks['blocktitle_6']['title'] = 'Nieuws / Files / Weer'
blocks['blocktitle_6']['width'] = 12 ;
blocks['blocktitle_7'] = {}
blocks['blocktitle_7']['type'] = 'blocktitle';
blocks['blocktitle_7']['title'] = 'Oranje = Hoog tarief / Blauw = Laag tarief'
blocks['blocktitle_7']['width'] = 12 ;
blocks['blocktitle_8'] = {}
blocks['blocktitle_8']['type'] = 'blocktitle';
blocks['blocktitle_8']['title'] = 'Oranje = Hoog tarief / Blauw = Laag tarief'
blocks['blocktitle_8']['width'] = 12 ;
blocks['blocktitle_9'] = {}
blocks['blocktitle_9']['type'] = 'blocktitle';
blocks['blocktitle_9']['title'] = 'Diverse blocks'
blocks['blocktitle_9']['width'] = 12 ;
// Standaard blokken met config benaming
blocks['news_1'] = {}
blocks['news_1']['feed'] = 'https://cors-anywhere.herokuapp.com/http://www.nu.nl/rss/Algemeen';
blocks['news_1']['maxheight'] = 300;
// scenes
blocks['s1'] = {}
blocks['s1']['title'] = 'Lampen';
blocks['s1']['width'] = 6;
//Regenkans
blocks[9] = {}
blocks[9]['title'] = 'Regenkans';
blocks[9]['width'] = 4;
blocks[9]['switch'] = true;
blocks[9]['icon'] = 'fas fa-tint';
// Iemand thuis
blocks[12] = {}
blocks[12]['title'] = 'Edwin';
blocks[12]['icon'] = 'fas fa-male';
blocks[12]['width'] = 6;
// Onweer
blocks['51_1'] = {}
blocks['51_1']['title'] = 'Onweer';
blocks['51_1']['icon'] = 'fas fa-bolt';
blocks['51_1']['width'] = 6;
blocks['51_1']['switch'] = true;
// Zonwering
blocks[20] = {}
blocks[20]['width'] = 12;
blocks[20]['hide_stop'] = true;
//Zonwering manual
blocks[30] = {}
blocks[30]['title'] = 'manual'
blocks[30]['width'] = 6;
blocks[30]['hide_stop'] = true;
blocks[31] = {}
blocks[31]['title'] = 'HUE';
blocks[31]['width'] = 12;
blocks[31]['icon'] = 'fa-lightbulb-o';
// TEMP SLK
blocks['21_1'] = {}
blocks['21_1']['title'] = 'SLK';
blocks['21_1']['width'] = 6;
blocks['21_1']['switch'] = true;
// Temp HSK
blocks['16_1'] = {}
blocks['16_1']['title'] = 'HSK';
blocks['16_1']['width'] = 6
blocks['16_1']['switch'] = true;
// buiten temp
blocks['33_1'] = {}
blocks['33_1']['title'] = 'Buiten';
blocks['33_1']['switch'] = true;
blocks['33_1']['width'] = 6;
// Weer en metingen van buiten OWM
// Buiten temperatuur
blocks['47_1'] = {}
blocks['47_1']['title'] = 'Temperatuur';
blocks['47_1']['width'] = 4;
blocks['47_1']['switch'] = true;
// Luchtvochtigheid
blocks['47_2'] = {}
blocks['47_2']['title'] = 'Vochtigheid';
blocks['47_2']['width'] = 4;
blocks['47_2']['switch'] = true;
// Lucht druk
blocks['47_3'] = {}
blocks['47_3']['title'] = 'Baro';
blocks['47_3']['width'] = 4;
blocks['47_3']['switch'] = true;
// Windkracht
blocks[48] = {}
blocks[48]['title'] = 'Windkracht';
blocks[48]['width'] = 4;
blocks[48]['switch'] = true;
// Zicht
blocks[49] = {}
blocks[49]['title'] = 'Zicht';
blocks[49]['width'] = 4;
blocks[49]['switch'] = true;
// Clouds-index
blocks[50] = {}
blocks[50]['title'] = 'Clouds';
blocks[50]['width'] = 4;
blocks[50]['switch'] = true;
blocks[50]['icon'] = 'fas fa-cloud';
// P1 GAS
// Gas meter verbruik vandaag
blocks['37_1'] = {}
blocks['37_1']['width'] = 4;
blocks['37_1']['title'] = 'Gas Vandaag';
blocks['37_1']['switch'] = true;
// blocks['37_1']['image'] = 'gas48.png';
// Gasmeter verbruik totaal
blocks['37_2'] = {}
blocks['37_2']['width'] = 4;
blocks['37_2']['title'] = 'Gas Totaal';
blocks['37_2']['switch'] = true;
// P1 Elektra
// KWh verbruik actueel
blocks['39_1'] = {}
blocks['39_1']['title'] = 'Energie Actueel';
blocks['39_1']['width'] = 12;
blocks['39_1']['switch'] = true;
// Verbruik KWh Vandaag
blocks['39_2'] = {}
blocks['39_2']['title'] = 'Energie vandaag';
blocks['39_2']['width'] = 4;
blocks['39_2']['switch'] = true;
// Totale KWh verbruik
blocks['39_3'] = {}
blocks['39_3']['title'] = 'Energie Totaal';
blocks['39_3']['width'] = 4;
blocks['39_3']['switch'] = true;
blocks['39_3']['image'] = 'current48.png';
// Blokken die nog geplaatst moeten worden
// mm Regen
/* blocks[59] = {}
blocks[59]['title'] = 'Regen'
blocks[59]['width'] = 4;
blocks[59]['switch'] = true;*/
// Gevoelstemperatuur, Windchill
/* blocks[75] = {}
blocks[75]['title'] = 'windchill';
blocks[75]['width'] = 4;
blocks[75]['switch'] = true; */
//Schakelaars
/* blocks[39] = {}
blocks[39]['title'] = 'HSK-1';
blocks[39]['width'] = 6;
blocks[44] = {}
blocks[44]['title'] = 'HSK-2';
blocks[44]['width'] = 6;
blocks[37] = {}
blocks[37]['title'] = 'FAN_hsk';
blocks[37]['width'] = 6;
blocks[45] = {}
blocks[45]['title'] = 'FAN-slk';
blocks[45]['width'] = 6;
blocks[18] = {}
blocks[18]['title'] = 'HUE';
blocks[18]['width'] = 8;
blocks[24] = {}
blocks[24]['title'] = 'KetelInfo';
blocks[24]['width'] = 6;
blocks[48] = {}
blocks[48]['width'] = 6;
blocks[49] = {}
blocks[49]['width'] = 6;
blocks[50] = {}
blocks[50]['width'] = 6;
blocks[51] = {}
blocks[51]['width'] = 6;
blocks[52] = {}
blocks[52]['width'] = 6; */
blocks[15] = {}
blocks[15]['title'] = 'Berging';
blocks[15]['width'] = 6;
//TOON - Rooted
blocks[38] = {}
blocks[38]['title'] = 'KamerTmp';
blocks[38]['switch'] = true;
blocks[38]['width'] = 4;
// werkt niet!
//blocks[36] = {}
//blocks[36]['title'] = '';
//blocks[36]['switch'] = true;
//blocks[36]['width'] = 6;
blocks[42] = {}
blocks[42]['title'] = 'Toon Prog';
//blocks[42]['switch'] = true;
blocks[42]['width'] = 6;
blocks[45] = {}
blocks[45]['title'] = 'Toon Autoprog';
blocks[45]['switch'] = true;
blocks[45]['width'] = 6;
blocks[43] = {}
blocks[43]['title'] = 'Ketelstand';
blocks[43]['switch'] = true;
blocks[43]['width'] = 6;
blocks[44] = {}
blocks[44]['title'] = 'Toon Scenes';
blocks[44]['switch'] = true;
blocks[44]['width'] = 12;
blocks[34] = {}
blocks[34]['switch'] = true;
blocks[34]['title'] = 'Mod. Lvl';
blocks[34]['width'] = 6;
blocks[35] = {}
blocks[35]['switch'] = true;
blocks[35]['title'] = 'Keteldruk';
blocks[35]['width'] = 6;
blocks[40] = {}
blocks[40]['switch'] = true;
blocks[40]['title'] = 'Boiler IN';
blocks[40]['width'] = 6;
blocks[41] = {}
blocks[41]['title'] = 'Boiler UIT';
blocks[41]['switch'] = true;
blocks[41]['width'] = 6;
// Hier worden de kolommen voor op het scherm gemaakt
var columns = {}
columns['bar'] = {}
columns['bar']['blocks'] = ['logo','miniclock','settings']
//screen 1
columns[1] = {}
columns[1]['blocks'] = [buttons.ipcam1,frames.artwork]
columns[1]['width'] = 3;
columns[2] = {}
columns[2]['blocks'] = ['blocktitle_5',calendars.combined,'garbage','news_1']
columns[2]['width'] = 3;
columns[3] = {}
columns[3]['blocks'] = ['blocktitle_2',frames.weather,38,'21_1','16_1','33_1','47_1','47_2','47_3',48,49,50,9,'51_1']
columns[3]['width'] = 4;
columns[4] = {}
columns[4]['blocks'] = ['sunrise',31,44,12,30,20,26,24,buttons.home,buttons.energie,buttons.bedien]
columns[4]['width'] = 2;
//screen 2
columns[5] = {}
columns[5]['width'] = 3;
columns[5]['blocks'] = ['blocktitle_3','39_1','39_2','39_3','37_1','37_2']
columns[6] = {}
columns[6]['blocks']=[]
columns[6]['width'] = 3;
columns[7] = {}
columns[7]['blocks'] = []
columns[7]['width'] = 4;
//screen 3
columns[8] = {}
columns[8]['blocks'] = ['blocktitle_4',15]
columns[8]['width'] = 3;
columns[9] = {}
columns[9]['blocks'] = ['blocktitle_1',34,35,40,41,42,43,45]
columns[9]['width'] = 3;
columns[10] = {}
columns[10]['blocks'] = []
columns[10]['width'] = 4;
//Standby modus configuratie
var columns_standby = {}
columns_standby[1] = {}
columns_standby[1]['blocks'] = ['clock'] //specify blocks for the standby mode
columns_standby[1]['width'] = 12;
//Hier worden de verschillende schermen gemaakt welke je kunt swipen
var screens = {}
screens['default'] = {}
screens['default']['maxwidth'] = 1920;
screens['default']['maxheight'] = 1080;
screens['default'][1] = {}
screens['default'][1]['background'] = 'bg10.jpg';
screens['default'][1]['columns'] = [1,2,3,4]
screens['default'][2] = {}
screens['default'][2]['background'] = 'bg10.jpg';
screens['default'][2]['columns'] = [5,6,7,4]
screens['default'][3] = {}
screens['default'][3]['background'] = 'bg10.jpg';
screens['default'][3]['columns'] = [8,9,10,4]