Could someone please post a copy of the Wiz RGBW Light driver code to the HubitatPublic GitHub repository? Not that there is anything wrong with the driver made by ZRanger1, but the built-in driver has some things I want that are not in that driver.
The reason I want it is because I'm going to strip out all the network code and use it in place of the Virtual RGBW Light driver.
Ultimately it's one for the HE boffins to comment on.... But I believe they keep their code as "closed source", i.e. not opening it up to us to do as we please. Not sure how they may treat this one... you never know... Just wanted to set your expectations...
Even if released, this code would be a bad example. Most of the work is done by the parent app, not the driver, and most of that work is done by baked-in methods available to handle WiZ devices (not regular user app and driver methods).
Additionally, a "real" driver is rarely a good start for a virtual driver. A virtual driver generally wants to generate events in response to commands; a real driver normally does so only in response to traffic (reports, etc.) from the device, which will naturally not apply to this case.
You'd be better off starting with a virtual driver, such as the virtual RGBW light driver that is published as an example:
If you are having problems making specific desired modifications to this device, someone can probably help if you share more about what those problems are.
I would like to switch out my virtual RGBW lights so I can control the Effects/Scene capability of the light using them.
I have 3 Bulbs that I use to make certain bulbs behave differently than the others, but all I can do now is Level, Color Temperature and Color. I would need to switch out the driver for the Virtual control lights and the scene color bulbs to do it.
Here is the command and control Webcore examples I use to do this. The first trigger group handles when a Virtual light group turns on and sets it to match the Floor light device. The other trigger group handles changes to the device itself and passes values downward. The Webcore code looks long, but the piston executes in less than a half second except for the turn on statement which requires a bulb delay for the Wiz bulb to fire up from a no power state. I have a different piston that syncs changes between the virtual light with the physical wall switch. I use this daily in Production and it works flawlessly. Even with frequent auto light dimming happening throughout the home based on outdoor lux levels using the OperWeatherMap driver
The Built-In driver switches to Scene for the Color Mode variable when using the bulb effects which would work perfectly for what I'm doing here where I can build a statement to handle it. I have around 127 of these bulbs around the house. Pretty much every light bulb in my home.
In general, it sounds like you need to just implement the capabilities and commands for light effects (doing whatever you need to virtually do with the command, different from a real device and likely just generating the events if you want to "mirror" them out somewhere?). Those attributes and commands from the capability can be seen here: Driver Capability List | Hubitat Documentation
That being said, I'm sure if WiZ uses just the standard attributes and commands from the capability or if the custom commands and attributes you'll see in that driver also come into play for you; in that case, you may need to add custom attributes as well as commands to set them: Device Definition | Hubitat Documentation
Thanks. I'm not a programmer by trade, but I do work in IT and can read code and even modify it to do what I want. I'm just not good at writing something from scratch. I can grab pieces of code from @zranger1 's publicly available driver. I just need to write or get the code that changes the Color Mode from CT or RGB to Scene when an Effect is selected on the virtual light device. That's why I was hoping to get a copy of the built-in driver. I would use the @zranger1 driver, but I get elevated and severe hub loads with it. I think it probably has to do with the Light Check settings that I would have to play around with. I'm sure the Built-In driver does this with the Network Status checks, but it doesn't do it frequently enough with 127 bulbs to freak out my hub.