Page 1 of 1

Virtual input number?

Posted: Tuesday 09 August 2016 10:22
by raptorjr
I have a water valve and a water meter. I would like to add some virtual thing that makes it possible for me to enter a number in Domoticz (litre/volume) and then make a script to open the valve for that specified amount.

Or maybe some kind of virtual slider where I can set the max and min value, and then use the slider to select a value within max/min.

But what virtual thing should I use?

Re: Virtual input number?

Posted: Tuesday 09 August 2016 12:47
by gizmocuz
How about you add a 'Dummy' hardware, create a virtual sensor, and as type choose 'Custom' ?

Re: Virtual input number?

Posted: Tuesday 09 August 2016 21:21
by raptorjr
Thank you. But I don't have Custom as a alternative in the "Sensor Type" dropdown. I'm running version 3.4834.

Re: Virtual input number?

Posted: Friday 26 August 2016 12:46
by raptorjr
If possible I could still need some help on where to find the Custom virtual sensor?
I have created some virtual switches and things, but I cant find Custom.

Re: Virtual input number?

Posted: Sunday 11 September 2016 20:22
by Hesmink
Same here, I don't have the 'Custom' option (running 3.4834).

I was looking for a way to make my virtual sensor for heat usage correctly state 'GJ', instead of m3/water usage that I'm using now.
Is this supported somehow?

Virtual input number?

Posted: Sunday 11 September 2016 21:05
by mvzut
raptorjr wrote:I have a water valve and a water meter. I would like to add some virtual thing that makes it possible for me to enter a number in Domoticz (litre/volume) and then make a script to open the valve for that specified amount.

Or maybe some kind of virtual slider where I can set the max and min value, and then use the slider to select a value within max/min.

But what virtual thing should I use?
The custom dummy sensor is great for storing arbitrary sensor data, but as far as I know there is no way to give it a value from within the Domoticz UI. So this is probably not what you want/need.

You could create two virtual dimmers, and use the sliders to select the open/close water amounts (in liters) from 1-100 (provided this is enough range for you). You must then create a script to read the values from the dimmers and define what to do if your water meter exceeds these limits. You should probably also use a dummy counter or a user variable to keep track of the amount of liters, and reset this every time the threshold is exceeded.

I don't know your exact situation, so my answer is quite generic, but maybe it helps.

Re: Virtual input number?

Posted: Sunday 20 September 2026 18:47
by averter
I've also stumbled upon this issue as well and just wanted to share my solution. I've tried a virtual dimmer switch, but it was no good since the range is always between 0-100. A "Thermostat Setpoint" on the other hand can have ANY range and it has enough precision (decimals) for most applications. You can also change the units of the device to something else; see my case, attached, where I've changed it to miles.