[RELEASE] ST_Anything - Arduino/ESP8266/ESP32

For about a month I have seen all of my ST_Anything devices start to be very slow to respond to automations, or to miss them altogether. I have been watching on-device logs. I sent messages to println just inside of messageCallout() to check for whether the slow/missing messages were being received but not processed by my ST_Anything arduinos.

   void messageCallout(String message) {
      Serial.print("Received Message (");
      Serial.print(message.length());
      Serial.println("): "+message);
     ...

What I’ve seen is that in the case of missing/slow messages, the Arduino is not even seeing the messages from the ST automations.

This change in responsiveness happened while I was out of town, so no hardware/software changes on my end to cause this.

My debug process has included:

  • replacing arduino
  • replacing ethernet card
  • unplugging/plugging arduino, ethernet switch, SThub, router, ethernet cables
  • complaining to my wife

Two questions:

  • Am I the only one? Is there something in the ST world causing this?
  • Is there another debug action I could take that I haven’t thought of?

–Paul

The only time I have recalled seeing behavior like this was when my v2 ST Hub needed a reboot. No clue why that resolved slow/missed communications, but it did. But, you’ve already tried that.

Without detailed understanding of your home network and WiFi infrastructure, it is hard to know even where to start troubleshooting. Also, it sounds like you’re into the guts of the code… any other changes you’ve made? :wink: Have you made any significant changes within your ST_Anything sketches? Anything with looping or delay() statements? How about the quality of your power supply for the microcontroller?

I posted some issues I had with the documentation here: Question/Assistance with setting up a switch · Issue #245 · DanielOgorchock/ST_Anything · GitHub

Though it seems like some people have already noticed some of the stuff I pointed out.

That said, I’m trying to use ESP8266 modules to control RGBW strips.

I went through the documentation on how to set everything up, but I cannot seem to control it. I’m looking at the documentation and wondering if I need 2 ESP8266 modules. One to act as a sorta “hub” and then the other to control the device? I don’t entirely know and that process isn’t exactly clear. I’ve never worked with any “DYI” type ST automation, though I do have some programming experience and know how to use Arduinos and load code.

Does anyone know what I would need to do to add on RGBW controllers, and if I in fact need 2 ESP modules? (Is there a way to set it up so that I could easily add on other ESP modules to control blinds and other things?)

Thanks for any help!

You only need 1 microcontroller and a ST hub. No other hardware is required.

Sure, it is possible. Many users have used the built-in Servo motor support to control the open/closed angle of traditional blinds. Really, your imagination is the only limiting factor in what you build.

It is important to realize that ST_Anything is not a turn-key solution. It is a platform for users to build upon as they see fit. Knowledge of Arduino C/C++ programming, basic electronics wiring, and an understanding of the ST Architecture are all required to implement successful solutions. ST_Anything does drastically simplify the process, however it is still up to the user to decide what and how they use it.

Sometimes I get the same- a hard reboot of my WiFi network always helps :roll_eyes:.

not sure this has been covered before so apologise in advance if it was. I have one of those smart aroma diffused which communicates (ESP01 mounted on board) with serial to 9600 8n1 with IC on the motherboard with one of those weird 7 bytes command. Is there an ST anything sensor / executor which could listen for serial and send serial strings (example turning on lights 55 aa 02 03 01 05 00)

Unfortunately, there is nothing like that in ST_Anything. You could build your own using an EX_Switch as an example. Just change the normal GPIO calls for your serial communication calls.

Nothing like this on ST_Anything (yet at least), but I just took the generic ST_Everything code and built a basic sensor out of it.

Shouldn’t be too hard. Just define how you are inputting the serial, interpret on the device (if needed), and then do actions based on that to your device.

Well… as usual it was something really dumb. A stray stranded wire made an intermittent connection between GND and one of the digital ins on a shield. The behavior is not directly explainable, but the problem is gone. [for now] Thanks for verifying that there was not some other kind of outage or change. Helped me to narrow the problem down to hardware.

1 Like

Glad to hear it’s working!

I have an application that requires 6 digital inputs and 6 digital outputs. For implementing this on an ESP32 which pins can I use? Does anyone have a link to a drawing that shows this.? How many extra pins would I have left over for future expansion?

No Idea what board you have. But google does.
https://www.google.com/search?q=esp32+pinout&newwindow=1&rlz=1C1GGRV_enUS751US752&source=lnms&tbm=isch&sa=X&ved=2ahUKEwjms4PcuOrvAhWOr54KHRZRCtUQ_AUoAXoECAEQAw&biw=1600&bih=757

1 Like

Thank you kampto.

I recently converted one of my ST_Anything projects from an Arduino MEGA to an ESP32 DevKit C board. Here are some notes I made regarding which pins are usable. YMMV, of course, especially depending on which specific hardware board you’re using.

//Safe Digital Inputs & Outputs
#define PIN_GPIO2     2  //Connected to onboard LED
#define PIN_GPIO4     4 
#define PIN_GPIO16   16  //Only available on WROOM module, not WROVER
#define PIN_GPIO17   17  //Only available on WROOM module, not WROVER
#define PIN_GPIO18   18
#define PIN_GPIO19   19
#define PIN_GPIO21   21
#define PIN_GPIO22   22
#define PIN_GPIO23   23
#define PIN_GPIO25   25
#define PIN_GPIO26   26
#define PIN_GPIO27   27
#define PIN_GPIO32   32
#define PIN_GPIO33   33

//See https://randomnerdtutorials.com/esp32-pinout-reference-gpios/ for other pins

//Digital Input Only (no Digital Output support) - Note: No internal pullup or pulldown resistors
#define PIN_GPIO34   34
#define PIN_GPIO35   35
#define PIN_GPIO36   36
#define PIN_GPIO39   39

Thank you ogiewon

1 Like