Accessing Code for Native Device Handler

Hi I’m using what I think is the native device handler for the Fibaro RGBW Controller with some LED strip lights (apologies if I’ve misunderstood anything - I’m still pretty new to ST). I would like to see the code so that I can copy an aspect that I like for use in the device handler for another device. Does anyone know how I can get the code for the native controller?

The one I’m interested in is the second of the two in the “Type” dropdown menu that is called Fibaro RGBW Controller.

I normally find the “official” code by going to the IDE, clicking on Device Handler->Create New->From Template. This lists a lot of the built in handlers. Unfortunately it does not list the rgb controller you need but thought you might want this info anyway.

Hopefully someone else knows a way to find what you need because I’m curious as well.

Many thanks Robin and Stephan for your replies. All really helpful.

@anon36505037, i am trying to find the source for Ring Doorbell, and not able to find it, is that DTH code available? i see some of the Actions avaialble in webcode based on the device, that am just not sure what parameters may be expected and what values to send and it would be helpful to see the DTH code.

Hi @Steve_AZ, Robin has left ST a while ago if I remember right, so you might not get a reply. Some of the DTH’s you can select from the IDE are not available, and this is one of those.

Thanks @johnconstantelo. How does one figure out what each action would do and what the input parameters are? for example, the Ring Doorbell has an action (In ST) to ‘startStream()’ and enables the parameters. what does the fn() and what inputs are required, any advice?

You’d have to get a hold of documentation, and that can be almost impossible depending on the device and willingness of the developers/companies to make available.

The actions you see in webCoRE will be ‘commands’ defined in the handlers. If they are custom ones there isn’t much you can do, but there is a good chance they are associated with standard capabilities.

The available capabilities aren’t all documented, and the ones that are documented may appear in one, or both, of two places.

The ‘classic’ documentation lists capabilities at and sometimes you find stuff in there that hasn’t made it to the ‘new’ documentation yet. For example startStream() is associated with the Video Stream capability and takes no arguments.

The ‘new’ documentation lists capabilities at and sometimes those that appear in both lists have been updated.

If you are lucky, the documentation might tell you what a command is intended for. I wouldn’t bank on it though.

It can be worth searching or even more broadly on GitHub to see if anyone else has used the command you are interested in. That might give you an idea what it is supposed to do.

1 Like

thanks @orangebucket, great tips.