[DEPRECATED] ST_Anything - Arduino/ESP8266/ESP32

I need help, i did everything and can’t get button to show up. I have nodemcu and trying ST_Anything_Relays_ESP8266 example. i also see message

“ST_Anything parent device has not yet been fully configure. CLick the “gear” icon , enter data for all fields and click done”

but i have done above




Looks good to me. There are no “Button” devices that show up in the Parent Device, other than the count.

To use a button, go into a SmartApp, like Smart Lighting, and select the Parent Device when asked for a button device. In your case, you’ll have 3 buttons to choose from.

On the microcontroller, simply jumper a wire between GND and the digital input your selected. Then remove it. If you do this quickly, you’ll get a “pushed” event. If you leave it attached for a second or longer, then remove it, you’ll get a “held” event.

Ogiewon, i click on automate app, light & switch, smart light , it ask which light you want to control. I select but ace not there.

I then try button control smartapp and see ace but dont see three butron or any where to see the child button whenever ask to select button

You have to select your lights AND select what trigger to use to turn them on or off. Instead of a specific time, or sunrise/sunset, select BUTTON PRESSED/HELD, then select the ST_Anything Parent Device, and you can pick the button number and type you want.

Let me try again, i try but i don’t have anything to turn on.

i guess i don’t understand the concept. I am trying to do like let say i am back routine. i want to turn on the light. I thought this will allow smartthing app to see pin (ex: d1, d2…) as a light then it can turn on. I try example ST_Anything_Multiples_ESP8266WiFi and trying to see if smarthing can see D1 as switch but it just ask for how many button but no where i can find d1 switch. Can you help me setup basic turn on light on smartthing app.

OK, that helps to explain what you’re trying to do.

If you’re not seeing any CHILD DEVICES added to the Parent Device, it sounds like you may have a configuration issue. Please follow the detailed setup instructions in the ReadMe, specifically regarding the configuration of your home WiFi settings in the Arduino sketch. Also, use the Arduino IDE Serial Monitor data to configure the Parent Device’s settings.

In the ST IDE, use the Live Logging feature to see exactly what is showing up from the ESP8266, through the hub, to the ST Cloud.

The child devices will only be created once all of the connections are properly configured. Once the child devices populate, you will be able to select them from other SmartApps. This includes at least one “Switch” device which you can control (on/off) just like any other switch/light.

thanks for all of your help… my suddenlink internet went out 3 days ago and has been intermittent since… still mostly down… but it was up for 2 solid hours and the babies were sleeping in so long story short i deleted everything and started over and its all working now… thanks again for everyones help…now just got to figure out how to modify a sketch to make a controller for my networking cabinet

1 Like

Hi Dan,

Thanks for your awesome ST_Anything repo! I’ve been able to integrate my old NAPCO security system using Arduino Mega and W5100. Can’t thank you enough for your work!

Only issue I have is with integration of multiple sensors with one wire. Have you done any coding work or plan on releasing an update for i2c incorporation. My old NAPCO security system has multiple key pads that contain up to four sensors hardwired with one data cable returning to security panel. I would like to include these contact sensors/motion sensors in the setup. I’ve planned on disconnecting the keypad sensor inputs and attaching them to an i2c board, which would then return one wire (SCL/SDA) to the Arduino. I’m lost at the coding portion for integration in the ST Anything setup.

Thanks again for your amazing contribution to ST integration. Cheers!

For the Generic Sensor I was able to get the default value of 15. But having difficulty getting my TEST value to become the “someValue”. Tried a few things but cant get “TEST” onto the .cpp with out declaration problems

This is publishing 15 to ST…
In Sketch:
int TEST = 99;
static st::PS_Generic sensor6(F(“generic1”), 30, 0, TEST);

.h file modification:
PS_Generic(const __FlashStringHelper *name, unsigned int interval, int offset, int TEST);

cpp file modification:
PS_Generic::PS_Generic(const __FlashStringHelper *name, unsigned int interval, int offset, int TEST):
uint16_t someValue;
someValue = 15;

String m_nSensorValue = String(someValue, DEC);

Wouldn’t you make someValue = TEST instead of 15?

Tried that and get… ‘TEST’ was not declared in this scope when compiling
And if I declare TEST in the cpp file then it no longer linked to the sketch value

Not sure if TEST is anything special so I tried it like this:

sketch:
int testValue = 99; (or just pass 99 in the line below and don’t declare it)
static st::PS_Generic sensor1(F(“generic1”), 120, 0, testValue);

.h file modification:
int testValue; (in the private section where m_nSensorValue is…this is probably why you are getting a error)
PS_Generic(const __FlashStringHelper *name, unsigned int interval, int offset, int testValue);

.cpp modification:
PS_Generic::PS_Generic(const __FlashStringHelper *name, unsigned int interval, int offset, int testValue):

uint16_t someValue;
someValue = testValue;

Or get rid of the someValue stuff completely since you are passing it in. Would also stay with naming conventions and declare your point as m_nTestValue or whatever its going to be called.

I did that int TEST; in the .h file private section and it compiles now. But the value published to ST is “0” not 99. So its overriding my sketch declaration. Also have TEST = TEST++; in the loop to se if it runs with the sketch.

I’m just using TEST=99 to play around with it and see if I can get it to work. The plan would be to put a value calculated in the sketch loop or from a i2c sensor.

Ah, think you have to have a set value in there to assign the passed value in. Try these:

https://github.com/vseven/SmartThings_VSeven/tree/master/kampto

Was just wondering if you made any progress with the OTA updates? I started to try and pull the code from the Arduino IDE example but quickly realized that it’s a lot harder than it looks.

I second the OTA updates as I have a couple devices that are very hard/inconvenient to get physical access. I tried looking at @erocm1231 OTA for his ESP devices, but failed…

I loaded those library files and didn’t change anything in them. Some progress, the initial value of 99 makes it to ST. But it stays at 99 and does not follow changes from the sketch. Kinda off need like a reverse callback function or something to update the TEST value into ST.

In sketch:
uint16_t TEST = 99;
static st::PS_Generic sensor6(F(“generic1”), 30, 0, TEST);

In Loop:
TEST = TEST++;

Dan,
first thanks for all your work on this.
Second I feel like I’m either missing something fundamental or just having a terminology misunderstanding so hopefully you can point me in the right direction.

I have a prebuilt ESP8266-12E with a single relay on GPIO-4 as described here: https://ucexperiment.wordpress.com/2016/12/18/yunshan-esp8266-250v-15a-acdc-network-wifi-relay-module/

I’ve had no issue making it work with the examples there but for the life of me can’t make it work with your system.

I simply want to use it as a switch but when I implement a switch in the sketch no child devices appear. If I use the relay example a child appears but I can’t figure out how to trigger it.

So like I said I feel like I’m missing something obvious but I don’t know what it is. Any help would be appreciated. Thanks

Nothing in your sketch will be re-evaluated like that. Anything you need to do would need to be in the library files, not the sketch.