[DEPRECATED] ST_Anything - Arduino/ESP8266/ESP32

Ryan,
If you are referring to my question, both are ST_Anything devices on the same board. So the relay will run a hot water recirculating pump and it gets turned on by motion sensor in the bathroom or schedule. If the temp sensor on the recirculating line is above a set temp, I want it to turn off locally. The capabilities are switch and temp (DS18S20).

No sketch changes are needed. However, there is no functional difference in the old vs new DTHā€s. Therefore, you may want to hold off until more testing has been completed. I am on vacation for a while, away from my computer, so no quick fixes for a whileā€¦ :wink:

Thanks for the warning! Donā€™t fix it if it ainā€™t broken, right? Thanks Dan!

1 Like

Then yup, use the code I posted.

Im trying to hook up a esp32 board to an ethernet gateway using the w5500 board shown below. Using the SmartThingsEthernetW5500 library. Need advice on the SPI pin connections. The Ethernet2 library calls for GPIO 10 for the CS, esp32 doesnā€™t have this pin. And for the MISO, MOSI, SCLK will they be automatically picked up if I use the boards native SPI?

Sorry, but that is not a supported ST_Anything hardware configuration. I have only ever used the onboard WiFi for the ESP boards.

If youā€™re up for the challenge, youā€™ll probably need to create a new ā€œSmartThingsā€¦ā€ library.

I am on vacation, so I am not able to support this work at allā€¦

Sliced breadā€¦ ST_Anythingā€¦ Iā€™m not sure which is better. :slight_smile:

I just wanted to do a quick drop in to give a success story, tell of a design change I did part way through and get feedback regarding an alternate/more efficient route.

My project: Automatic Chicken Coop Door

TL/DR; ESP8266, DHT22, PhotoSensor, AdaFruit 8871, 12v motor, old 12v battery, solar panel, LM2596, Kitchen Drawer Slides, Wagon Wheel, Saw Blade, '66 Mustang alternator pulley & belt, old air compressor pulley, Kawasaki motorcycle axleā€¦ :slight_smile:

I originally started out with an Arduino Uno and had a working door that reversed the motor to open/close the door. When I went to add WiFi, it quickly became apparent that switching my mechanical connection to match the ST_Anything door control was going to be worth it. Now, the motor only turns one direction but the aesthetics are actually nicer.

The door can be controlled via the SmartThings app, let run autonomously based on light levels or disabled completely. I added very little code thanks to all the great work done by Dan & folks. For that a big thanks.

The code has been running for a week now with no lock-ups or dropped connections. Super happy.

Below is a screenshot of the functionality.

And hereā€™s a link to the initial autonomous closing.

First Auto Closing

1 Like

Thatā€™s awesome! I love seeing how people use the software. Thank you for sharing!

Iā€™m using a NodeMCU board with a simple STAnything setup. It was working great for a long time, but now it locks up every now and then. All of a sudden I just stop receiving events from it. What would be the best way to start debugging?

Has anything changed recently? That is usually the best place to start?

Have you updated the NideMCU recently? There is an issue with the latest Arduino package for the ESP8266. Revert it in the Arduino IDE Board Manager to v 2.3 to prevent a memory leak.

Have you changed anything in your home WiFi configuration?

To help with debugging, use the Arduino IDE Serial Monitor window to see if anything obvious shows up. You can also keep an eye on the ST Classic Web IDEā€™s Live Logging.

I changed a few little things, but they were mostly just the names of devices. I think itā€™s the memory leak actually. I updated things in the board manager and I think Iā€™m at 2.4.1. Iā€™ll downgrade to 2.3.0 and give it a shot.

Thanks!

Hi Dan,

Firstly thanks for your fantastic work on this project! Iā€™m slowly getting there and should have it working shortly!

I just wanted to rack your brains regarding any numbers you may have on battery life with a project like this? I have tried searching through to find as much as I could but was curious if you or anyone could give any numbers on how long a 9v battery for example could run this code for? Or is there a way to monitor remaining battery?

Thanks so much in advance!

Have just followed the set up tutorial to the T but even thought I set the number of buttons to 1, no button devices are showing in the SmartThings app? All of the other child devices are?

Thanks
Gary

From the ST_Anything ReadMe

  1. Button Devices - ā€œwhere do they show up?ā€ Buttons show up in the SmartApps that use them. The Aeon Minimote Device Handler, for example, has one tile with a remote control icon on it. Nothing else. It also has zero configuration options as well. I used this as a model for adding ā€œButtonā€ capabilities to ST_Anything per a user request. When you define the number of buttons (via the gear-based configuration menu in the parent DH) you are announcing to all SmartApps the number of buttons defined. This in turn allows SmartApps like ā€œSmart Lightingā€, ā€œCoREā€, and ā€œWebCoREā€ to know how many ā€œbuttonsā€ to offer you to configure an action. So, the easiest test is to create a new ā€œSmart Lightingā€ automation, where you define the action to be based on a button ā€œpushedā€ or ā€œheldā€ event from the Parent Device (no child devices are created for buttons). Give it a try! I have used this successfully in the past for testing purposes.

There are no Child Devices created for Buttons.

As for battery life, I have never tried using a battery as the WiFi used on the ESP boards would drain it quickly.

If you search this thread, I believe youā€™ll find someone who did implement the deep sleep ESP8266 feature for a sensor that transmits data only, and only infrequently. This allowed him to use a battery to power the device.

My mistake! Sorry for missing that in the readme.

Hopefully my second issue is not the same case, I have added an am2320 to my board to read temperatures and wired the data pin to D7 as per the default script but it is not working? The temperature is ready as -160 as it does when nothing is connected. Am I doing something wrong or do I have the wrong component? I am sure I saw that named in the readme?

I have tested the component in an arduino project and it reads with no issue.

Thanks
Gary

Are you using the library specifically for that sensor?

I installed all of the parent and child handlers and then added the esp8266 ā€˜multipleā€™ arduino script?

I saw that component mentioned in the read me so presumed that it might have been included in the package?

Are you new to Arduino development? I just need to understand your skill level to know how to help you.

The example sketches are primarily configured for DHT11 or DHT22 sensors. In order to use the AM2320, you have to modify the example sketch to include the correct library and to define the correct sensor type.

I am away on vacation, so I really canā€™t be of much more help right now.

Utilizing ST_Anything and the temperature sensors (DHT22/AM2302), is there a way to request the temperature via HTML? I know it sends once a minute to SmartThings, but is there also a way to browse to the URL, port 8090, and a sub-URL to request the temperature and/or humidity? Also, if there is, is there a way to modify how the output looks?

Thanks in advance.