[DEPRECATED] ST_Anything - Arduino/ESP8266/ESP32

UPDATE 2022-08-17 - Per this recent SmartThings announcement, the Groovy IDE will disabled on September 30, 2022. My best guess is that any existing ST_Anything devices will probably cease to operate at this time, or shortly thereafter. It has been a good 7+ year run for ST_Anything users. I want to thank you all for making ST_Anything a successful project! My son and I really had a lot of fun creating it together, and have enjoyed hearing how you have all used it in so many creative ways.

As many of you probably already know, I have moved on from ST and have ported ST_Anything over to Hubitat as “HubDuino”. If you have devices running ST_Anything that you ‘can’t live without,’ at least you know you have options. Another option for ESP8266/ESP32 users would be to use ESPHome along with Home Assistant.

UPDATE 2020-09-28 - All - I have made changes to almost every ST_Anything DTH to try and make them all work properly with the New SmartThings Mobile App. For the most part, I believe things are working pretty well. @vseven had already made some changes a few years back, which was a nice start - THANK YOU! I had to piece together bits and pieces from a variety of sources to try and get things to look correct and display the correct values in the New ST App. In the process, I also did clean up some custom attributes which will not properly display in the New ST App, including @vseven’s old ‘lastUpdated’ custom attribute. Since it can no longer be displayed in the New ST App, I did not see any reason to keep it. I did leave the code for it commented out in every Child DTH, so feel free to uncomment those lines if you need that attribute for anything. Just remember that in two weeks the Classic ST App will be gone for good. :wink:

I really hope this helps the ST_Anything users!

ST_Anything allows you to integrate a custom Arduino or ESP8266 device with SmartThings by editing only 1 Arduino sketch file! No groovy programming skills are required! You simply decide what devices/sensors are attached to each pin of your Arduino, ESP8266, ESP32 and ST_Anything handles the rest for you! Numerous example sketches are included to help get you started.

[v2.9.9] This is a minor release to improve support for the latest ESP8266 and ESP32 Arduino IDE Board Support Packages.
[v2.9.7] Minor changes to IS_Button device
[ v2.9.6] Added support for Arduino NANO 33 IoT (thanks @Corey_Spears1!)
[ v2.9.5] Added support for MKR1010, Arduino 1.8.9, ESP8266 v2.5.2, updated numerous libraries, etc…
[ v2.9.4] Added support for the SHT31 (temp, humid) I2C sensor
[ v2.9.3] Significant enhancements to the EX_Servo class and Child Device Handler - Thanks Jeff Albers! ALso, an attempt to prevent duplicate child devices from being created.
[UPDATE v2.9.2] I have added I2C sensor support for the MAX44009(lux), TSL2561(lux), BH1750(lux), AM2320(temp and humid), BME280(temp, humid, pressure), BMP280(temp and pressure), and updates for the TCS34725(color lux). A new example sketch to demonstrate these is included as well.

[UPDATE v2.9.1] I have added Servo Motor support. I have redesigned some of the inner workings/architecture of the Parent and Child devices. I have updated all of the Parent and Child devices in Github. I have tested everything that I was able to, but there is always a chance that something was missed. There is no requirement that you upgrade your Device Handlers at this time. If you do, I just want you to be aware of the changes.

[UPDATE] Added ESP8266 Arduino OTA support. Update your SmartThingsESP8266WiFi library, compile your sketch, and load your ESP8266 via USB. Afterwards, you can update your ESP8266 Over The Air from the Arduino IDE. This is especially helpful for hard to reach devices.

I am happy to announce the release of ST_Anything v2.5, with added support for SmartThings new Composite Device Handlers (i.e. Parent / Child DHs)! No more messy/complicated SmartApps/Virtual Devices. In fact, you probably will never need to modify the groovy DH code for ST_Anything ever again!

V2.7 adds support for the Arduino W5500 shield and includes a new AlarmPanel ESP8266 example sketch.
V2.71 adds support for the Arduino WiFi101/Adafruit ATWINC1500 shield, the Arduino MKR1000, and fixes the performance and reliability issues found earlier when using the Arduino MEGA + ESP01.
V2.8 adds support for the ESP32
V2.9 adds ESP8266 Arduino OTA support plus much more (see ReadMe for more details)

V2.x was created in response to SmartThings recent decision to stop selling and supporting the original ThingShield. This version has support for the following tested hardware configurations:

  • Arduino UNO R3 or MEGA 2560 + ThingShield
  • Arduino UNO R3 or MEGA 2560 + W5100 wired Ethernet Shield
  • Arduino UNO R3 or MEGA 2560 + W5500 wired Ethernet Shield
  • Arduino MEGA 2560 + ESP-01 WiFi module (using “AT” firmware and WiFiEsp library - not very reliable!)
  • NodeMCU v1.0 ESP8266-12e WiFi (no Arduino needed!)
  • ESP8266-01 (ESP-01) WiFi (no Arduino needed!)
  • ESP32 board WiFi (no Arduino needed!)
  • Arduino MKR1000
  • Arduino MEGA 2560 + WiFi101 shield

As always, feedback is welcome. If any of you try to implement this, please feel free to improve the ReadMe files via a GitHub pull request. I welcome the assistance! I will continue to update this post/thread as I receive feedback from the community.

New ST_Anything v2.5+ Architecture Flow Chart

Please see the ST_Anything v2.9.1 ReadMe below for more details, as well as the new ReadMe I created for the new v2.x SmartThings library.

ST_Anything Library

Announcing the "ST_Anything" Arduino/ThingShield Project
Smart Sprinkler System
Is SmartThings Shield for Arduino Available Anywhere?
Raspberry Pi Codesys Project
Thingshield--tell support you want them still offered
ESP8266 Temperature Monitoring in Smartthings? (Where to start with a new device)
Simple and reliable esp8266 nodeMCU smart garage door opener
ESP8266 Smart Sprinkler System
Arduino or raspberry pi
Temperature sensor with 2 meter wire
WTB: Thingshield
Looking for a multi momentary switch module which will work with smartthings
How to turn anything with an on/off switch into a connected device?
Smartthings Cree PCM integrated Audio Volume Control
Wanted: ST Arduino Shield
[RELEASE] ActionTiles, the homepage for your SmartThings home!
ST_Anything, No Child devices showing up, Parent Device is
How do I control a Servo in SmartThings
Arduino Integration?
Is Z-Uno supported by Smart Things? I need a water level sensor
Motion Sensor Art Project: 1) Randomness and 2) Distance Detection?
ESP8266 Node MCU - Temp, Contact, Water Sensor
[RELEASE] ESP8266 / Arduino servo controlled smart blinds
Battery powered Z-wave momentary relay/contact options
Trying to Build My Own Z-Wave Garage Door Opener (Looking for a Relay Switch Suggestion)
Announcing the "ST_Anything" Arduino/ThingShield Project
Fibaro RGBW Controller (4x0-10V input)
Nodemcu integrated with Bluetooth smoker
Two Sources connected to one temp probe?
Best RPi OS for numerous smart home projects?
Audio intercom/buzzer system - opening the building door
A way to read the state of an LED
Connect wired alarm system sensors to SmartThings with a NodeMCU ESP8266 [deprecated]
[RELEASE] Sonoff, Sonoff TH, S20, Dual, 4CH, POW, & Touch Device Handler & SmartApp ($5 & $10 Smart Switches)
Digitizing Electronic Mattress Pad - Arduino project
Changing old manual dial humidifier setting to something smarter?
Connect wired alarm system sensors to SmartThings with a NodeMCU ESP8266 [deprecated]
Build a smart "Clapper" with SmartThings and Arduino
Trying to control older lighting system over RS-232 with simple ASCII commands?
Home Water Management- What is best for Level and Pressure or Flow Monitoring- FortrezZ vs. EKM Metering?
Arduino Smartthing help
Arduino Integration?
Does any one know of a z-wave sensor to connect existing hardwired alarm system
Recommendations on any 2 in 1 window sensor?
Looking for Noise Sensor / Noise Monitor for vacation rental to be alerted to loud parties
[ST Edge] DSC Security System / Envisalink Driver (2021)
Controlling LED Strips
Looking for a specific topic
Is there code that acts as the smart things hub?
How can I control this? (USSOLID Motorized Ball Valve)
Raspberry Pi Temp sensor integration
Announcing the "ST_Anything" Arduino/ThingShield Project
Is Z-Uno supported by Smart Things? I need a water level sensor
HTTP Response using sendHubCommand in DeviceHandler
Announcing the "ST_Anything" Arduino/ThingShield Project
Collaborators Required - ESP32, New UPnP Library
Door Sensor for Shed
ST Compatible Load Cell For Gas Bottle?
FAQ: CONFIRMED: Local Processing - Working Device Handlers
Arduino or raspberry
Heat sensors?
Need Z-Wave/zigbee solution for projection screen w/ wall switch and 12V trigger
How to change a door/window open/close sensor to smoke detector?
Raspberry Pi Temperature Sensor
Temperature Sensor for Radiant Floor Heat
Is SmartThings Shield for Arduino Available Anywhere?
Water Pipe Temperature Sensor
Connecting an Alarm System Sensor to SmartThings and Having it Still Work in the Alarm System at low cost?
Push button? - I don't know how to explain it
Measure the color temperature
ST and Professional Monitoring
Thingshield to be Discontinued - What the Heck
ZigBee Development Board
Trigger this 12v remote?
“ST Anything” for V3 Hub?
How do you add an Arduino WIFI board to ST?
Simple wind direction (and maybe speed) sensor?
Smartthings + ESP8266 + Roomba (DIY ThinkCleaner)
Connection with Arduino shield
Raspberry Pi with PHP (or Arduino/ESP8266/NodeMCU) to GPIO to Relay to Gate/Garage Trigger
Control RF Devices
Temperature sensor with 0.1 precision? (EU)
Automating a motorized awning
Need help with st_anything static st::PS_Generic
Communication Protocol Boards / Controls for custom design work?
Project: Arduino based contactless doorbell
ST_Anything Transmitting Data, but ST not receiving it
DIY project: garage opener control with photoelectric sensor. Ideas needed
Convert a Battery-powered Sensor to Mains?
Motion Sensor Suggestion Needed (Yes, I've done my research here)
Wanted to Buy: ThingShield for SmartThings (Arduino)
Smart Device that Can Measure Distance
Amazon: Prota Microbot Starter Kit $199 for bridge and 3 push microbots
ST_Anything - Changing the switch state for high level relay and issue with additional buttons in the app
Did they ever make a replacement for the things shield?
Project: New Construction Home from bottom up. What do you recommend?
DIY HVAC system over pressure device
CreeRelays Project (part Cree bulb, part Arduino)
Acurite weather station question
How to control an RF controlled device with Smartthngs
Arduino integration w/o SmartThings Shield
Arduino Integration?
Zigbee Siren
Acurite weather station question
Wanted: ST Arduino Shield
Is Z-Uno supported by Smart Things? I need a water level sensor
SmartThings Integration With Home Security
Announcing the "ST_Anything" Arduino/ThingShield Project
DMP Security Alarm Integration
Replacing the Arduino Thing Shield with an xBee in transparent mode
Is SmartThings Shield for Arduino Available Anywhere?
Aquarium Automation Project Help
Looking for a device that reads 0 - 10v sensor output
Internal contacts on ecolink door sensor (DWZWAVE2.5-ECO)
Simplest Arduino (input output) like device supported by smartthings?
How to make arduino ethernet shield to send POST commands to hub
Best Arduino Zigbee Solution
ELI5 - Uses of running hassio + ST?
Device Handler Polling Other Contact Sensor State
[RELEASE] Konnected Security 2.0 - Connect Wired Alarm System Sensors and Siren to SmartThings - big update and new name!
Bringing in Analog Sensors & Misc Items to SmartThings using ST_Anything - My Writeup
How can I receive LAN messages on the ST hub (when the messages can come at any point)?
Ping a local device
Any alternative to SmartThings Shield for Arduino?
Announcing the "ST_Anything" Arduino/ThingShield Project
Announcing the "ST_Anything" Arduino/ThingShield Project
ESP8266 Garage Door Opener
Help with ST_Anything scripts anyone, please?
I need a Arduino Shield, help please
Addressable Led's

Awesome…can’t wait to test it out!

1 Like

I’ve got it up and running on my old security system. With some modification I’ve got multiple doors and my motion sensor working perfectly. Is there a good way to label each door on the app? It’s not a big deal I just thought it’d be a nice touch.

Also, I see the siren portion of the code. Does this mean I can wire this to my existing alarm siren? Any documentation on how to do this?

You can add a label to each tile if desired in the Device Handler groovy code.

Here is an example (see code below.) Note the addition of the “CS1” text in the ‘label:’ fields below. You’ll have to play around with it a bit as the formatting of text is kind of hit or miss depending on whether you’re an Android or iOS user.

The second step after you get the Device Handler working is to create a Virtual Device for every Tile in the Arduino’s Device Handler. Then use the Multiplexer SmartApp (with mods as necessary for your specific use case) to glue the Virtual Devices to the individual tiles in the Arduino’s Device Handler. These virtual devices will then be used as individual devices, with unique names, for all of your other SmartApps to use.

I updated the ReadMe with some of these details near the bottom.

   standardTile("contact1", "device.contact1", width: 1, height: 1, canChangeIcon: true, canChangeBackground: true) {
		state("open", label:'CS1 ${name}', icon:"st.contact.contact.open", backgroundColor:"#ffa81e")
		state("closed", label:'CS1 ${name}', icon:"st.contact.contact.closed", backgroundColor:"#79b821")
1 Like

Oh, and as for the siren, yes you can connect a relay to the digital output pin you assign on the microcontroller. Attach that relay’s output to the Siren and you should be good to go!

This is great to see! I plan to start using this when I get finished with my current project - controlling some RGBW led strings with ST. Hope your using the Arudino IDE to program the ESP8266, but I guess that I will see.
Thanks again - Been using the original ThingShield to control my Garage Doors since the beginning. Now my GD open automatically when I return home from work.

Will it be able to run both this and mysensors gateway on the same Arduino? In that way we could expand our systems both easy and cheap

Yes, everything is done via the Arduino IDE. I built everything using v1.8.1.

I have been wanting to add some RGB Lighting Support as I have a 5m strip of NeoPixels laying around. Should be a simple matter of adding another ST_Anything device sub-class, possibly of the EX_Switch class. Should be fun! I am hoping the ESP8266 is compatible with the NeoPixels. I know an Arduino UNO/MINI/MEGA works with them.

While I have looked at MySensors in the past, I have not looked at trying to combine ST_Anything with MySensors. Seems like trying to squeeze two Master Controllers into the same Arduino. Sounds complicated to me, but maybe it would be simpler than I am thinking.

Thanks for the reply.
I believe that the ESP8266 can control the NeoPixels as it is a digital RGB that can be controlled by just 2 digital pins. (Info is located at: https://learn.adafruit.com/digital-led-strip where they use a Arduino.) I am controlling an Analog RGB, separate input for each color, using a SmartLife H801 controller which is ESP8266 based. (See [RELEASE] SmartLife (H801) RGBW LED Strip Wifi Controller & Bulb for reference.)
I wanted to buy a 1M RGBW but they are only available in digital, so I have been stuck. If you get NeoPixels working then this would add another option for the community, and of course fix my problem. Also, it would work out pretty well as the other project only works for Analog LED’s and your would work for the Digital ones.
First I gotta get my ESP working with your new Anything v2.


I have added support for using the inexpensive ESP-01 WiFi module in conjunction with an Arduino MEGA 2560 to the SmartThings v2.1 library.

I have also added a new example to ST_Anything that demonstrates the usage of this new hardware comnination. Please see the new ST_Anything_WiFiEsp.ino sketch.

I just added support for running ST_Anything directly on the tiny ESP-01 module. The ESP-01 is normally used to add WiFi capabilities to an Arduino. However, it is quite capable all by itself. It only has 2 GPIO digital pins, but often this is all that is necessary.

New ESP-01 standalone example sketches can be found in my github repository at

WOW WOW WOW…and THANK YOU! This is beyond cool and worked like a charm on the first shot via your instrux and code. I loaded it onto an ESP826612E (NodeMCU V0.9 I have HUUUGE plans for using this goodness on all kinda ‘Things’. Once again, Thank you VERY MUCH and have a most wonderful weekend!

1 Like

Glad to hear it’s working for you. Please let me know if you have any suggestions for improvements.

Any chance for more of a how-to writeup? Like This is how you add the library, this is how you add the sketch, etc.
I have two ESP8266’s on order and I want to get ready… Already have the Mega 2560.
Thanks for your work on this!

Never mind - I just found your writeup. Looks comprehensive even enough for me!

1 Like

Have you read the two ReadMe’s already in my Github Repository? They are linked in the first post. If not, that’s a good place to start. I detail the exact steps on what to copy where on your system.

Also, there are a multitude of guides already online on how to use the Arduino IDE, including the use of libraries.

Note: Use the “Manual Installation” instructions

And for using an ESP8266 with the Arduino IDE



Thanks Dan!

Has anyone found an appropriate Arduino breadboard shield to use with the ESP8266?
A full size breadboard won’t fly…

1 Like

I ordered a few of these for my NodeMCU boards and they work quite nicely.


Thanks - I ordered two. Adafruit also has an ESP8266 board. Ordered one of those.
At least these things are cheap enough to play with!

Hi @ogiewon,

Complete noob here but I can see you’re a bit of a guru when in comes to ST anything. I’ve been getting my head around Smartthings a bit but when it comes to Arduino I know nothing. However, I’m a fast learner.

I’m working on a residential construction project so there is the potential for some paid consultation if you are interested.

There are 25 blinds in the house to be bought, these will more than likely be from China with 433Mhz multi channel remote controls (because they’re cheap). I’ve tested one with a Aeon micro motor controller and got it up and running on ST but we want to be able to control the blinds from the room without the use of the phone. Due to my limitations with coding etc I’m thinking of using the dry contacts on the motor controller to put an up down stop switch in each window. But by the time we buy 25 motor controllers and 25 switches that wont look out of place the cost is starting to add up.

What could you recommend for getting the up down and stop functions on ST so that we could use the original 433 remotes in each room? Bearing in mind my limitations and the fact that this is not my home and if something goes wrong the owner would need to get some sort of support.

I appreciate your help with this and I look forward to hearing from you.