Sharing code between device handlers


Hello, is it possible to share code between device handlers so that I don’t have to copy and maitain multiple copies?
Eg have classes that can be imported somehow?

( co-founder Terry @ActionTiles; GitHub: @cosmicpuppy) #2

Nope… But @pstuart was working on a way to do this by building an external (ie, desktop) based IDE that has a code pre-processor which substitutes in code segments at upload time.

Not sure the status of this project (which offers many other great features).

(Patrick Stuart [@pstuart]) #3

This project is on hold until an official API for accessing the IDE is made available, if / when.

( co-founder Terry @ActionTiles; GitHub: @cosmicpuppy) #4

The CLI (command line interface for offline SmartApp / DTH packaging and uploading… Demoed at SDC last month) is going limited Beta soon, I think… Is that the same thing?

If so, that’s a reason for cautious optimism.

(Patrick Stuart [@pstuart]) #5

The cli will allow any offline editor. Time will tell.

(Ruggero) #6

Is there any update on this? I have a few ZigBee devices (motion, contact, button, plugs) that report the same information (eg: temperature, battery, etc.) and it’s annoying having to copy the very same code in each DTH. Let alone maintaining it.

( co-founder Terry @ActionTiles; GitHub: @cosmicpuppy) #7

Wait for the new API. Complete overhaul, and hints are that it will be much more developer friendly… code reuse mechanisms wouldn’t be surprising.