how to create custom block

Dashticz, alternative dashboard based on HTML, CSS, jQuery

Moderators: leecollings, htilburgs, robgeerts

Post Reply
Dirk
Posts: 35
Joined: Wednesday 04 November 2015 20:59
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

how to create custom block

Post by Dirk »

On my Dashticz-dashboard I want to create a block that compares the values of two different sensors, and shows a text accordingly. I have an indoor temp sensor 2, and an outdoor sensor 256, and want to compare the two.

I'm new to Dashtizc, but I've figured out:
  • how to make a block that show the temperature of the sensor ('2_1': the first value of domoticz-ID 2
  • combined graphs
  • that it's possible to do basic math with values
But I cannot figure out how to
[*] Make my own block, with the values of both sensors combined. For example: 'Current temps. Indoor: 26. Outdoor 15.' on three lines.
[*] Subtract two values and show them on the block. So I'd like to calculate the difference between indoor-temp and outdoor-temp, and show that value.
[*] show a short text if the subtraction has a certain value, for example 'open some windows' if indoor-temp is warmer.

I read the (excellent) guide, but I can't figure out how to get started on this (and if it is even possible), and wasn't able to find topic on the forum about this. Any pointers are welcome! Thanks in advance!
User avatar
clinkadink
Posts: 417
Joined: Tuesday 31 December 2019 1:15
Target OS: Linux
Domoticz version: 2020.2
Location: Swindon, UK
Contact:

Re: how to create custom block

Post by clinkadink »

The easiest way to do that is to combine the sensor data using a dummy device in Domoticz. Then add the device in Dashticz.
"UI is the saddle, the stirrups, & the reins. UX is the feeling you get being able to ride the horse."
Dirk
Posts: 35
Joined: Wednesday 04 November 2015 20:59
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: how to create custom block

Post by Dirk »

Thanks for your reply! Can you elaborate some more on how to do that? I know how to make a Dummy device (Setup, Hardware, Type==dummy device and then click 'Create Virtual Sensor'. I made a Virtual Sensor 'Outdoortemp' and 'Indoortemp'. But then what? How do I populate them with data, and how do I subtract the two values? Thanks in advance!
User avatar
HansieNL
Posts: 957
Joined: Monday 28 September 2015 15:13
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: how to create custom block

Post by HansieNL »

Blah blah blah
Dirk
Posts: 35
Joined: Wednesday 04 November 2015 20:59
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: how to create custom block

Post by Dirk »

I was trying to calculate the delta in Dashticz, but this works too. Thanks for pointing me to this post!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest