Dashticz, alternative dashboard based on HTML, CSS, jQuery
Moderators: leecollings , htilburgs , robgeerts
robgeerts
Posts: 1273 Joined: Saturday 24 January 2015 22:12
Target OS: NAS (Synology & others)
Domoticz version: 3.7067
Location: NL
Contact:
Post
by robgeerts » Tuesday 06 February 2018 21:13
_SHOW_LASTUPDATE is an old variable, this is the working code:
Code: Select all
function getBlock_150(device,idx){ //idx 150 - iPhone Harm
$('.block_'+idx).attr('switchDevice(this)');
var html='';
html+='<div class="col-xs-4 col-icon">';
if(device['Status']=='Off') html+=iconORimage(idx,'fa-toggle-off','','off icon');
else html+=iconORimage(idx,'fa-toggle-on','','on icon');
html+='</div>';
html+='<div class="col-xs-8 col-data">';
html+='<strong class="title">'+device['Name']+'</strong><br />';
if(device['Status']=='Off') html+='<span class="state">AFWEZIG</span>';
else html+='<span class="state">AANWEZIG</span>';
// check if device has show_last_update=true
if((settings['last_update'] && (typeof(blocks[idx])=='undefined' || typeof(blocks[idx]['hide_lastupdate'])=='undefined' || blocks[idx]['hide_lastupdate']===false)) || (!settings['last_update'] && (typeof(blocks[idx])!=='undefined' && typeof(blocks[idx]['show_lastupdate'])!=='undefined' && blocks[idx]['show_lastupdate']==true)) )
{
html+='<br /><span class="lastupdate">'+moment(device['LastUpdate']).format(settings['timeformat'])+'</span>';
}
html+='</div>';
return html;
}
htilburgs
Posts: 464 Joined: Tuesday 03 November 2015 11:01
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:
Post
by htilburgs » Tuesday 06 February 2018 22:11
robgeerts wrote: ↑ Tuesday 06 February 2018 21:13
_SHOW_LASTUPDATE is an old variable, this is the working code:
YES! It works again. Thnx!
Hardware:
RPi3 - Aeon Labs Z-Stick GEN5 - Fibaro Dimmer 2 - Fibaro Roller Shutter 2 - Fibaro Smoke Sensor - Yeelight RGBW Led bulb - Yeelight Smart LED Light Strip - Neo Coolcam PIR Motion Sensor - Neo Coolcam PowerPlug - Nest Thermostat v3
EdwinK
Posts: 1820 Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:
Post
by EdwinK » Monday 17 September 2018 23:22
And now I see a toggle-icon instead of the male figure I once had. did FontAwesome change things? Or did I screw up (as usually)
Screen Shot 2018-09-17 at 23.27.28.png (31.46 KiB) Viewed 1040 times
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
SwordFish
Posts: 278 Joined: Sunday 14 December 2014 12:28
Target OS: Raspberry Pi / ODroid
Domoticz version: V4.11375
Contact:
Post
by SwordFish » Saturday 06 October 2018 14:14
screen.PNG (5.53 KiB) Viewed 958 times
Its a long time since i post something here but now i have a question.
How can i reverse the icons for de blinds, when its closed i want the open icon and when its open i want the closed icon.
Also how can i reverse the text, i want the lux value under and the "lux buiten" on top?
Last one how do get the show last update false for some switches? When i set show last update to 1 i get all last updates and the show last update = false seems not working?
ArthurNL
Posts: 15 Joined: Friday 05 October 2018 14:36
Target OS: Windows
Domoticz version: 4.10717
Location: The Netherlands
Contact:
Post
by ArthurNL » Saturday 06 October 2018 15:51
SwordFish wrote: ↑ Saturday 06 October 2018 14:14
screen.PNGIts a long time since i post something here but now i have a question.
How can i reverse the icons for de blinds, when its closed i want the open icon and when its open i want the closed icon.
Also how can i reverse the text, i want the lux value under and the "lux buiten" on top?
Last one how do get the show last update false for some switches? When i set show last update to 1 i get all last updates and the show last update = false seems not working?
Can't answer all the questions;
- reversing, use this code in the config.js:
blocks['1_1']['switch'] = true;
- last update;
On the top of
config.js , below
var config = {} I have the next item:
config['last_update'] = false; // true this will disable all 'updates' everywhere. Now you can enable it for a particular item with
blocks['1_1']['last_update'] = true;
My Config.js
Spoiler: show
var config = {}
config['language'] = 'en_US';
config['domoticz_ip'] = 'http://ipthingy:8080 ';
config['app_title'] = 'Dashticz';
config['domoticz_refresh'] = '60';
config['dashticz_refresh'] = '60';
config['standard_graph'] = 'hours'; // or 'hours' or 'day'
config['last_update'] = false; // true
/*
OpenWeathermap config
*/
config['owm_api'] = 'apikey';
config['owm_city'] = 'city';
config['owm_name'] = '';
config['owm_country'] = 'nl';
config['static_weathericons'] = 1;
var blocks = {}
blocks[1] = {} //
blocks[1]['width'] = 6;
blocks['1_1'] = {} // Electra verbruik
blocks['1_1']['title'] = 'Verbruik';
blocks['1_1']['switch'] = true;
blocks['1_1']['icon'] = 'fas fa-bolt';
blocks['1_1']['last_update'] = true;
blocks['1_3'] = {} // Electra gebruik
blocks['1_3']['title'] = 'Gebruik';
blocks['1_3']['switch'] = true;
blocks['1_3']['icon'] = 'fas fa-bolt';
blocks[4] = {} //
blocks[4]['width'] = 6;
blocks['4_1'] = {} // Gas verbruik
blocks['4_1']['title'] = 'Verbruik';
blocks['4_1']['switch'] = true;
blocks['4_3'] = {} // Gas gebruik
blocks['4_3']['title'] = 'Gebruik';
blocks['4_3']['switch'] = true;
blocks[5] = {} //
blocks[5]['width'] = 6;
blocks['5_1'] = {} // Sonoff
blocks['5_1']['title'] = 'Temperatuur';
blocks['5_1']['switch'] = true;
blocks['5_2'] = {} // Sonoff
blocks['5_2']['title'] = 'Vochtigheid';
blocks['5_2']['switch'] = true;
blocks[7] = {} //
blocks[7]['width'] = 6;
blocks['7_1'] = {} // Esp #1 Woonkamer
blocks['7_1']['title'] = 'Temperatuur';
blocks['7_1']['switch'] = true;
blocks['7_2'] = {} // Esp #1 Woonkamer
blocks['7_2']['title'] = 'Vochtigheid';
blocks['7_2']['switch'] = true;
blocks[8] = {} //
blocks[8]['width'] = 6;
blocks['8_1'] = {} // Esp #2 Werkkamer
blocks['8_1']['title'] = 'Temperatuur';
blocks['8_1']['switch'] = true;
blocks['8_2'] = {} // Esp #2 Werkkamer
blocks['8_2']['title'] = 'Vochtigheid';
blocks['8_2']['switch'] = true;
/*
blocks['blocktitle10'] = {}
blocks['blocktitle10']['type'] = 'blocktitle';
blocks['blocktitle10']['title'] = 'Sonff';
blocks['blocktitle20'] = {}
blocks['blocktitle20']['type'] = 'blocktitle';
blocks['blocktitle20']['title'] = 'Esp #1';
blocks['blocktitle30'] = {}
blocks['blocktitle30']['type'] = 'blocktitle';
blocks['blocktitle30']['title'] = 'Esp #2';
*/
var buttons = {}
buttons.webcam1 = {width:6, isimage:true, refresh:10000, image: 'http://cdn.knmi.nl/knmi/map/page/weer/a ... ratuur.png ', url: 'http://www.knmi.nl '}
buttons.webcam2 = {width:6, isimage:true, refresh:10000, image: 'https://cdn.knmi.nl/knmi/map/page/weer/ ... kracht.png ', url: 'http://www.knmi.nl '}
var columns = {}
columns['bar'] = {};
columns['bar']['blocks'] = ['sunrise','miniclock','settings'];
columns[10] = {} // Kolom 1
columns[10]['blocks'] = ['graph_8','8_1','8_2','graph_7','7_1','7_2','graph_5','5_1','5_2'];
columns[10]['width'] = 4;
columns[20] = {} // Kolom 2
columns[20]['blocks'] = ['graph_1','1_1','1_3','graph_4','4_1','4_3'];
columns[20]['width'] = 4;
columns[30] = {} // Kolom 3
columns[30]['blocks'] = ['currentweather_big_owm','weather_owm',buttons.webcam1,buttons.webcam2];
columns[30]['width'] = 4;
var screens = {}
screens[10] = {}
screens[10]['columns'] = [10,20,30];
Dashticz V2.4.0 Beta
EdwinK
Posts: 1820 Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:
Post
by EdwinK » Saturday 06 October 2018 22:04
if you want your text above the value of the date do blocks[IDX]['switch'] = true;
Put the IDX of your LUX on the correct place
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
SwordFish
Posts: 278 Joined: Sunday 14 December 2014 12:28
Target OS: Raspberry Pi / ODroid
Domoticz version: V4.11375
Contact:
Post
by SwordFish » Sunday 07 October 2018 11:33
Thanks, that did the trick.
SwordFish
Posts: 278 Joined: Sunday 14 December 2014 12:28
Target OS: Raspberry Pi / ODroid
Domoticz version: V4.11375
Contact:
Post
by SwordFish » Saturday 13 October 2018 12:12
I have 2 pictures one for on.png and one for off.png in the image folder. How can I use these with Custom js for a lightswitch?
Update; solved, i had to read the wiki
Users browsing this forum: No registered users and 0 guests