Easily change a user variable

Moderator: leecollings

Post Reply
Mainow
Posts: 3
Joined: Sunday 01 September 2019 9:53
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Easily change a user variable

Post by Mainow »

I have just managed to set up a Switch to control an external relay. The relay is not supported by Domoticz, so I use a switch or a scene to call a script, which turns the relay on and off.
So far so good.
But now want to start and stop it at specific times. I created user variables start time and stop time to be able to activate the scene with Blockly. That works nicely, but I would like to be able to modify the start time and stop time easily.
Now I have to go into setup - more options - user variables to get to the start and stop times.
I would like to have them on my dashboard, so I can modify them from there, or ideally have a start time and duration on my dashboard, so that if i change start time or duration, the stop time is modified along with it.
MikeF
Posts: 350
Joined: Sunday 19 April 2015 0:36
Target OS: Raspberry Pi / ODroid
Domoticz version: V2022.2
Location: UK
Contact:

Re: Easily change a user variable

Post by MikeF »

Mainow wrote: Sunday 07 June 2020 1:28 I have just managed to set up a Switch to control an external relay. The relay is not supported by Domoticz, so I use a switch or a scene to call a script, which turns the relay on and off.
So far so good.
But now want to start and stop it at specific times. I created user variables start time and stop time to be able to activate the scene with Blockly. That works nicely, but I would like to be able to modify the start time and stop time easily.
Now I have to go into setup - more options - user variables to get to the start and stop times.
I would like to have them on my dashboard, so I can modify them from there, or ideally have a start time and duration on my dashboard, so that if i change start time or duration, the stop time is modified along with it.
Why not just set a timer? Click on the Timers button for that device in the Switches tab, and you can change the start and stop times there.
Mainow
Posts: 3
Joined: Sunday 01 September 2019 9:53
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Easily change a user variable

Post by Mainow »

Hi MikeF
Yes, that could work, but I want to be able to make my timer conditional on a dummy switch.
The plan is this: I have a garden sprinkler which I want to sprinkle the grass once a day. I'm not entirely sure about the time and duration yet.
But of course it would be silly to have it go off if it's rainy weather and the grass will be wet anyways.
So I set up a dummy switch which controls whether the sprinkler will go today. I set it up in Blockly, and that works, but it's rather time consuming to have to go into the user variables menu to change the start and stop time.
Ideally, I'd like to have a start time and a duration, so that I can start at time x and stop at time x+y, but I haven't managed to get Blockly to do that either.
EddyG
Posts: 1042
Joined: Monday 02 November 2015 5:54
Target OS: -
Domoticz version:

Re: Easily change a user variable

Post by EddyG »

Could not you use a selector switch with a few presets?
Mainow
Posts: 3
Joined: Sunday 01 September 2019 9:53
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Easily change a user variable

Post by Mainow »

I suppose that could work.
You mean like a radio button with multiple options? Is that possible?
All I found so far is a dummy on/off switch.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest