I was extremely frustrated that these instructions don’t exist and ultimately I could not find anything that gave me straight forward steps. Now that I’ve finally figured it out (computer nerd of 23 years, sad that it wasn’t as straight forward as I hoped) and now am able to document it for the community as no n00b is going to be able to figure this out as it’s just not simple enough to make sense right from the get-go — now it totally does though.
These instructions will walk you through adding a custom device handler (like driver in Windows and a little app to control the driver) but most-importantly, I will show you where to select it from a drop-down when creating a new device.
My needs revolved around D-Link cameras, 2 models: DCS-5010L and DCS-932L so my example will just use one of those but here are the two links to custom device handlers that easily made my cameras work on a LOCAL IP not through an open port on my firewall like I saw in other code samples:
This ST FAQ hinted me off a bit in step DT5 but until it clicked in my head, I had no success: FAQ: An Overview of Using Custom Code in SmartThings (SmartThings Classic)
DT5) Once the Device Type is published in your own library, select MY DEVICES in the IDE and choose the specific device you want to have use that new device type.
Steps to Create a New Device Type Handler:
- Log into ST API website
- On top press My Device Handlers
- On the right, click green button called New Device Handler
- On top, choose the From Code tab, paste your code and click CREATE button at the bottom
- The IDE will pop up with your new code. On top press Publish > For Me and now the device should be available as in the TYPE drop-down when you go to My Devices.
- Go to My Devices, press large green button on the right called New Device
- Give it a name and any unique device network ID like the device name. I gave my camera the name and ID of dcs5010l for instance. The most important piece is to scroll down in the TYPE drop-down and finally select your CUSTOM device type handler.
- The device will now appear in the ST application under Things.
Enjoy and feel free to comment so that I can alter my superior instruction set
All the best!