DanielOgorchock / ST_Anything

ST_Anything is an Arduino library, sketch, and Device Type that works with your SmartThings ThingShield to create an all-in-one SmartThings device.
GNU General Public License v3.0
438 stars 448 forks source link

Question/Assistance with setting up a switch #245

Closed Conmmander closed 3 years ago

Conmmander commented 3 years ago

I'm looking to setup an RGBW switch off an ESP8266 Node module. I've ran through the test project and had some questions. Firstly, it might be worth adding in the guide that you should NOT spam click the "Execute Update", or else you'll have multiple duplicate Device Handlers. Furthermore, selecting all the device handles as the instructions ask doesn't work. A few seem to not be liked by ST. image

In trying to select those and publish them, I get "500: Internal Server Error, URI /ide/device/doRepoUpdates"

These hurdles aside, I wanted to know the steps for connecting the RGBW switch. The guide states to connect as a Parent ST Anything Ethernet. Is this needed for the ESP8266 module? More importantly, do I need to keep the setup project up, and then take a 2nd ESP8266 module to handle my LEDs then?

The guide has a pretty clear walk through, but it doesn't tell you what the sample project does, or any changes in steps for specific devices. Needless to say, "Wait a few seconds (you can watch Live Logging in the ST IDE if you'd like) while all of the Child Devices are being automagically created, assuming your Arduino or ESP8266/ESP32 board is powered up and connected to your home network" made me a bit confused, because it seems to me like I'd need to already have another ESP board setup.

Some guidance would be appreciated! (Thanks for making an awesome project)

ogiewon commented 3 years ago

Thanks for the feedback. I have updated the ReadMe to instruct users to UNSELECT the .json files. Those are only needed for the creation of the DTH groovy VIDs, which the "New" ST App requires. The old Classic ST App was much more flexible.

I have also instructed users to not click the Execute button more than once, when importing the DTHs.

The ST_Anything_Multiples....ino example sketches are usually pretty self-explanatory, for most users have developed Arduino code previously, and that have a basic understanding of Arduino libraries and sketches. This is an assumption that was made when we developed the project and shared it. ST_Anything is collection of Arduino "Libraries", with example sketches to assist users in getting started. It also includes the necessary ST Groovy DTHs to drastically simplify the custom coding requirements on the ST Platform. In general, ST_Anything is not targeted at the first time Arduino and ST IDE user. There have been many users for whom this was their first experience with Arduino programming...however my advice to them has always been to follow one of the many online tutorials in Arduino programming to get familiar with the platform. It is also assumed that the user is a proficient C/C++ programmer, and has a basic understanding of TCP/IP networking.

ogiewon commented 3 years ago

Also, as I mentioned over in the ST Community, you only need 1 microcontroller plus a ST Hub. No other hardware is required.

Hope this helps.

Conmmander commented 3 years ago

I ultimately figured it out.

Some tips that might help other ESP8266 users, Uncomment the declaration variables for ESP8266 pins, as it won't work if you leave it without definition,

If you're having issues, uncomment everything in the callback function that has Serial.print and Serial.println. (Is possible to add this to a debug variable, so users change a debug boolean and it will enable those for them, rather than needing to uncomment them?)

Check via the device serial monitor and the ST IDE Live Logger. If you're device is working, it should also log changes there. The device status indicator is NOT accurate in the IDE.

ogiewon commented 3 years ago

Glad to hear you got it working! :)

Uncomment the declaration variables for ESP8266 pins, as it won't work if you leave it without definition,

These definitions are typically handled automatically by selecting the correct ESP8266 board type in the Arduino IDE Boards Manager. When using a NodeMCU v1.0 ESP8266 board, these pin definitions are automagically handled. If you're using a different board, you'll need to use whatever pin definitions are associated with that particular board.