[DEPRECATED] ST_Anything - Arduino/ESP8266/ESP32

Yes, every entry is still in CM. To change output to Liters change these lines from teh code I posted above:
From: double remainingVolume = (volume - (3.14159 * (diameter/2) * (diameter/2) * (sensorValue-airgap))) / 3785
To: double remainingVolume = (volume - (3.14159 * (diameter/2) * (diameter/2) * (sensorValue-airgap)))

From: double capacityLiters = volume / 3785
To: double capacityLiters = volume / 1000

If I use your inputs I get 1457L for the volume. The height entry needs to use the water height when full. Not the total tank height which includes the Airgap.

Im not in a place to test it right now but I think that would work. The original DH also had it *2 but not sure why that was there.

1 Like

Thank you @kampto.

I got it working with these formulas:

double remainingVolume = (volume - (3.14159 * (diameter/2) * (diameter/2) * (sensorValue-airgap))) / 1000 * 2


double capacityLiters = volume / 1000 * 2

Good Morning, Just getting involved with the ESP8266 family,

Does anyone still use an ESP-01 with a MEGA? and what version of the AT command set is being used with Smartthings?

I have seen many different flavors…

AT version: 8 2015 14:45:58) on an ESP-01 I have purchased

From https://github.com/espressif/ESP8266_AT/tree/master/bin/v0.20
Dated Nov. 29, 2014

From https://www.espressif.com/sites/default/files/documentation/4a-esp8266_at_instruction_set_en.pdf, Version 2.2 Dated 2018

The release notes of this document list AT Command versions from 1.5.3 to v2.2

2016.04 V1.5.3 First Release.
2016.05 V1.5.4 Updated Section 5.2.16 and Section 5.2.19
2016.07 V2.0.0 Added Section 3.2.11, updated Section 1.2
2017.05 V2.1.0 Updated Section 3.2, Section 4.1 and Section 5.2.
2017.08 V2.1.1 Added Appendix B.
2018.02 V2.2
Added Section 3.2.22, 3.2.23, 4.2.39, 4.2.40, 5.2.15
Updated 4.2.7, 4.2.8, and Appendix B.

Is there a flavor that is best suited to the work Dan has done?



Every now and then one of my many DS18B20 sensors throws out a -196.6 which I believe is the default error value. Is there a way in the PS_DS18B20_Temperature library to disregard and not send if value is < -100. So in other words that polling of the error value would skip sending it and it will try again next poll interval.


Have been lurking here for a few months. I want to first say thank you to everyone in the Smart Things community. I have learned a lot over that past few months and I am slowly starting to automate my home. I have programmed arduino a little bit prior to this but I am definitely not an expert. I have successfully added a ESP8266 to my Smart Things hub and can view the data on the app. The problem I am having is I disconnected the ESP8266 and it is still showing up on the app as if it is there, but the data is not refreshing. Is this a know problem? I disconnected this 2 days ago. I would want to show that it is disconnected like any other device to know if the data displayed is accurate.

Unfortunately, detecting that a device that is no longer sending data to SmartThings is not a feature of ST_Anything. There is a “Last Updated” field on every ST_Anything child device which at least lets you know how old the data is.

The feature you are probably referring to in ST is called HealthCheck. This feature has been more trouble than it is worth for many users, myself included. I simply disabled it in my ST Phone App. Way too many false positives.

There are some SmartApps that do a great job of monitoring your devices and sending you a notification if that device has not updated over a certain time-frame. The one I use is called “Device Monitor” by @erocm1231. You can find details about it below.

1 Like

ST_Anything uses Rob Tillaart’s DHTStable Arduino library. The first thing I would suggest is to have you update this library with Rob’s current version to see if the -196.6 values go away. You can find his current code at https://github.com/RobTillaart/Arduino/tree/master/libraries/DHTstable.

Note: In ST_Anything, I believe I call his library simply ‘DHT’. You do not want to have both a ‘DHT’ and ‘DHTStable’ folder in your Arduino\libraries\ folder as they both have the same filenames within, and will confuse the Arduino compiler.

Get latest DHT library for a Dallas DS18B20 sensor?

Oooops! Wrong sensor! Sorry about that. You could try a newer version of the DS18B20 library. You do have the 4.7KOhm resistor connected, correct?

lol, I download the DHTstable before I realized it… Good to have the latest on that one anyway. I have the resistor in place. Look like I’m one version down on the DallasTemperature library. Will use the Arduino Library manager to update to latest 3.8.0 and see if it improves.

1 Like

What is the best board that offers the easiest install and best reliability (any links to what I need would be much appreciated)!

So this is my plan…I have an outdoor gate (opens/close like a normal door) and I plan to install a electronic strike to control it with SmartThing’s. In addition, I also want a push button (located on the interior side) so someone can push the button to open the gate.

The entire project will be powered by 12V…will either run wire from the inside of the house or put a small weather proof box with everything and use my doorbell power (with a 24 AC to 12V DC converter).

I am new to ST Anything so I am wondering if this would be a better option compared to a MiMote…and since my Wi-Fi is more reliable…I would rather use that (compared to Z-Wave).

With 12v you’re going to run into some issues. You are going to need a step-down converter since most boards require 5v or 3.3v. You also don’t mention how far from your house the gate is, so I’ll assume it’s close and you get a fairly good signal there. You also don’t mention what will be controlling your striker magnet, whether that would have to be powered directly from the board or whether you’d be using a relay. I’m going to assume a relay.

I’ve used several different ESP boards through my projects (ESP-01, ESP-12E/NodeMCU, Wemos and Arduino). I think if you’re only looking for digital input/output and not a bunch of analog inputs/outputs, and size is a factor, I would go with the Wemos D1 mini or Wemos D1 mini lite. The difference is that the mini runs on the ESP8266 chip and the lite runs on the ESP8285 chip. The later is a lot smaller and lighter and was developed originally for wearables. I’ve noticed that it gets a slights lower signal from my wifi but not enough to be significant in my house but if you’re on the edge of your wifi range out there, that might be an issue.

The D1 has a whole host of “shields” as well. One you might want to look at is the relay shield. This cuts down on the amount of wiring you’d have to do and keeps everything more compact. But I’ve had good luck powering both a 5v and 3.3 v relays from 5v and 3.3v pins when powered by usb. If you are going to use a wired power supply, you can supply either 5v power to the 5v pin or 3.3v to the 3v pin. Just make sure you get a decent supply, most of the burn-outs i’ve experienced have been power related.

If you can wait for shipping from Chine, they’re only around $3. You can also find them on Amazon for around $10, which is what i did because I couldn’t wait 45 days for them to get here.

1 Like

Appreciate the response @Ryan780.

You also don’t mention how far from your house the gate is

I have a strong Wi-Fi connection (multiple Ubiquity access points around the property).

You also don’t mention what will be controlling your striker magnet, whether that would have to be powered directly from the board or whether you’d be using a relay.

Most likely a relay, do you have any links to a recommended 12V relay?

I don’t mind waiting so I found this Wemo D1 Mini for $3.50: https://www.aliexpress.com/item/D1-mini-Mini-NodeMcu-4M-bytes-Lua-WIFI-Internet-of-Things-development-board-based-ESP8266/32529101036.html

If you have any links to a 12V relay that would be great as well!

And do I need anything else (other than a power supply) like a breadboard? I plan to use a 3.3V step down to power the Wemos D1 Mini & the 12V supply will power the relay and lock.

Since you are using a Wemo D1 Mini you can get the relay shield that just plugs directly into the D1 Mini. Search for “wemos d1 mini relay shield” on aliexpress. https://wiki.wemos.cc/products:d1_mini_shields:relay_shield

To properly use a 5v relay (which is most common) you will want to use a 5v step down and not a 3.3v as it might not provide enough voltage to power the relay consistently or at all. The Wemos D1 Mini has an onboard 3.3v step-down for the ESP8266 module.

Then you will need a water resistant case and momentary button made for water proof installations. You can wire the button to pretty much any GPIO the relay isn’t using (default is D1) you want and to GND. I would suggest D3 as it has a pull up though not required.

Button: https://www.amazon.com/uxcell-Cambered-Waterproof-Momentary-Terminals/dp/B06XR7K515/
Box similar to this (measure your setup): https://www.amazon.com/uxcell-60mmx50mmx55mm-Dustproof-Junction-Connector/dp/B06ZY2Z56N/

1 Like

Appreciate the response…just want to confirm that these two are what I need:

  1. https://www.aliexpress.com/item/D1-mini-Mini-NodeMcu-4M-bytes-Lua-WIFI-Internet-of-Things-development-board-based-ESP8266/32529101036.html?spm=a2g0s.13010208.99999999.270.F0GzbW

  2. https://www.aliexpress.com/item/New-Relay-Shield-for-Arduino-WeMos-D1-Mini-ESP8266-Development-Board-WeMos-D1-Relay-Module-Free/32773079321.html?spm=a2g0s.13010208.99999999.262.F0GzbW

And just want to confirm that I have space on the Wemos D1 Mini for a push button and perhaps an open/close sensor?

Are they any wiring schematics to have a better idea of how this will look all together?


A 12v relay won’t work with the D1 mini. You have to use a 5v or 3.3v. Remember that the relay is most often rated by it’s controlling voltage and the switched voltage. Any of these relays work with the D1.

Got it…thanks again!

In that case, I will order these two:

  1. https://www.aliexpress.com/item/D1-mini-Mini-NodeMcu-4M-bytes-Lua-WIFI-Internet-of-Things-development-board-based-ESP8266/32529101036.html?spm=a2g0s.13010208.99999999.270.F0GzbW

  2. https://www.amazon.com/Icstation-Channel-3V-Optocoupler-Development/dp/B01FK11HV4/ref=as_li_ss_tl?ie=UTF8&qid=1503174798&sr=8-2&keywords=icstation+3v+relay&linkCode=ll1&tag=konnected-io-20&linkId=b4310d1b35773f41b3273617b106988d

And I am guessing I can use a simple doorbell as my exit push button. Is this all I need? I do have a breadboard and breadboard connectors.

Is there any wiring schematic on how this will all be wired?


If you give me a minute I can draw one up for you. Just hold on.

1 Like

I’m in a government building and they block aliexpress so I can’t verify for you here.

Based on the URL’s I would say yes.

I use a Wemos D1 Mini for a dual garage door setup with two relays, two door sensors, and threw on a temperature sensor just because I had so much space left. If I wanted I could also implement 2 of the the new car presence sensor that were just developed.

In short yes. The Wemos D1 mini exposes all available GPIO of the ESP8266. 10 of which can be used by the ST_Anything scripts: A0 and D0-D8.

Your gate motor should provide a 2-wire cable that would be wired to a switch. Connect the gate motor wire to the COM (common) and NO (normally open) terminals of the relay. Connect a momentary push button to COM and NO of the relay. Connect a open close sensor to D3 and GND.

Saw your latest post: I would use a waterproof button depending on how exposed this all will be.

Edit: I don’t see a way to setup a button into the door control script so I updated the wiring description.

For the pin defines use this
//Gate Door Pins
#define PIN_DOORCONTROL_CONTACT_1 D3 //SmartThings Capability “Door Control”
#define PIN_DOORCONTROL_RELAY_1 D1 //SmartThings Capability “Door Control”

Under Interupt Sensors use this
static st::IS_DoorControl sensor15(F(“doorControl1”), PIN_DOORCONTROL_CONTACT_1, LOW, true, PIN_DOORCONTROL_RELAY_1, LOW, true, 1000);


This is assuming you’re using the 3.3v relay and not the 5v and that you are going to power with a step down from 12v to 5v.