How do you add an Arduino WIFI board to ST?

It has been too long since I have done something like this. I downloaded a DH I think I want to use but for the life of me cannot recall how to get the Arduino into Smarthings as a device. Sorry for the ignorance…

I know this is simple but…

You can try using my ST_Anything integration…

1 Like

So I am looking at that for a second time but cannot find where the DTH is on github. I see a deprecated folder and mention to not use with new ST app. Can you guide me to the DTH?

Follow the ReadMe - it is all detailed in there. Also, I recently made changes to support the new ST App as Classic is going away soon.

All current DTHs are found in

These DTHs will only work with the ST_Anything Arduino libraries.


oy, I swear last night I scanned it twice and did not see setup instructions. Now I do. I guess it was the “pop” I was drinking at the time… :wink: Thanks, I will give it a go! I have it in Home Assistant now using an MQTT Broker but I am not ready to make the switch to HA yet so this will really help me.


Hey, I did not get too far. Started working on this and went to test compiling sketch but I got this error. One thing I cannot tell here is where it is coming up with the :24:10 here. It seems it is appending that to the name of the file it is calling. The directory and file does exist but it is just a .h file. Also, one thing I am unclear on is right now I am connected via console but my intent is for this to be wifi connected. I saw there are a couple of different ways to do this depending on that?

In file included from C:\Users\Scott Sams\OneDrive\Documents\Arduino\Sketches\ST_Anything_WindowShade_ESP8266WiFi\ST_Anything_WindowShade_ESP8266WiFi.ino:24:0:
C:\xxxxxx\Documents\Arduino\libraries\SmartThingsESP8266WiFi/SmartThingsESP8266WiFi.h:24:10: fatal error: ESP8266WiFi.h: No such file or directory
#include <ESP8266WiFi.h>
compilation terminated.
exit status 1
Error compiling for board Arduino Uno WiFi.

It appears to me that you may not have your Arduino libraries in the correct folder on your PC.

Take a look at the following post for details on how to set things up so the Arduino IDE can find the libraries.

Thanks. I will check it out

Is this not where they should be?

oddly though when I do select Sketch, View Sketch Folder it shows this one. Is that correct?

I am not sure how your “OneDrive” folder is injected into the file path.

Forget clicking into the “Documents” folder using the left side pane in the Windows Explorer window. Instead, go to C:\Users\YOUR USERNAME\Documents\Arduino.

The path at the top should look like

Thanks and I did see that and I tried two things.

Copied both libraries to the path you said and still no.
Installed on another computer without onedrive and the same thing. I don’t get it. I know it is something dumb but I just have not found it yet. Thanks for your help.

I even copy the error message and use that path and I can paste it in search and it pulls it right up. I did notice the / between directory and file. Not sure that is right - when i paste it properly, it works fine. when i use the / of course it cannot find it

OK I got some help over at Arduino. Turns out I did not have the correct board selected. Any idea on these errors that I get now?

C:\Users\Samsiam\Documents\Arduino\Sketches\ST_Anything_WindowShade_ESP8266WiFi\ST_Anything_WindowShade_ESP8266WiFi.ino: In function ‘void setup()’:
ST_Anything_WindowShade_ESP8266WiFi:60:29: error: ‘D1’ was not declared in this scope
#define PIN_RELAY1 D1 //SmartThings Capability “Relay Switch”
C:\Users\Samsiam\Documents\Arduino\Sketches\ST_Anything_WindowShade_ESP8266WiFi\ST_Anything_WindowShade_ESP8266WiFi.ino:127:61: note: in expansion of macro ‘PIN_RELAY1’
static st::EX_TimedRelayPair executor1(F(“windowShade1”), PIN_RELAY1, PIN_RELAY2, LOW, true, 1000, 1000);
ST_Anything_WindowShade_ESP8266WiFi:61:29: error: ‘D2’ was not declared in this scope
#define PIN_RELAY2 D2 //SmartThings Capability “Relay Switch”
C:\Users\Samsiam\Documents\Arduino\Sketches\ST_Anything_WindowShade_ESP8266WiFi\ST_Anything_WindowShade_ESP8266WiFi.ino:127:73: note: in expansion of macro ‘PIN_RELAY2’
static st::EX_TimedRelayPair executor1(F(“windowShade1”), PIN_RELAY1, PIN_RELAY2, LOW, true, 1000, 1000);

Yes, it sounds like you might still not have the correct board selected… what board are you trying to use? The sketch you’re using is for a NodeMCU ESP8266 based board. When that is selected from the list, the “D1” and “D2” pins are automatically defined for the compiler. The errors you’re seeing indicate that those two definitions are missing.

So, let’s back up and please explain what you’re trying to accomplish - and with what exact hardware.

thanks, i think i found the issue - what i suspected but got more info on Arduino site. This ESP board is numbered differently.

" Since boards like the WeMos D1 Mini are very popular, you will find lots of sketches that use these D n pin names. However, other ESP8266 boards are marked with the GPIO number, and so the creators found no need to create these D n pin mapping variables (though they probably should have for compatibility’s sake). So for your board you can just change the D1 to 1, and so on."

update - it did compile correctly. looks like i am making some progress. thanks for all the help!

1 Like