[DEPRECATED] ST_Anything - Arduino/ESP8266/ESP32

It sounds like you may have deleted a child device???

Try going into your Parent Device’s Settings (gear icon in the ST Mobile App) and then hitting SAVE.

This is a known ST platform bug when deleting children.

If that doesn’t work, delete the Parent Device via the mobile app, and then manually create it again via the Web IDE.

Yeah, I deleted one because it duplicated. I’ll give that a try. Thanks again!

Ok I’ve been banging my head on the wall all week trying to figure this out on my own, but I give up.

I’m trying to flash an ESP32 but I’m getting hung up on STA disconnected no AP found on the monitor.

I switched from static to DHCP and finally got connected. but once I connected to ST and rebooted, it wouldn’t connect again.

I thought it was my router because it’s older and my other devices would randomly disconnect. So I bought a new one and still no go.

Libraries and boards are up to date, and I’ve tried 3 different boards. I have a feeling I’m missing something obvious.

Any help would be GREATLY appreciated!

Start with the Arduino IDE built-in ESP32 example sketches to make sure your ESP32 can connect and stay connected to your home WiFi.

Hmmm, mine won’t stay connected after unplugging the usb cable, or after rebooting. Only when initially booting with the usb cable connected.

Ok, I’ll try that when I get home. But three different ESP32 boards? Would that indicate something is wrong with my libraries or the boards I’m using?

The Arduino IDE support for the ESP32 isn’t very mature, IMHO. I am not saying that is the cause of the problems you’re seeing, but it has caused issues in the past. It is hard to try to keep up with the ESP32 changes as I do not use one regularly.

You did grab the latest update (last night) from my Github repo that fixed a ESP32 WiFi lockup issue, right?

How are you powering the ESP32 when it is not connected to your computer? Some of these little boards with onboard WiFi need a decent power supply to run stably.

Yes, updated all my libraries as well… I honestly feel like I’m the problem though reading how everyone else is getting hung up in other places and I’m stuck just trying to connect to my SSID.

Ok, I’m an idiot. I knew the problem was me. So I was flashing to the wrong board type. I didn’t notice there are two versions of the ESP32 Dev kit. Everything works now.

2 Likes

I was using a 9v ac adapter. I plugged it into a battery that has a higher amperage output and now it works!

1 Like

All,

I have revised every Parent and Child Device Handler in my GitHub repository. These changes are primarily to re-architect the communications between the Parent and Child devices, making it simpler to add new Child Devices in the future. It also helps to standardize the Child devices by replacing the custom ‘generateEvent()’ call with a traditional ‘parse()’ routine.

@vseven Allan - A special heads-up to you, as your contributions earlier have been tweaked by these changes. I do not believe I broke anything, however I wanted to caution you against jumping in and upgrading everything without doing some testing. I have no way of testing your RGB/RGBW child devices. If you take some time to do some testing, I’d love to hear your feedback.

I’ll double-check it this weekend but I doubt it should affect anything. The RGB DTH followed the same framework as all the other DTHs in regards to the generateEvent…it should just work.

1 Like

Wanted to share what I’ve been doing and some advice. The esp32 boards wifi connection is unreliable at medium to far distances. So I picked up a few esp32 wifi/Lora boards. So the stations are sending packets thru RF only which should be good up to 1km+. I put these boards to sleep for a few minutes inbetween transmits to save battery/Solar. The stations aren’t using ST anything but just sending sensor data to a RF receiver board which also has wifi and close to the access point router. Its been very reliable. The receiver board picks up the RF packets and also parses the data to ST_Anything and ST via wifi. The problem, if considered so, is that I have several devices but the data is transmitted thru a single receiver board and MAC address. So all my stations show up under the same device name. So I need to incriment the object names so the stations dont overlap. Any way to make these stations show up as a stand alone devices but being sent from the same receiver board MAC id?

Here’s example of how I parse the received data. Each sender is sending a “Sender ID” so I know how to assign the ST object name.

//// Put value with ST Object name and send, ST objects Temperature1,2 & Voltage1,2 are reserved for the reciever board
  if (millis() - STsendTimer > 240000) {
    if (SensorReadings.SenderID == 1){  // Water Tank
    String strTemp1("voltage3 " + (String)SensorReadings.bat_volt); st::Everything::sendSmartString(strTemp1); // voltage3 BBQ BatVolt
    String strTemp2("voltage4 " + (String)SensorReadings.sol_volt); st::Everything::sendSmartString(strTemp2); // 
    String strTemp3("temperature3 " + (String)SensorReadings.temp1); st::Everything::sendSmartString(strTemp3); 
    String strTemp4("temperature4 " + (String)SensorReadings.temp2); st::Everything::sendSmartString(strTemp4); 
    String strTemp5("ultrasonic1 " + (String)SensorReadings.Ultrasonic1); st::Everything::sendSmartString(strTemp5); 
    }
    else if (SensorReadings.SenderID == 2){  // Shooting Bench
    String strTemp1("voltage5 " + (String)SensorReadings.bat_volt); st::Everything::sendSmartString(strTemp1); //  
    String strTemp2("voltage6 " + (String)SensorReadings.sol_volt); st::Everything::sendSmartString(strTemp2); // 
    String strTemp3("temperature5 " + (String)SensorReadings.temp1); st::Everything::sendSmartString(strTemp3); 
    String strTemp4("temperature6 " + (String)SensorReadings.temp2); st::Everything::sendSmartString(strTemp4); 
    }
  STsendTimer = millis();
  }

Here’s the sender / receiver boards im using:
https://www.amazon.com/MakerFocus-Development-Bluetooth-0-96inch-Display/dp/B076MSLFC9/ref=sr_ph_1?ie=UTF8&qid=1528423959&sr=sr-1&keywords=esp32+lora&dpID=51fGEZgtG2L&preST=

Only one Parent Device can exist per MAC address (device network id). That parent can have lots a child devices. Each child device can be renamed as you see fit, to have them sort together logically in the Things View if desired.

Dan,
Once the children are created we can rename them? I was unaware of that.

Sure. At least on iOS you can. Just go into the child device’s settings via the gear icon, and edit the name.

Ryan,
Can you share your solution? I have a need to turn off a relay when temperature is met instead of using ST over cloud.

Both your temp sensor and the relay are ST_Anything devices? Which capability are you using for each? This is the code that I added to the ST_Anything sketch to get the relay to turn on when the contact is open and off when the contact is closed.
void callback(const String &msg)

void callback(const String &msg){
if (msg == "contact1 open") {st::receiveSmartString("switch1 on");}
if (msg == "contact1 closed") {st::receiveSmartString("switch1 off");}}

If you want to sniff out the messages you need to use, add these lines below the void callback:

Serial.print(F("ST_Anything Callback: Sniffed data = "));
Serial.println(msg);
1 Like

Do any of the 2.9.1 changes affect our existing sketches or do those have to get updated as well? Don’t want to update and then have everything not work all of a sudden. :slight_smile: