Page 1 of 1

how to create custom block

Posted: Monday 25 May 2020 21:07
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!

Re: how to create custom block

Posted: Friday 05 June 2020 22:25
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.

Re: how to create custom block

Posted: Friday 05 June 2020 22:59
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!

Re: how to create custom block

Posted: Saturday 06 June 2020 2:10
by HansieNL

Re: how to create custom block

Posted: Saturday 06 June 2020 9:18
by Dirk
I was trying to calculate the delta in Dashticz, but this works too. Thanks for pointing me to this post!