Thanks again for the quick responserobgeerts wrote: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'); } }
Dashticz - Function - Trigger action on specific value
Moderators: leecollings, htilburgs, robgeerts
-
- Posts: 110
- Joined: Sunday 22 March 2015 7:35
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Holland
- Contact:
Re: Dashticz - [BETA] - Function - Do something at a specific value
- mvveelen
- Posts: 678
- Joined: Friday 31 October 2014 10:22
- Target OS: NAS (Synology & others)
- Domoticz version: Beta
- Location: Hoorn, The Netherlands
- Contact:
Re: Dashticz - [BETA] - Function - Do something at a specific value
I'm using:
for the size and rounded corners of the buttons. How can I use (for instance) the orange style code to get the same sized button? Tried a few things, but it still has another size. See attachment.
Code: Select all
.transbg.col-xs-1, .transbg.col-xs-2, .transbg.col-xs-3, .transbg.col-xs-4, .transbg.col-xs-5, .transbg.col-xs-6, .transbg.col-xs-7, .transbg.col-xs-8, .transbg.col-xs-9, .transbg.col-xs-10, .transbg.col-xs-11, .transbg.col-xs-12 {
padding-top: 15px;
padding-bottom: 15px;
border: 2px solid rgba(255,255,255,0);
background: rgba(0,0,0,0.2);
background-clip: padding-box;
border-radius: 9px;
}
- Attachments
-
- Schermafbeelding 2017-05-23 om 19.18.20.png (266.8 KiB) Viewed 3712 times
RPi3b+/RFXCOM rfxtrx433E/Shelly/Xiaomi Gateway/Philips HUE Lights/Atag Zone One/2 SunnyBoy inverters/AirconWithMe/P1 smartmeter/Domoticz latest Beta
- htilburgs
- Posts: 464
- Joined: Tuesday 03 November 2015 11:01
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Dashticz - [BETA] - Function - Do something at a specific value
If you use this code, I think it should be the same....
Code: Select all
.warning {
background: rgba(204,129,44,0.30) !important;
background-clip: padding-box;
border: 7px solid rgba(255,255,255,0);
}
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
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:
Re: Dashticz - [BETA] - Function - Do something at a specific value
Is it also possible to get multiple devices / IDX in 1 function?
Now I've to add the same function 2, 3 or more times with a different IDX. Is it possible to create a kind of array?
Now I've to add the same function 2, 3 or more times with a different IDX. Is it possible to create a kind of array?
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
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
-
- Posts: 1273
- Joined: Saturday 24 January 2015 22:12
- Target OS: NAS (Synology & others)
- Domoticz version: 3.7067
- Location: NL
- Contact:
Re: Dashticz - [BETA] - Function - Do something at a specific value
Not yet but you can do this to by pass this:
Code: Select all
function getStatus_145(idx,value,device){
if(parseFloat(device['Data'])>24){
$('div.block_145').addClass('warning');
}
else {
$('div.block_145').removeClass('warning');
}
}
function getStatus_5(idx,value,device){
getStatus_145(idx,value,device);
}
-
- Posts: 38
- Joined: Saturday 15 April 2017 13:05
- Target OS: Windows
- Domoticz version:
- Contact:
Re: Dashticz - [BETA] - Function - Do something at a specific value
Hi. I've tried adding the line "border: 7px solid rgba(255,255,255,0);" but nothing seems to change.htilburgs wrote:If you use this code, I think it should be the same....
Code: Select all
.warning { background: rgba(204,129,44,0.30) !important; background-clip: padding-box; border: 7px solid rgba(255,255,255,0); }
The warning block is still bigger...
Is this by design? How can I make them the same size as the others?
Thanks,
Pascal
- mvveelen
- Posts: 678
- Joined: Friday 31 October 2014 10:22
- Target OS: NAS (Synology & others)
- Domoticz version: Beta
- Location: Hoorn, The Netherlands
- Contact:
Re: Dashticz - [BETA] - Function - Do something at a specific value
Unfortunately it isn't:htilburgs wrote:If you use this code, I think it should be the same....
Code: Select all
.warning { background: rgba(204,129,44,0.30) !important; background-clip: padding-box; border: 7px solid rgba(255,255,255,0); }
- Attachments
-
- Schermafbeelding 2017-05-25 om 12.07.02.png (290.53 KiB) Viewed 3644 times
RPi3b+/RFXCOM rfxtrx433E/Shelly/Xiaomi Gateway/Philips HUE Lights/Atag Zone One/2 SunnyBoy inverters/AirconWithMe/P1 smartmeter/Domoticz latest Beta
- HansieNL
- Posts: 957
- Joined: Monday 28 September 2015 15:13
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Dashticz - [BETA] - Function - Do something at a specific value
Don't know for sure, but what if removing the border code?mvveelen wrote:Unfortunately it isn't:htilburgs wrote:If you use this code, I think it should be the same....
Code: Select all
.warning { background: rgba(204,129,44,0.30) !important; background-clip: padding-box; border: 7px solid rgba(255,255,255,0); }
Blah blah blah
- mvveelen
- Posts: 678
- Joined: Friday 31 October 2014 10:22
- Target OS: NAS (Synology & others)
- Domoticz version: Beta
- Location: Hoorn, The Netherlands
- Contact:
Re: Dashticz - [BETA] - Function - Do something at a specific value
I get the same result when I delete that line.
RPi3b+/RFXCOM rfxtrx433E/Shelly/Xiaomi Gateway/Philips HUE Lights/Atag Zone One/2 SunnyBoy inverters/AirconWithMe/P1 smartmeter/Domoticz latest Beta
- HansieNL
- Posts: 957
- Joined: Monday 28 September 2015 15:13
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Dashticz - [BETA] - Function - Do something at a specific value
Does this work?mvveelen wrote:I get the same result when I delete that line.
Code: Select all
.warning .transbg.col-xs-1,
.warning. transbg.col-xs-2,
.warning .transbg.col-xs-3,
.warning .transbg.col-xs-4,
.warning .transbg.col-xs-5,
.warning .transbg.col-xs-6,
.warning .transbg.col-xs-7,
.warning .transbg.col-xs-8,
.warning .transbg.col-xs-9,
.warning .transbg.col-xs-10,
.warning .transbg.col-xs-11,
.warning .transbg.col-xs-12 {
padding-top: 15px;
padding-bottom: 15px;
border: 2px solid rgba(255,255,255,0);
background: rgba(204,129,44,0.30) !important;
background-clip: padding-box;
border-radius: 9px;
}
Blah blah blah
- htilburgs
- Posts: 464
- Joined: Tuesday 03 November 2015 11:01
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Dashticz - [BETA] - Function - Do something at a specific value
Maybe you overrule the setting in your custom.css. Is it possible for you to post your custom.css
I've tested the css and for me it's working great.
I've tested the css and for me it's working great.
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
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
- mvveelen
- Posts: 678
- Joined: Friday 31 October 2014 10:22
- Target OS: NAS (Synology & others)
- Domoticz version: Beta
- Location: Hoorn, The Netherlands
- Contact:
Re: Dashticz - [BETA] - Function - Do something at a specific value
htilburgs wrote:Maybe you overrule the setting in your custom.css. Is it possible for you to post your custom.css
I've tested the css and for me it's working great.
- Spoiler: show
RPi3b+/RFXCOM rfxtrx433E/Shelly/Xiaomi Gateway/Philips HUE Lights/Atag Zone One/2 SunnyBoy inverters/AirconWithMe/P1 smartmeter/Domoticz latest Beta
- htilburgs
- Posts: 464
- Joined: Tuesday 03 November 2015 11:01
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Dashticz - [BETA] - Function - Do something at a specific value
Ok, quite a puzzle (but a nice one...).
Put this in your custom.css for the .warning part and it should work:
Let me know, if its OK now.
And I see one minor error in your custom.css.
In the #newsTicker li part the */ Set the maxim height of the news-ticker */ shoud be /* Set the maxim height of the news-ticker */
For now it's not causing an issue, but you never now what it causes in the future....
Put this in your custom.css for the .warning part and it should work:
Code: Select all
.warning {
padding-top: 15px !important;
padding-bottom: 15px !important;
border-radius: 9px !important;
background-color: rgba(199, 44, 43, 0.3) !important;
border: 2px solid rgba(255,255,255,0) !important;
background-image: initial !important;
background-position-x: initial !important;
background-position-y: initial !important;
background-size: initial !important;
background-repeat-x: initial !important;
background-repeat-y: initial !important;
background-attachment: initial !important;
background-origin: initial !important;
background-clip: padding-box !important;
}
And I see one minor error in your custom.css.
In the #newsTicker li part the */ Set the maxim height of the news-ticker */ shoud be /* Set the maxim height of the news-ticker */
For now it's not causing an issue, but you never now what it causes in the future....
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
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
-
- Posts: 38
- Joined: Saturday 15 April 2017 13:05
- Target OS: Windows
- Domoticz version:
- Contact:
Re: Dashticz - [BETA] - Function - Do something at a specific value
Tried this code and I get the rounded corners but the warning blocks are still bigger...htilburgs wrote:Ok, quite a puzzle (but a nice one...).
Put this in your custom.css for the .warning part and it should work:Let me know, if its OK now.Code: Select all
.warning { padding-top: 15px !important; padding-bottom: 15px !important; border-radius: 9px !important; background-color: rgba(199, 44, 43, 0.3) !important; border: 2px solid rgba(255,255,255,0) !important; background-image: initial !important; background-position-x: initial !important; background-position-y: initial !important; background-size: initial !important; background-repeat-x: initial !important; background-repeat-y: initial !important; background-attachment: initial !important; background-origin: initial !important; background-clip: padding-box !important; }
(it's the only code in my custom.css)
- htilburgs
- Posts: 464
- Joined: Tuesday 03 November 2015 11:01
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Dashticz - [BETA] - Function - Do something at a specific value
This was specific for @mveelen, based on his css.
I'll will look into it later on, now busy with my regular job....
I'll will look into it later on, now busy with my regular job....
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
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:
Re: Dashticz - [BETA] - Function - Do something at a specific value
Try this one:repoman wrote: Tried this code and I get the rounded corners but the warning blocks are still bigger...
(it's the only code in my custom.css)
Code: Select all
.warning {
background: rgba(199,44,44,0.7) !important;
background-image: initial !important;
background-position-x: initial !important;
background-position-y: initial !important;
background-size: initial !important;
background-repeat-x: initial !important;
background-repeat-y: initial !important;
background-attachment: initial !important;
background-origin: initial !important;
background-clip: padding-box !important;
}
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
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
-
- Posts: 38
- Joined: Saturday 15 April 2017 13:05
- Target OS: Windows
- Domoticz version:
- Contact:
Re: Dashticz - [BETA] - Function - Do something at a specific value
Yep, that did the trick!
Thanks!
Thanks!
-
- Posts: 64
- Joined: Friday 14 April 2017 13:39
- Target OS: NAS (Synology & others)
- Domoticz version:
- Location: The Netherlands
- Contact:
Re: Dashticz - [BETA] - Function - Do something at a specific value
Hi Rob,robgeerts wrote: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'); } }
I think you need to switch the higher value with the lower value.
Your code did not work for me, the blocks remained orange even though the value exceeded 25.
My code:
Code: Select all
//kleurtje op knop temp huiskamer wanneer het warmer is dan bepaalde temperatuur (oranje of rood)
function getStatus_90(idx,value,device){
if(parseFloat(device['Temp'])>25){
$('div.block_90').removeClass('warningoranje').addClass('warning');
}
else if(parseFloat(device['Temp'])>23){
$('div.block_90').removeClass('warning').addClass('warningoranje');
}
else {
$('div.block_90').removeClass('warning').removeClass('warningoranje');
}
}
- mvveelen
- Posts: 678
- Joined: Friday 31 October 2014 10:22
- Target OS: NAS (Synology & others)
- Domoticz version: Beta
- Location: Hoorn, The Netherlands
- Contact:
Re: Dashticz - [BETA] - Function - Do something at a specific value
Yesssss, that's it !! Thanks !htilburgs wrote:Ok, quite a puzzle (but a nice one...).
Put this in your custom.css for the .warning part and it should work:Let me know, if its OK now.
- Spoiler: show
And I see one minor error in your custom.css.
In the #newsTicker li part the */ Set the maxim height of the news-ticker */ shoud be /* Set the maxim height of the news-ticker */
For now it's not causing an issue, but you never now what it causes in the future....
Also changed the newsTicker-part
RPi3b+/RFXCOM rfxtrx433E/Shelly/Xiaomi Gateway/Philips HUE Lights/Atag Zone One/2 SunnyBoy inverters/AirconWithMe/P1 smartmeter/Domoticz latest Beta
- htilburgs
- Posts: 464
- Joined: Tuesday 03 November 2015 11:01
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Dashticz - [BETA] - Function - Do something at a specific value
I also noticed a minor in .trashcan. After height the : is missing. (I know, I'm a nitpicker )mvveelen wrote:Yesssss, that's it !! Thanks !htilburgs wrote:Ok, quite a puzzle (but a nice one...).
Put this in your custom.css for the .warning part and it should work:Let me know, if its OK now.
- Spoiler: show
And I see one minor error in your custom.css.
In the #newsTicker li part the */ Set the maxim height of the news-ticker */ shoud be /* Set the maxim height of the news-ticker */
For now it's not causing an issue, but you never now what it causes in the future....
Also changed the newsTicker-part
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
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
Who is online
Users browsing this forum: No registered users and 1 guest