[DEPRECATED] ST_Anything - Arduino/ESP8266/ESP32

Well, I did make many changes to the ST_Anything Groovy code to support the New ST App…and another very talented community member helped improve it even further. So for now, ST_Anything does work well with the New ST App.

As for supporting ST_Anything after the demise of Groovy on ST… we’ll have to wait and see what options are provided for hub-connected devices.

I am not worried about that, as I would probably simply move over to Home Assistant, and convert my ST_Anything devices to ESPHome, or something similar. I have been playing around with running Hass on a RPi, and I must say the HA platform has come a long way over the past few years. It is still a bit complicated to create complex automations, but it is coming along. It is nice to have options! :sunglasses:

1 Like

Hi @ogiewon ,

I have a device with about 20 child devices, and have noticed that it basically hangs for a while fairly frequently. I tracked it down to the delays in the sendstrings() function. With a large number of child devices it sits there for quite a while. Just wondering if you’ve run into this before. I’m considering rewriting that bit to sort of queue them up and refresh devices on multiple passes of everything::run, but don’t want to waste my time if you’ve already done something before.

BTW, I wrote an RF library for 433MHz devices (used above), and an EX_blinds & EX_fan device type (which uses the RF library). Are you interested in adding the code to your library?

regards,
Marcus

This would be a welcomed enhancement, as long as it doesn’t break the overall architecture. This has long been on the back-burner of things to improve. The periodic (default 5 min) refresh will cause quite a delay for systems with large numbers of devices defined. Let me know what you’re thinking. I appreciate your willingness to help improve this!

Sure, I am always willing to review pull requests, and accept them if they follow the overall architecture of the ST_Anything platform. I usually draw the line at unique, one-off solutions that really aren’t generic enough for re-use. I also require that new devices be mapped into standard ST capabilities…especially now with the changes to the mobile app, which make custom capabilities much more challenging. :wink:

Hi @ogiewon ,

I think I found a clean solution to the refresh problem. Modify the refreshdevices() like:

    void Everything::refreshDevices()
    {
            /*
            for(unsigned int i=0; i<m_nExecutorCount; ++i)
            {
                    m_Executors[i]->refresh();
                    sendStrings();
            }

            for (unsigned int i = 0; i<m_nSensorCount; ++i)
            {
                    m_Sensors[i]->refresh();
                    sendStrings();
            }
            */
            if(refresh_Executor < m_nExecutorCount) {
                    m_Executors[refresh_Executor]->refresh();
                    sendStrings();
                    refresh_Executor++;
                    refLastMillis = millis() - long(Constants::DEV_REFRESH_INTERVAL) * 1000 + 4*SmartThing->getTransmitInterval();
            } else if(refresh_Sensor < m_nSensorCount) {
                    m_Sensors[refresh_Sensor]->refresh();
                    sendStrings();
                    refresh_Sensor++;
                    refLastMillis = millis() - long(Constants::DEV_REFRESH_INTERVAL) * 1000 + 4*SmartThing->getTransmitInterval();
            } else {
                    refLastMillis = millis();
                    refresh_Executor = 0;
                    refresh_Sensor = 0;
            }
    }

and comment out the refLastMillis in the ::run() routine.

regards,
Marcus

Thanks @ogiewon Dan — I think I will move my ST Anything over to Hubdino so that my ST install can be free from custom DTH amd Groovy altogether. This is the future of ST like it or not. So I do need to settle on a DIY platform of choice. I’m leaning toward Universal Devices ISY which is seriously under appreciated in the smart home hobby world. It’s wicked fast and robust and all local. Protocols and their RESt api are a bit funky but so is Groovy. It should be possible (easy even) to adapt your code to become an ISY node server. I will put this on my projects “todo list”

1 Like

Hi!

Hopefully this is a silly question with a quick answer… I got a custom capability setup for my ORP sensor, added a presentation, got a new handler (along w/ the tricky VIN) going and things are working!

I love it that the temperate child device shows the current temperature, andalso has the little graph thingy where I can see the history and trends. But I can’t seem to figure how to get this to show up.

How do I get this graph drill down option to show up for my new ORP device?

In looking at the presentation for the temperature capability, it shows a slider! (which I see nowhere in sight). The child temperate handler gives me no clues, and I can’t find anything about it in the docs.

Simple answer?? :slight_smile:

Cheers

@Marcus_van_Ierssel - Nicely done! I just found some time to test your improvement and it looks really elegant. I did have to add in the declarations for the two counter variables…

	void Everything::refreshDevices()
	{
		static int refresh_Executor = 0;
		static int refresh_Sensor = 0;

I am going to update my GitHub repo with your change. Thank you very much!

Stuck here.
Using ESP32,

  • Modified and complied Arduino code, loaded onto ESP32 (ST_Anything_Multiples_ESP32WiFi.ino)
  • Added device handlers from Daniel’s Git repo
  • Added new device under MyDevices
  • On the phone, edited device’s MAC, IP, Port

The device control menu looks like this on the phone:

I was expecting to see all of the different sensor values, though they are not true values since nothing is connected to the ESP32 (values = 0 or 255, etc…)

The Devices screen also shows “refresh” next to the newly created device…

Please go back through the ReadMe with a fine toothed comb to see if you missed any steps. You can also read back through the last few weeks of posts to see where others have discovered their individual issues with the initial setup. The ST IDE Live Logs is one of your best troubleshooting tools.

Dan,

Thank you for your help. I missed the “Check the PUBLISH check box” so all the handlers were not published.

1 Like

Thanks @ogiewon , glad I could contribute. Sorry about forgetting to include the declarations.

I need to take a look at my blinds code. I’m not sure how much you’d call it custom – I have a data structure in the header file, basically a big table with all the RF data for many devices. I suppose it could get passed in through the EX instantiation instead. It does use the standard windowShade capabilities.

regards,
Marcus

1 Like

Anything has any answers or maybe thoughts of a trail to follow down?

Unfortunately, I really don’t know too much about developing DTHs for the New App, and I am happy to keep it that way. :wink::stuck_out_tongue_winking_eye::sunglasses: Groovy’s days are numbered, and thus I really don’t see the value in learning something that will be obsolete, on a platform that is not my current primary home automation system. Hopefully another community member will lend a hand.

The setup instructions say to copy “ALL of the other library folders” to the Arduino libraries folder. But I see that it includes OLDER versions of libraries I’ve already got. Example, “Adafruit_BUSIO” version 1.0.4 is included, but that library is already up to 1.7.2. WifiNINA is another example.

So, what’s the ruling? If you’ve already got the library, don’t copy it? Or is there a dependency on an older version? This at least seems like something worth a mention in the setup instructions.

I have included most all of the required libraries that the ST_Anything devices depend on. usually one can safely upgrade those dependent libraries and test for themselves if everything is alright. I have not, nor do I plan to, tested all of the latest and greatest dependent libraries. I just don’t have time to try to keep up with all of the library changes.

So, I would suggest that you keep your newer versions of libraries, and only revert if necessary.

I am always happy to accept pull requests to update the documentation. In the past 6 years, I think that maybe only one user has ever taken me up on that offer… :wink:

By the way, for anyone researching on how to fix this issue, I simply went to the SmartThingsESP8266WiFi.cpp file and commented out, “Serial.println(ArduinoOTA.getHostname());”

This worked for me! Good luck!

Has anyone used a VL53L0X Time-of-Flight (ToF) Laser Ranging Sensor in ST_Anything?

Is st anything still working in the new app? I have followed all the steps and read various problems but I can’t get children devices to show in the new Smartthings APP.

I only got a device handler with a refresh button but no chirdren devices are created. I have static IPs in my nodemcu and st router V3 and I can ping both.

Any help?

Yes, ST_Anything is working with the new ST App. You may have missed a step in the ReadMe. Please go back through all of the steps to make sure everything is correct. Without sharing a lot more information, it is difficult to say what the issue might be.

Could this help to find my mistake?




Thank you for your time.