Okay, I combined the RampDown and RampUp devices into one.
The attached files implement a binary device that I call RampUpDown. You can use it to slowly ramp up OR down a set of lights. You can use multiple ones of course to create a ramp up-down-up-etc schedule.
NOTE: only for UI4 at the moment.
To use, upload the attached files via the UI4 under MIOS developers/luup files. Then, under MIOS developers, create a device using:
device type : urn:schemas-upnp-org:device:BinaryLight:1
device file : D_RampUpDown.xml
impl file : I_RampUpDown.xml
Once you created the device you might have to refresh the settings to see the Advanced Device variables on the device you just created.
To configure, go to the advanced settings tab in the newly created device and scroll to the bottom:
Devices : this is a list of device id’s for the lights you want to ramp up
StartLevel : 0-100, this is the level the lights will start from when the RampUpDown device is turned on
EndLevel : 0-100, this is the level the lights will have when the RampUpDown device stops/turns off (after the ramp time)
RampTimeSecs : this is the ramp time in seconds (default 1800 = 30 minutes)
MinInterval : The minimum time to wait before sending another ZWave command. You can lower this from the default 30
EnablingDevices : this is a list of device id’s that enable the ramping. If a device is on this list and is off, the ramp will stop
InhibitingDevices : this is a list of device id’s that inhibit the ramping. If a device is on this list and it is on, the ramp will stop. I use this with virtual devices that indicate if we are on vacation or if a particular person is sleeping in. (you can leave these blank)
Now, create a scene that will turn this RampUpDown device on at the time you want the lights to start up or down. Since we get up at 6am, I have a scene that triggers weekdays at 5:30 and turns on my bedroom ramp device with StartLevel 0, EndLevel 100, and RampTimeSecs 1800.
The code sends target levels to all devices in the list every so often, dependent on the Ramp distance, the RampTimeSecs, and the MinInterval.
The device will turn off automatically when the final light level is reached.
Have fun with it.
-ZMaF