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 » Sunday 21 May 2017 22:36
Just like the function to take action on change of a value I now have extended functionality (in beta) to do something with a block when it has a specific value.
Example, add a red background to a switch when energy usage reaches a limit.
In this example I'm using a device with IDX 150_1
In custom.js add:
Code: Select all
function getStatus_150_1(idx,value,device){
if(parseFloat(device['Usage'])>1500){
$('div.block_150_1').addClass('warning');
}
else {
$('div.block_150_1').removeClass('warning');
}
}
And in custom.css add:
Code: Select all
.warning {
background: rgba(199,44,44,0.3) !important;
background-clip: padding-box;
}
mvveelen
Posts: 687 Joined: Friday 31 October 2014 10:22
Target OS: NAS (Synology & others)
Domoticz version: Beta
Location: Hoorn, The Netherlands
Contact:
Post
by mvveelen » Sunday 21 May 2017 22:50
Going to try this tomorrow evening. Nice work Rob!
Couldn't resist. Have to change the .css I think, but this is just a first try
Attachments
Schermafbeelding 2017-05-21 om 23.02.01.png (138.59 KiB) Viewed 4841 times
RPi3b+/RFXCOM rfxtrx433E/Shelly/Xiaomi Gateway/Philips HUE Lights/Atag Zone One/2 SunnyBoy inverters/AirconWithMe/P1 smartmeter/Domoticz latest Beta
mongoose
Posts: 42 Joined: Friday 22 November 2013 10:43
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:
Post
by mongoose » Monday 22 May 2017 5:42
Awesome, this is what I have wanted, can't wait to play around with it. For water tank level, or mm rain
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 » Monday 22 May 2017 10:03
If anybody has cool scripts, please share
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 22 May 2017 12:07
We'll see what users come up with.
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
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 23 May 2017 9:30
(Just a demonstration, in the live version it turns blue when expected rain is more then 5 mm and temperature inside is higher then 23 degrees.
custom.js
Code: Select all
function getStatus_145(idx,value,device){
if(parseFloat(device['Data'])>23){
$('div.block_145').addClass('warning');
}
else {
$('div.block_145').removeClass('warning');
}
}
function getStatus_286(idx,value,device){
if(parseFloat(device['Data'])>4){
$('div.block_286').addClass('warningblue');
}
else {
$('div.block_145').removeClass('warningblue');
}
}
custom.css
Code: Select all
.warning {
background: rgba(199,44,44,0.3) !important;
background-clip: padding-box;
}
.warningblue {
background: rgba(45,119,204,0.3) !important;
background-clip: padding-box;
}
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 23 May 2017 10:01
And for those who like a blinking version
Code: Select all
.warning {
background: rgba(199,44,44,0.3) !important;
background-clip: padding-box;
-webkit-animation: BLINK-ANIMATION 1s infinite;
-moz-animation: BLINK-ANIMATION 1s infinite;
-o-animation: BLINK-ANIMATION 1s infinite;
animation: BLINK-ANIMATION 1s infinite;
}
@-webkit-keyframes BLINK-ANIMATION {
0%, 49% {
background-color: rgba(255,0,0,0.5);
border: 3px solid red;
}
50%, 100% {
background-color: red;
border: 3px solid rgba(255,0,0.0.5);
}
}
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 » Tuesday 23 May 2017 10:16
Great thanks.
And now, instead of doing something I'm again playing with Dashticz. Using outside temp for now, as I don't have an inside thermostat. Is it possible to use the 'currentweather_big' as alert?
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
EdwinK
Posts: 1820 Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:
Post
by EdwinK » Tuesday 23 May 2017 10:22
htilburgs wrote: And for those who like a blinking version
The jumping of the text, is that intentionally?
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
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 23 May 2017 10:27
No, not intentionally, I've to take a look at that, but something came up. Later on this day...
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
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 23 May 2017 10:28
Had it too, fixed it with:
Code: Select all
.warning {
background: rgba(199,44,44,0.3) !important;
background-clip: padding-box;
border: 7px solid rgba(255,255,255,0);
-webkit-animation: BLINK-ANIMATION 1s infinite;
-moz-animation: BLINK-ANIMATION 1s infinite;
-o-animation: BLINK-ANIMATION 1s infinite;
animation: BLINK-ANIMATION 1s infinite;
}
@-webkit-keyframes BLINK-ANIMATION {
0%, 49% {
background-color: rgba(199,44,44,0.3);
background-clip: padding-box;
border: 7px solid rgba(255,255,255,0);
}
50%, 100% {
background-color: rgba(199,44,44,0.7);
background-clip: padding-box;
border: 7px solid rgba(255,255,255,0);
}
}
EdwinK
Posts: 1820 Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:
Post
by EdwinK » Tuesday 23 May 2017 10:31
You two are great people. Thanks. Going to play with this some more.
Now, who do I blame when I don't get my work done today
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
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 23 May 2017 10:32
And a blue version:
Code: Select all
.warningblue {
background: rgba(45,119,204,0.3) !important;
background-clip: padding-box;
border: 7px solid rgba(255,255,255,0);
-webkit-animation: BLINK-ANIMATION-BLUE 1s infinite;
-moz-animation: BLINK-ANIMATION-BLUE 1s infinite;
-o-animation: BLINK-ANIMATION-BLUE 1s infinite;
animation: BLINK-ANIMATION-BLUE 1s infinite;
}
@-webkit-keyframes BLINK-ANIMATION-BLUE {
0%, 49% {
background-color: rgba(45,119,204,0.3);
background-clip: padding-box;
border: 7px solid rgba(255,255,255,0);
}
50%, 100% {
background-color: rgba(45,119,204,0.7);
background-clip: padding-box;
border: 7px solid rgba(255,255,255,0);
}
}
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 23 May 2017 10:34
Orange version:
Code: Select all
.warningorange {
background: rgba(204,129,44,0.30) !important;
background-clip: padding-box;
border: 7px solid rgba(255,255,255,0);
-webkit-animation: BLINK-ANIMATION 1s infinite;
-moz-animation: BLINK-ANIMATION 1s infinite;
-o-animation: BLINK-ANIMATION 1s infinite;
animation: BLINK-ANIMATION 1s infinite;
}
@-webkit-keyframes BLINK-ANIMATION {
0%, 49% {
background-color: rgba(204,129,44,0.3);
background-clip: padding-box;
border: 7px solid rgba(255,255,255,0);
}
50%, 100% {
background-color: rgba(204,129,44,0.7);
background-clip: padding-box;
border: 7px solid rgba(255,255,255,0);
}
}
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 23 May 2017 10:35
I did this to have different colors, depending on the temperature of my living room:
Code: Select all
function getStatus_145(idx,value,device){
if(parseFloat(device['Data'])>23){
$('div.block_145').removeClass('warning').addClass('warningorange');
}
else if(parseFloat(device['Data'])>25){
$('div.block_145').removeClass('warningorange').addClass('warning');
}
else {
$('div.block_145').removeClass('warning').removeClass('warningorange');
}
}
EdwinK
Posts: 1820 Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:
Post
by EdwinK » Tuesday 23 May 2017 10:37
Ze blinking buttons.. Oooo.. ze blinking buttons
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
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 23 May 2017 10:50
LOL
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
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 23 May 2017 11:16
EdKo66 wrote: You two are great people. Thanks. Going to play with this some more.
Now, who do I blame when I don't get my work done today
Thnx... And updated the wiki too....
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
mikeoo
Posts: 110 Joined: Sunday 22 March 2015 7:35
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Holland
Contact:
Post
by mikeoo » Tuesday 23 May 2017 15:18
And how to find/know what you need to use if you want something else like a switch of a doorsensor.
For temps you use Data -
if(parseFloat(device['
Data '])>23){
Usage for reaching a limit
if(parseFloat(device['
Usage '])
Love this option again
but missing some info to use it for other parts.
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 23 May 2017 15:30
It's not the same for all devices.
You can search the output (http://DOMOTICZ_URL:8080/json.htm?type=devices&filter=all&used=true&order=Name) for attributes you could use.
For example, you could use for switch:
Code: Select all
function getStatus_145(idx,value,device){
if(device['Data']=="On"){
$('div.block_145').addClass('warning');
}
else {
$('div.block_145').removeClass('warning');
}
}
Users browsing this forum: No registered users and 1 guest