Announcing the "ST_Anything" Arduino/ThingShield Project


Ken - Be sure to try using the latest and greatest code which eliminates the need for virtual devices altogether. My latest software uses the new Composite Device Handler (Parent/Child) to permit one device to have multiples of a single ST capability (like having 8 contact sensors on one arduino.) I haven’t updated the Github ReadMe yet, but I am working on it…

All, I have just released v2.5 of ST_Anything with support for the new Parent / Child Device Handlers. Check it out at

1 Like

I want to start by saying thank you so much for this project, it has really opened up so many possibilities. So I started with the NodeMCU and have it successfully working for a few weeks now. However I have tried to use a Mega 2560 with the ESP-01, but I seem to be having some issues. At first, it connects to the wifi and communicates with the hub, working as expected, but after 10 minutes it seems to still be connected to the network but is unresponsive. Any help would be appreciated. Thanks

I had a similar issue and wonder if it’s the 5V output of the Arduino going to the 3.3V ESP-01. I bought a 5.5V-3.3V voltage regulator to try, but changed my project to use the Arduino Ethernet Shield. Only one regulator would be needed as the 3.3V output of the ESP to the Arduino would be fine. I did find a couple post that indicated that the ESP should be 5V tolerant for some of the input ports, but not sure if this is completely correct.
Anyway, something to consider as the 5V input my eventually mess up the ESP. If you try it before me, please let us know your results.
Update: I do have a separate 3.3V supply input voltage for my ESP-01.


I agree with @Garnet. I too have seen some unstable behavior from the Arduino + ESP-01 combination.

Can you please share a wiring diagram of exactly how you have connected the ESP-01 to the Arduino? Are you trying to power the ESP-01 directly from the Arduino’s 3.3v pin? Or do you have a dedicated 3.3V power supply for the ESP-01?

I’ve been using the arduino 3.3V output, but I’ve now tried using a voltage regulator with power from an external source, but no improvements. I also tried running it off a lithium battery at 4V but that didn’t help either. As for wiring I followed the diagram below, but connected the UTXD and URXD to pins 19 and 18 on the Mega.

1 Like

Since I already have the system running and it has been running great under the old board does anyone know if you can set this up to openand close a damper and turn off and on a fan on a fresh air duct that I am going to through into my HVAC system. I would like to be able to open and close at a percentage based on voltage.

I have the same problem. After about a week it freezes but the networking is still responsive. I originally had the ESP-01 then tried it with the w5100 shield and same issue on both the new and old st_anything code versions. Sucks cause I really love this setup. In order to get it working I have to power cycle the board and then it repeats

I will try to look at this issue in more depth once I finish getting the ThingShield v2.5 code released.

If you leave a Serial Monitor window up and running, do you ever see the “Free Ram” get consumed? There is always a possibility that I have a memory leak in the v2.x LAN based connectivity software. Personally, I am still using a ThingShield on my primary deployment, running very old code.

It may be possible, but we’ll need a little more information…

Turning the fan on/off is easy. Just use one of my EX_Switch devices. Connect a relay to the digital output and then connect the fan to the relay dry contacts to turn power on/off. Obviously, the Arduino cannot supply enough power to run the fan at the correct voltage/current. That is what the relay is for.

As for adjusting the dampers, that depends greatly on what type of signal the damper expects? The Arduino does not have a true Analog Output which would vary voltage from say, 0 to 5 volts. The Arduino’s “AnalogOuput” routine is used to generate a PWM output signal. I am sure you could add a true analog output chip to the Arduino, but then you’re going to need to write some code to integrate it.

Sounds like an interesting project.

1 Like

All, I have just released v2.6 of ST_Anything with support for the new Parent / Child Device Handlers for the old ThingShield. Check it out at

Arduino Pin Out is 5 Volts and you have it going directly going into the ESP8266 that is 3.3 Volts. ESP8266 may have some protection to 5V, but I conjecture that it eventually overheats/overloads with continued 5V input.

See: Arduino to ESP Connection

You need a FTDI serial adaptor or some resistors like:

On a side note, the ESP8266 should NOT be powered off the Arduino. (This makes me sad too.)
Arduino DC Current for 3.3V Pin 50 mA (Maximum current draw is 50 mA) -> ESP8266 can draw 200mA+ “Maximum current draw is 300 mA, so use a supply that can supply 500 mA to be safe. More is better. A weak or poor quality supply will cause the board to reset unexpectedly and make debugging difficult.”

Something else to consider: Power Supply. Make sure your power supply is adequate for Maximum draw (Amps) as it could run days on normal draw. Most times inadequate (low) power causes bugs and not a complete shutdown.

1 Like

It has free ram of 6558 and it still reads the sensors correctly on the serial monitor and responding to networking. The issue seems to be sending to smartthings hub for update. I didn’t get to check the logs on the hub yet. What do you think?

Just a list of brainstorming/troubleshooting ideas/questions…

How often does the issue occur? x hours? x days?

Do you have numerous LAN based devices connected through the HUB to ST? I saw in another thread that there may be a limit to how many LAN connected devices the hub can support.

How frequently are you sending updates from the Arduino to ST for your Polling Sensors?

How reliable is your internet connection?

Can you still ping the Arduino and the Hub from a computer on your LAN when the problem occurs?

What version of the Arduino IDE are your using?

So, I found something very interesting this morning on my Arduino MEGA+ESP01 bench system. The MAC Address reported in the Arduino IDE’s Serial Monitor window was different that what I saw in the ST IDE Live Logging (All) for updates coming in from the MEGA+ESP01. Not sure how that happens… The first 10 digits were the same, just the last two were different. When I used the MAC address from the ST IDE Live Log, and typed it into the MAC address configuration field in the phone app for the parent device, all communications started working.

Note: I had to change my ESP-01 to a new one due to careless wiring on my part where I fried the original ESP-01. The original one’s MAC address matched in the Arduino IDE and the ST IDE. Just this new one has the issue of Arduino IDE reporting one value and ST IDE reporting another.

I will debug this more to see what is going on. I wonder if my ESP-01’s need newer firmware to fix a bug? Just a guess. My router shows the same MAC address as SmartThings, so it must be on the Arduino side…

@Garnet, @Rostik_Borenko, @Raymond_Lopez

I was able to fix the strange issue of displaying the incorrect MAC address for the ESP-01 when attached to the MEGA. I also updated the WiFiEsp library.

Please update both the SmartThings and WiFiEsp libraries. Not sure if this is going to help with the uptime issues some of your have seen or not. I think a quality 3.3V power supply for the ESP-01 is critical to performance and reliability.

I am wondering if th official Arduino WiFi shield would be a much more robust solution? Unfortunately I don’t have one and they seem to be very scarce. My W5100 shield has been very reliable.

This is awesome, thanks so much. I don’t 100% understand what you changed but mine Mega + ESP01 system has started to work reliably so far. Will post more updates soon.

1 Like

I’m currently using w5100 and its the same outcome as the esp-01. Did you change anything for the w5100 networking ?

No changes to the W5100 library. My W5100 is pretty solid, whereas my MEGA+ESP01 just locked up after running for about 7 hours. May have been due to Microsoft automatically rebooting my Windows 10 PC to install security patches though… I have a standalone ESP-01 that’s been running all day without any issues, although it has dedicated 3.3v power so it wasn’t impacted by the PC reboot.

Can you send me a copy of your sketch via private message? I’d like to look at it to see if anything jumps out that could cause the W5100 communication issues.