Make DTH Execution Location Local


(Jack) #1

I am trying to make a DTH that will allow devices to be run locally instead of in the cloud. However, when I built off of the ZigBee Switch template, and changed my code to this:

definition (name: "Curtain", namespace: "Tek", author: "Jack", ocfDeviceType: "oic.d.switch", runLocally: false, minHubCoreVersion: '000.019.00012', executeCommandsLocally: true) {

any device under this DTH would always run from the cloud. And everytime I try to change “runLocally to true”, I always get an error that says:

org.springframework.security.access.AccessDeniedException: Run Locally Permission not allowed for DeviceType: dd39184a-41de-4fe6-b480-a12bb140729e

How do I make my DTH execute locally?


#2

You can’t. :disappointed_relieved: The only DTHs that execute locally are the ones that SmartThings officially distributes with hub firmware updates.


(John C) #3

You don’t.

A DTH that runs locally is basically “baked in” to the hub firmware. All you can do is run device handlers and apps in the cloud. (Sorry! I know this isn’t what you wanted to hear!)

:neutral_face:

EDIT: and @JDRoberts beat me by a nose! :joy:


(Jack) #4

@JDRoberts Ok. So should I set “executeCommandsLocally” to false then. Or does it even matter since I can only execute from the cloud?


(Jimmy) #5

Just delete that from the metadata in the handler


(www.rboyapps.com - Make your home your butler!) #6

Yes you should and many of the other parameters are also not used for cloud handlers. It’s better to keep just name, namespace and author parameters in the definition statement for cloud handlers


(HousePanel Author) #7

I didn’t know where else to post this but this seems like as good a place as any. My story is a sad one…

I am an early ST adopter. In the early days the DTH’s were crap and they didn’t allow images to be shown in icons and the icons didn’t have names, etc. So I updated the default DTH to include a canUpdateBackground parameter. All was good and I was happy. Local execution wasn’t possible back in those Hub v1 days. Fast forward to today when I have over 150 devices that by default use the custom DTH that I wrote for dimmers and switches and motion detectors. Now all my devices run in the cloud even though they could run locally if I had stuck with the default DTH. So today I am going through my entire setup changing over the DTH of everything to use the default DTH provided by SmartThings. This is giving me local control of all my lights and motion detectors. I was tempted to just switch to Hubitat but I decided not to because I like where Samsung is heading.

No ask for help here - just sharing my experience that long-time users should check to see if they have local or cloud processing, and if not local to replace their DTH with the default.


(Jimmy) #8

I think it keeps the picture when you switch to the default handler, no?