Building a device with CoRe question

A quick 3 minute search doesn’t yield a conclusive answer, but perhaps a good starting point(s):


This one involves NodeMCU ESP8266, which therefore likely uses a URL / REST-API


This one is a skeleton, but only turns on a Switch … so, you would either change the switch triggering code to call the URL endpoint, or use a Virtual Switch to http call SmartApp (there are a few of those!)


Another DTH skeleton… not sure if better or worse than the previous:


###My Recommendation?
Unless you are super tight on time and don’t want to make a “learning exercise” of this, then a Thermostat is not super difficult DTH to build from the right template.

  1. I’d recommend building a simple Virtual Switch DTH (with synchronizing SmartApp) first, as that basic practice is needed to understand the IDE, syntax, debugging.

  2. Make your Virtual Switch call a URL / REST-API for on() and off() commands. i.e., Study the simple http() commands, not the entire chapter on Web Services / Cloud Device Types: http://docs.smartthings.com/en/latest/ref-docs/device-handler-ref.html#httpget

  3. Then port your knowledge from 1 & 2 to the Thermostat template.