[DEPRECATED] ST_Anything - Arduino/ESP8266/ESP32

OK. I selected ST_Anything_Multiples_ESP8266WIFI.ino and NodeMCU V1.0 and it’s now reporting:

C:\Users\cslee\Documents\Arduino\libraries\SmartThingsESP8266WiFi\SmartThingsESP8266WiFi.cpp: In member function ‘virtual void st::SmartThingsESP8266WiFi::init()’:

C:\Users\cslee\Documents\Arduino\libraries\SmartThingsESP8266WiFi\SmartThingsESP8266WiFi.cpp:157:29: error: ‘class ArduinoOTAClass’ has no member named ‘getHostname’

_ Serial.println(ArduinoOTA.getHostname());_

_ ^_

exit status 1
Error compiling for board NodeMCU 1.0 (ESP-12E Module).

Try compiling and running a simple example sketch, like the BLINK sketch. This will help make sure you can compile and program your ESP8266 board.

Blink compiles fine.

Great. Now try to get one of the example ESP8266 WiFi sketches to run. There should be one that that displays nearby WiFi Access Points.

After you get this working, you should be able to get the ST_Anything ESP8266 sketch to compile and run.

OK. Got it compiling. The libraries seems to have gotten corrupted. Thanks for the help.

1 Like

Hi @kampto. This is exactly what I tried to accomplish, but my lack of programming skills prevented me from doing it.

My understanding is that we still have to enter the distances in centimetres? I get incorrect volume readings if I do that:
image

I don’t see anything wrong with your calculations in the DTH?

Did I miss antything?

By the way, am I correct that to get the readings in litres, I have to divide by 1000 where your DTH uses 3785?

Thank you

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

and

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:0.40.0.0(Aug 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?

Thanks

Ben

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.

Hello,

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