unwanted devices in dashticz

Dashticz, alternative dashboard based on HTML, CSS, jQuery

Moderators: leecollings, htilburgs, robgeerts

Post Reply
pvklink
Posts: 822
Joined: Wednesday 12 November 2014 15:01
Target OS: Raspberry Pi / ODroid
Domoticz version: latest b
Contact:

unwanted devices in dashticz

Post by pvklink »

Hi, i jyst added a zwave sensor to my dashticz that displays the wattage of my washing machine/ I measure this for testing if my machine is ready and then gives a message by let my google assistant speaks an turning a led lamp red.

i want to display this to check if my algoritmes are working.

But when i add this device (it is displaying) i get two more devices (kwh and onother one)..
How do i delete these from dashticz?
Raspberry (raspbian on rpi 3) , Domoticz Beta, dzVents , RFXtrx433e, P1, Hue, Yeelight, Zwave+, X10, ESP(easy), MQTT,Weather Underground, System Alive Checker, Domoticz Remote Server to RPI with Google Assistant,
Jablotron connection, Ikea
User avatar
EdwinK
Posts: 1820
Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:

Re: unwanted devices in dashticz

Post by EdwinK »

I think the device is giving 2 or more data-streams. So you have one with the kwh and another one. You can use the following (adapt the idx to your idx ;))

Code: Select all

'IDX_1' 
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
pvklink
Posts: 822
Joined: Wednesday 12 November 2014 15:01
Target OS: Raspberry Pi / ODroid
Domoticz version: latest b
Contact:

Re: unwanted devices in dashticz

Post by pvklink »

i tried 982-1 and 982_1 no switch at all
Raspberry (raspbian on rpi 3) , Domoticz Beta, dzVents , RFXtrx433e, P1, Hue, Yeelight, Zwave+, X10, ESP(easy), MQTT,Weather Underground, System Alive Checker, Domoticz Remote Server to RPI with Google Assistant,
Jablotron connection, Ikea
User avatar
EdwinK
Posts: 1820
Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:

Re: unwanted devices in dashticz

Post by EdwinK »

Try with '928_1' with the ' at the beginning and end
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
pvklink
Posts: 822
Joined: Wednesday 12 November 2014 15:01
Target OS: Raspberry Pi / ODroid
Domoticz version: latest b
Contact:

Re: unwanted devices in dashticz

Post by pvklink »

yep works! thanks!
Raspberry (raspbian on rpi 3) , Domoticz Beta, dzVents , RFXtrx433e, P1, Hue, Yeelight, Zwave+, X10, ESP(easy), MQTT,Weather Underground, System Alive Checker, Domoticz Remote Server to RPI with Google Assistant,
Jablotron connection, Ikea
pvklink
Posts: 822
Joined: Wednesday 12 November 2014 15:01
Target OS: Raspberry Pi / ODroid
Domoticz version: latest b
Contact:

Re: unwanted devices in dashticz

Post by pvklink »

1) Is there an other way to give the icons for devices with a datastream another color?
2) also hide_data does not work...

my trials:

blocks['982_1'] = {}
blocks['982_1']['title'] = 'Was machine';
blocks['982_1']['icon'] = 'fas fa-bolt';
blocks['982_1']['hide_data'] = true;
blocks['982_1']['width'] = 3;

and in css
.fa-bolt.on {color: red !important;}
.fa-bolt.off {color: green !important;}
last part does not work...

this also does not work
.block_982_1 .fa-bolt.on {color: red;}
.block_982_1 .fa-bolt.off {color: lightgrey;}
Raspberry (raspbian on rpi 3) , Domoticz Beta, dzVents , RFXtrx433e, P1, Hue, Yeelight, Zwave+, X10, ESP(easy), MQTT,Weather Underground, System Alive Checker, Domoticz Remote Server to RPI with Google Assistant,
Jablotron connection, Ikea
User avatar
HansieNL
Posts: 969
Joined: Monday 28 September 2015 15:13
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: unwanted devices in dashticz

Post by HansieNL »

Can you try: .fas.fa-bolt.on {color: red !important;}
Blah blah blah
pvklink
Posts: 822
Joined: Wednesday 12 November 2014 15:01
Target OS: Raspberry Pi / ODroid
Domoticz version: latest b
Contact:

Re: unwanted devices in dashticz

Post by pvklink »

thanks, but did not work...

/* .fa-bolt.on {color: red !important;} */
/* .fa-bolt.off {color: green !important;} */

.fas.fa-bolt.on {color: red !important;}
.fas.fa-bolt.on {color: green !important;}
Raspberry (raspbian on rpi 3) , Domoticz Beta, dzVents , RFXtrx433e, P1, Hue, Yeelight, Zwave+, X10, ESP(easy), MQTT,Weather Underground, System Alive Checker, Domoticz Remote Server to RPI with Google Assistant,
Jablotron connection, Ikea
User avatar
HansieNL
Posts: 969
Joined: Monday 28 September 2015 15:13
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: unwanted devices in dashticz

Post by HansieNL »

@pvklink: Can you try: .block_982_1 .icon.on {color: red;}
Blah blah blah
pvklink
Posts: 822
Joined: Wednesday 12 November 2014 15:01
Target OS: Raspberry Pi / ODroid
Domoticz version: latest b
Contact:

Re: unwanted devices in dashticz

Post by pvklink »

noop, still does not work..
here is my config...

i did remove de /* ... */ to activate it...
these are all the trials...
the attached image is a little bit older then the config (no update date anymore , i added: last_update....

blocks['982_1'] = {}
blocks['982_1']['title'] = 'Was machine';
blocks['982_1']['icon'] = 'fas fa-bolt';
blocks['982_1']['hide_data'] = true;
blocks['982_1']['width'] = 3;
blocks['982_1']['switch'] = true;
blocks['982_1']['last_update'] = false;

blocks[1025] = {}
blocks[1025]['title'] = 'Zolder radiator';
blocks[1025]['hide_data'] = true;
blocks[1025]['switch'] =true;
blocks[1025]['width'] = 3;
blocks[1025]['last_update'] = false;

css

/* .block_982 .fa-bolt.on {color: red;} WERKT NIET */
/* .block_982 .fa-bolt.off {color: lightgrey;} WERKT NIET*/
/* .block_982_1 .icon.on {color: red !important;} WERKT NIET */
/* .block_982_1 .icon.off {color: red !important;} WERKT NIET */

/* .fa-bolt.on {color: red !important;} WERKT NIET*/
/* .fa-bolt.off {color: green !important;} WERKT NIET*/

/* .fas.fa-bolt.on {color: red !important;} WERKT NIET*/
/* .fas.fa-bolt.on {color: green !important;} WERKT NIET*/
Attachments
Naamloos.png
Naamloos.png (6 KiB) Viewed 1059 times
Raspberry (raspbian on rpi 3) , Domoticz Beta, dzVents , RFXtrx433e, P1, Hue, Yeelight, Zwave+, X10, ESP(easy), MQTT,Weather Underground, System Alive Checker, Domoticz Remote Server to RPI with Google Assistant,
Jablotron connection, Ikea
Lokonli
Posts: 2292
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: unwanted devices in dashticz

Post by Lokonli »

pvklink wrote: Monday 08 July 2019 16:07 noop, still does not work..
here is my config...

i did remove de /* ... */ to activate it...
these are all the trials...
the attached image is a little bit older then the config (no update date anymore , i added: last_update....

blocks['982_1'] = {}
blocks['982_1']['title'] = 'Was machine';
blocks['982_1']['icon'] = 'fas fa-bolt';
blocks['982_1']['hide_data'] = true;
blocks['982_1']['width'] = 3;
blocks['982_1']['switch'] = true;
blocks['982_1']['last_update'] = false;

blocks[1025] = {}
blocks[1025]['title'] = 'Zolder radiator';
blocks[1025]['hide_data'] = true;
blocks[1025]['switch'] =true;
blocks[1025]['width'] = 3;
blocks[1025]['last_update'] = false;

css

/* .block_982 .fa-bolt.on {color: red;} WERKT NIET */
/* .block_982 .fa-bolt.off {color: lightgrey;} WERKT NIET*/
/* .block_982_1 .icon.on {color: red !important;} WERKT NIET */
/* .block_982_1 .icon.off {color: red !important;} WERKT NIET */

/* .fa-bolt.on {color: red !important;} WERKT NIET*/
/* .fa-bolt.off {color: green !important;} WERKT NIET*/

/* .fas.fa-bolt.on {color: red !important;} WERKT NIET*/
/* .fas.fa-bolt.on {color: green !important;} WERKT NIET*/
If you want to change the icon color for block 982_1 add the following to custom.css:

Code: Select all

.block_982_1 .col-icon {
	color: red !important
}
If device 982 is a power measurement device then it doesn't have a state (like a switch), so it doesn't have the on/off class attached to it.

If you want to change the color depending on the data, then first add a class to the block via the afterGetDevices() function in custom.js:

Code: Select all

function afterGetDevices(){
	var device = alldevices['982'];
	console.log(device);
	var usage = parseFloat(device['Usage']); 
	console.log(usage);
	if( usage >20){
		$('div.block_982_1').addClass('warning');
	 }
	 else {
		$('div.block_982_1').removeClass('warning');
	 }	
}
And to apply the right styling add the following to custom.css to change the color of the icon:

Code: Select all

.warning .col-icon {
    color: blue !important
}
In the example above I assumed the measured data is reported via the 'Usage' parameter. You might have to change this to another parameter, depending on the specific device you have. The two console.log statements will show the device info In the developer window of Chrome (press F11). You can use this to find the right parameter name.

If it's working you can remove the two console.log statements.
pvklink
Posts: 822
Joined: Wednesday 12 November 2014 15:01
Target OS: Raspberry Pi / ODroid
Domoticz version: latest b
Contact:

Re: unwanted devices in dashticz

Post by pvklink »

when i arrive on my holiday address..i am going to try it..thanks!
Raspberry (raspbian on rpi 3) , Domoticz Beta, dzVents , RFXtrx433e, P1, Hue, Yeelight, Zwave+, X10, ESP(easy), MQTT,Weather Underground, System Alive Checker, Domoticz Remote Server to RPI with Google Assistant,
Jablotron connection, Ikea
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest