Dashticz - Function - Trigger action on specific value

Dashticz, alternative dashboard based on HTML, CSS, jQuery

Moderators: robgeerts, htilburgs

User avatar
EdwinK
Posts: 1239
Joined: Sunday 22 January 2017 22:46
Target OS: Raspberry Pi
Domoticz version: BETA
Location: Rhoon
Contact:

Re: Dashticz - Function - Trigger action on specific value

Post by EdwinK » Monday 26 June 2017 10:13

I use idx 'XX_1' for the first and 'XX_2' for the second
Running latest BETA on a Pi-3 | Toon Thermostat | RFxcom | Dashticz V2 |

User avatar
htilburgs
Posts: 509
Joined: Tuesday 03 November 2015 12:01
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Dashticz - Function - Trigger action on specific value

Post by htilburgs » Monday 26 June 2017 10:44

Can you try changing Data into Temp (in your Config.js code)?
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

woody4165
Posts: 530
Joined: Monday 14 March 2016 14:55
Target OS: Linux
Domoticz version: beta
Location: Rome, Italy
Contact:

Re: Dashticz - Function - Trigger action on specific value

Post by woody4165 » Thursday 14 September 2017 11:07

Hi

This is a very powerful feature, just discovering.

I would like to color the Netatmo Thermostat SetPoint when boiler is on, so when SetPoint Temp is higher than Temp measured by sensor.

The two values are a different.

From SetPoint I can use
"Data" : "18.0",
"SetPoint" : "18.0",

From Sensor I can use
"Data" : "23.2 C",
"Temp" : 23.199999999999999,

What kind of comparison I can use ?
I'm a little bit confused...

Thanks
Cubietruck - Linux cubietruck 4.13.16 (Debian GNU/Linux 8 (jessie)) + Domoticz + RFLink, Xiaomi Gateway, Owl USB, Yeelight Color and B/W, ESP8266, Broadlink RM2, Netatmo Thermostat

Wob76
Posts: 129
Joined: Wednesday 19 April 2017 6:31
Target OS: Linux
Domoticz version:
Contact:

Re: Dashticz - Function - Trigger action on specific value

Post by Wob76 » Monday 08 January 2018 6:36

Hi,

Just wondering if it is possible to use getstatus to monitor a User Variable from Domoticz? I am using a few User Variables in scripts and would like to colour some tiles based on those variables status, if not I'll have look at incorporating some switches into the scripts.

Thanks,
Wob

User avatar
robgeerts
Posts: 1233
Joined: Saturday 24 January 2015 23:12
Target OS: NAS (Synology & others)
Domoticz version: 3.7067
Location: NL
Contact:

Re: Dashticz - Function - Trigger action on specific value

Post by robgeerts » Monday 08 January 2018 22:54

I think you need switches with the value of the user-variable.
BUT, I think you can hide these switches so you wont see them ;)
Something like (if the switch you want to check is 1 and block you want to colour is idx 2)

Code: Select all

function getStatus_1(idx,value,device){
	$('div.block_1').hide();
		if(device['Data']=='somevalue'){
			$('div.block_2').addClass('warning');
		}
		else {
			$('div.block_2').removeClass('warning');
		}
	
}
Creator of Dashticz
Do you appreciate my work and want to buy me a beer?
Send:
- XVG to D8fwNbyV6YxJk1aSiXftWTtdaPipsKn2Fa
- ANY ERC20-TOKEN to 0x9b8ee84329d77765a28bca188218c6c793875a8a

or donate via PayPal: https://www.paypal.me/robgeerts

Wob76
Posts: 129
Joined: Wednesday 19 April 2017 6:31
Target OS: Linux
Domoticz version:
Contact:

Re: Dashticz - Function - Trigger action on specific value

Post by Wob76 » Tuesday 09 January 2018 3:47

Thanks, I thought that might be the case, I have plenty of other hidden switches :) and the user variable is just a 0/1 state, so easy enough to change it to use switches.

Wob76
Posts: 129
Joined: Wednesday 19 April 2017 6:31
Target OS: Linux
Domoticz version:
Contact:

Re: Dashticz - Function - Trigger action on specific value

Post by Wob76 » Tuesday 09 January 2018 7:18

Ok, my problem now is that I want to have the switch hidden in Domoticz, so prefix it with a $, but it seems these switches are filtered upstream somewhere and will not show in Dashticz, is there a way to have it hidden in both interfaces?

User avatar
DewGew
Posts: 237
Joined: Thursday 21 April 2016 12:01
Target OS: Raspberry Pi
Domoticz version: V4.9741
Location: Sweden
Contact:

Re: Dashticz - Function - Trigger action on specific value

Post by DewGew » Tuesday 09 January 2018 12:16

Wob76 wrote:
Tuesday 09 January 2018 7:18
Ok, my problem now is that I want to have the switch hidden in Domoticz, so prefix it with a $, but it seems these switches are filtered upstream somewhere and will not show in Dashticz, is there a way to have it hidden in both interfaces?
I place my hidden devices in a hidden room also. Now you can only find theese device under settings/devices and room manager. You create hidden room with name starts with $ (eg. $roomtohide).
Raspberry Pi 2B - domoticz - Aeon Labs Z-Stick GEN5 - RFlink gateway
NanoPi NEO-air - domoticz - REGO6XX interface
Dashticz V2 - Homebridge

Wob76
Posts: 129
Joined: Wednesday 19 April 2017 6:31
Target OS: Linux
Domoticz version:
Contact:

Re: Dashticz - Function - Trigger action on specific value

Post by Wob76 » Tuesday 09 January 2018 12:33

Thanks for the tip, I have done that in past, but for some reason Domoticz is no longer hiding devices in hidden rooms from my All tab, I'll have to investigate.

Update:
Maybe a bug in the beta versions of Domoticz, and new room I create with a $ doesn't seem to work, devices in those rooms still show in the All Room, I have a few old ones that seem to work, but only for the devices already in there, if I add a new device to one it still shows in All. :(

I tried adding the devices into "$Hidden Devices" and removing the $ from the name, but again they are filtered from Dashticz,the above code works if I move it out of $Hidden Devices, But I do have to have the switch configured for a row and then hide it.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest