[DEPRECATED] ST_Anything - Arduino/ESP8266/ESP32

Go with the ESP32 instead and save yourself the headache. I tried to get an arduino to work with an ESP01 as a WIFI shield and it was nothing but a pain in the butt. The ESP32 has a whole bunch of pins available.

1 Like

I had 2 Mega boards running hardware serial to esp01 boards up for a year without issue. Then after a router reset they never came back up. Converted 1 of them so a esp32 board and the other mega connected to a w5500 ethernet module.

All good now and without the headache of esp01 com to mega. Its a pain to figure out the esp01 serial buad rate and use AT commands to set it. Like was mentioned just go with a esp32 board.

1 Like

Hi,

Hopefully a quick and easy question, can I use the door control but with a toggle switch as the input rather than a momentary? I want to have a switch be in one position to trigger and power on a relay and show the open/closed status just like the standard momentary method which my new actuator doesn’t support.

Hopefully I’ve explained that correctly!

Thanks in advance.
Dan.

I am a little confused by this request. Are you asking for a standard “switch” output? That is, “Door Control Open” means the output stays on, and “Door Control Closed” means the output stays off?

The tricky part is that the current implementation, has a momentary input to toggle the door state, and that results in a momentary digital output. This is per the standard ST Capability design. Of course, this may not meet your requirements.

If you can explain your how your actuator works, we should be able to come up with something.

Great work @ogiewon !

I have trouble getting data from a DS18B20 temp sensor.
Serial monitors tells me :
Everything: Sending: temperature1 75.20
ST_Anything Callback: Sniffed data = temperature1 75.20

And “Live logging” on the IDE show when I try tro refresh the parent device:
Executing ‘sendEthernet’ refresh
debug Executing ‘refresh()’

But for some reason no child device is created … any idea(s) ?

Thanks

There are numerous things to check:

  1. In the sketch, did you specify the correct IP address of the ST Hub?
  2. In the sketch, did you specify the correct port (39500) of the ST Hub?
  3. In the Parent Device’s settings, did you enter the correct MAC Address of the ESP8266 from the Arduino Serial Monitor Window and click Save/Done?
  4. In the ST Web IDE, did you add all of the ST_Anything Device Handlers?
  5. In the ST Web IDE, did you PUBLISH all of the ST_Anything Device Handlers?
  6. In the ST Web IDE, when creating the Parent Device manually, did you assign the Hub and Location?
  7. Have you tried rebooting your ST Hub? This has solved the problem for a few folks recently and I have no idea why. This is a ST hub issue, not a ST_Anything issue.

Hope you figure it out!

Yes to all questions … .except did not rebooted the hub.
So I just did, and it works !!!

LOL spent 3 hours trying to figure this out !

Thanks

1 Like

Is this board supported? If yes which board to choose?

Yes, it is supported. Choose the ESP8266 NodeMCU V1.0 board in the Arduino IDE.


Do you mean the one I’ve selected. Chose that and uploaded the sketch ST_Anything_Multiples_ESP8266WiFi_. Seems to upload ok but can’t control the board, have set up pin D8 with a relay connected to LED light just to test.

Yes, that’s the correct board selection. Try connecting your relay to pin D1 instead of D8. In the example sketch, D1 is a SmartThings “Switch” device, so you should be able to control it via the ST Classic Mobile App on your phone, assuming everything else is set up correctly. Pin D8 has some electrical restrictions that need to be followed to use it safely.

Ok thanks I’ll try but it will be good to put a sample sketch for beginners for ST like how to populate IP address etc! Am I using the right sketch?

Yes, you’re using the correct example sketch for an ESP8266 based board. In fact, I developed that sample sketch on the exact same model board that you’re using.

I believe the ReadMe in my GitHub is about as basic as I can make it. If you would like to improve the documentation, I am always willing to accept GitHub Pull Requests. :slight_smile:

Please realize that I do this as a hobby for myself and I do not accept PayPal donations. ST_Anything is intended for programmers who are already familiar with the Arduino IDE, sketches, libraries, etc… It was never intended to be the first Arduino project for a new user to take on. I realize that for many, however, this is their first exposure to Arduino programming. ST_Anything is an object oriented C++ set of libraries that abstract a ton of complexity away from the user. It has been developed over many years and supports numerous microcontroller platforms.

If you want a turn-key solution, I would recommend you take a look at Konnected. In fact, you can actually use the exact same NodeMCU ESP8266-12e board to run Konnected on. Konnected focuses on a single hardware platform, which allows them to streamline their system. They are also a for-profit company and thus have more resources on hand to develop a more turn-key type of product. Even though they are for profit, they are open-source (unless something’s changed in that regard.) So you can try their system out if you’re so inclined.

ST_Anything is a DIY solution, that assumes you understand basic TCP/IP networking and Arduino/SmartThings programming. We’ve made it about 95% easier than it would be otherwise, but that 5% is still on the user to learn and understand.

ogiewonDANCommunity Master

1d

Dan_Lumbard:

Hopefully a quick and easy question, can I use the door control but with a toggle switch as the input rather than a momentary? I want to have a switch be in one position to trigger and power on a relay and show the open/closed status just like the standard momentary method which my new actuator doesn’t support.

I am a little confused by this request. Are you asking for a standard “switch” output? That is, “Door Control Open” means the output stays on, and “Door Control Closed” means the output stays off?

Yes, I think thats what I need…

At present I have a switch output and a status input. when I turn on the switch on the smarthings app this triggers d2 on my nodemcu which connects to a relay that starts the actuator which takes around 12 seconds before being open and also triggering the reed switch connected to d3 to say its now open. in my smartthings app I have named the two devices in a very similar way so they appear next to each-other in the app one as switch and the other one status but it would be nice for the switch to show the actual status in the same button if that makes sense.

likewise when I turn off the switch the relay flicks to the open position which then triggers the actuator to close. what i’m after is for it to work just like how my garage doors work with your custom garagedoor device except for the switch is not momentary but stays in position closed for actuator open and open for actuator closed.

Are you a programmer? If yes, it should be relatively simple to modify the C++ class for the door control to operate as normal switch output, instead of a momentary output. If you’re not a programmer, I can take a look at making this a user selectable feature when declaring the device in the sketch. Just let me know how you’d like to proceed.

@ogiewon quick question : If I want to program a second ESP8266 with ST Anything Parent, do I need to continue child numbering or restart from 1 ?

1st ESP8266 : temperature1, humidity1, pressure1 and temperature2
2nd ESP8266 : temperature?

Thanks again !

Good question! You should restart your numbering from “1” for each new instance of ST_Anything.

1 Like

I wish I was, I try my best to see how things work but I just kind of make tweaks to bits and almost use trial and error with these things. If you could help with the option between toggle and momentary that would be amazing! Actually a selectable device in the sketch would be perfect as I actually have a momentary one in the same sketch too.

A while ago I asked if it was possible to display temperatures on an OLED display as well as on ST. Can you think of any methods to do this, is there a way perhaps of linking a different esp8266 to pull the data from from ST to display it rather than directly from the ds18b20s

Thanks again!!

I’ll take a look and try to add this feature within the next few days.

I do not have any OLED or LCD displays to even test with. Thus, not very likely that I’ll ever add this capability. Search through this thread and you’ll probably find an example where someone has done it. The basic technique that I recommend is to add your OLED/LCD Display Update code to the “callback()” function in the sketch. All updates to SmartThings go through this function, so you can ‘sniff the data’ and use it to update your display.

Sure, simply use a dashboard like Action Tiles on an inexpensive Android phone! :wink:

@Dan_Lumbard - I am making progress. Hang in there…I should have something to release this weekend.