When I say on the fly, I mean with RM or SA.
I'm using some Zooz timers that have their parameters set to automatically turn on after a set amount of time after a power outage.
I'd like to possibly change that behavior occasionally if I want to turn off the device and keep it turned off.
edit: Just as I was writing this, I had the 'bright' idea of plugging the auto off device into another smart plug that I could turn on and off persistently. I'd still like to know if changing parameter via rule would be possible though.
In general. no; apps (including rules) can only run commands on devices, not change preferences. However, some drivers may expose certain configuration parameters via commands (think notifications on Inovelli Red Series and Blue Series switches/dimmers, among others), and in that case it's certainly possible, though it's generally only done when this is a reasonable thing a user might want to do via an automation.
A custom driver could expose any configuration parameter you want as a command for any device -- an option if a built-in driver or whatever one you're using doesn't.
Do you need the timer to work independently of the hub? It would be more practical to just use RM for a timer instead of the plugs built in one. Then you can enable/disable it easily by pausing the rule.
That being said, I have thought about adding a command to my drivers which lets you change any parameter, which if I added that to my ZEN04 plug driver it would let you change a parameter from RM using a custom command.
I have the plug off when it recovers from a power outage, then auto on after a minute or so, after the generator power is up and stabilized. I just think I'd like to turn it off and keep it off on occasion. Of course I could use two plugs plugged into each other, as I said.
Would calling a custom command be very complex for the user (me)?
No it is not that hard from RM, a little tricky at first but once you under stand how it works it is easy.
Do you expect the hub may be offline when the generator gets up any running so you want the auto-on to function without the hub?
Also the code to add to a driver which sets a parameter from a command can be universal for any device, it is already in some user drivers and the basic zwave tool. It could be copy and pasted into any user zwave driver to add that feature. I think I may add it to my plug driver but it does not work for the ZEN15 (mostly since I do not own one).
I think the hub will be backed up by a battery.
When power is restored by generator, I would like to have it start with no load connected, to the degree possible, and then, after the generator is up and running and stabilized, say a minute, the load comes on line (Zooz smart plug goes auto on).
There might be an occasion where I'd want to turn it off and keep it off.
Again, perhaps another smart plug in series would do the trick.
Also, the Zen15s could be carrying more load.
If the hub will be on backup, would it be easier to just figure out how to let the hub know when power goes out and comes back? I have heard the Ring repeaters work good for that because they have a small battery backup. If the hub then knows when power comes back on, you can create a rule to turn devices on with various delays.
If you want to go down the path for the ZEN04 or ZEN15 auto-on I could drop the parameter command into a driver and at least post it on Gist for you, may become part of my ZEN04 driver as well. I would hate to see you piggy back two plugs, that just seems silly.
But, yeah, now that you mention it.
If the switch would be set to be off when power is restored, I could turn it on from the hub. It wouldn't have to be quick. I'd just have to make sure the switch was eventually turned on. There are probably ways (apps) in Hubitat to make sure a device reacts to a signal.
Yes you can do an RM on a repeat loop and just keep trying until it turns on, then break the loop.
But you cannot back out now, I already made and tested the driver for the ZEN04.
When you run this new command it ONLY sends the parameter to the device, it does not ask for a reply, and it does not update the preferences drop down for that parameter. So the dropdown for that setting will not match the actual setting anymore. So if you do a Configure afterwards it will set it back how you have it in the dropdown. I imagine you have the default set in the dropdown and when you use the command you are just temporarily changing it.
I will do a little sample in RM so you can see how it looks.
So you want to Create Custom Action, and you add 3 number parameters. They go in the same order as shown on the device page. Parameter Number, value, size. The size is documented in the mfg docs, usually it is size of 1, for the Auto-On the size is 4 because it accepts a huge value that equates to about 45 days .
So here I would be setting the Auto-On to 60 minutes
I've got several Zen16 and 17's that aren't being used yet, plus an Ecolink contact sensor, which also would do the trick. So, in this scenario, power would return,whether generator or utility, plugs would remain off (but not go auto-on), the battery-backed Hub would send signals to the plugs, perhaps repeatedly while the mesh, inactive for perhaps several hours, would re-establish.
In my original scenario, the plugs would turn on themselves in (an adjustable) 1-5 minutes or so. If load was to be shed prior to generator shutdown, signals would be sent on the mesh that hopefully had restored itself, and all the load would be shed within a minute, since the plugs would turn themselves on again. That might require a round of repeated signaling if they all didn't get the message, again, because of the auto on. If it was desired to shut off a plug, not a regular occurrence, the parameter could be changed, action performed, and then parameter restored after completion.
All this would be to save the generator from running non-stop during an extended outage where no one is home to shut it down. It would run until it either runs out of oil or propane (in a 1000 gallon tank). It's not as clean as using the transfer switch, but the generator company hasn't made that easy. It's been done, Hubitat has control of my 13kw Generac ,but that approach is probably beyond my capabilities.
I'll try it later this AM when I'm more awake. But, talking it through, I'd probably want a fully functioning mesh to shed load before shutdown. But if it never gets fully established, like for the more far flung items like the refrigerator, it might never go on.
I've got a whole house power monitor coming in the mail, so maybe, if positioned near the hub, it could reliably give me an idea of house power use before shutdown. It's my impression that minimizing load for shutdown isn't as critical as startup, but you still don't want load connected, especially critical stuff, while the electric supply decays upon generator shutdown.