Announcing the "ST_Anything" Arduino/ThingShield Project

Pro Tip: When posting code in the forums, please use the “Preformatted Text” feature in the menu bar (paste your text, highlight it, then click the “’< / >’” button in the menu bar.) This makes your code readable and prevents the forum software from stripping out certain characters.

One thing that stands out is you are missing the custom “Attribute” statements in the Device Handler necessary for your “motion0, 1, 2, 3” tiles. You also listed “motion1” twice in the “details()” section.

To get these 4 motion detectors to be exposed independently, you will need a “Multiplexer” SmartApp and 4 virtual motion detector devices. You need to make sure you pay VERY CLOSE ATTENTION to using the exact same names (case sEnSiTiVe) throughout the Arduino sketch, Device Handler, and Multiplexer SmartApp. The virtual motion detectors will be generic.

I have been working on an example where I create multiples of each device type in one Arduino Sketch, along with the corresponding Device Handler, Multiplexer SmartApp, and associated virtual devices. Hopefully I’ll have some free time to finish this example up as I believe it would help users.

1 Like

Dan, your response of the smartapp not having to ‘see’ things in the Things view was the answer.
I had not tried using the smartapp because I made this mistaken assumption. A quick test of the smartapp pointing to the temp and switch on the same device worked…just the way it is supposed to…
The DH and .ino are pretty much vanilla your code with the exception of adding the DS18B20 reference instead of the DHT.
This is going to be controlling the valve that feeds water to my solar panels and heats my pool in case anyone is wondering what i’m doing…
Thanks to all those that indulged me on this one…

That’s a great use case for a custom “thermostat” style device! Glad it is working for you!

Dan,
Finally, I’m ready to try to get this pulse counting implemented since I have now the ESP8266 and your ST_anything_ESP and thus dont need the Thingshield and Arduino Mega. Does the .ino and .groovy need to be modified for ST_ESP and arduino - non-thing-shield.

Edit : I was referring to this post:

thanks,

Chin

Chin,

I just looked through my PS_PulseCounter class that I wrote back in 2015. This class is specific to the Arduino 2560 due to the need to implement Hardware Interrupts to properly count the pulses accurately.

Therefore, I really doubt it will work on the ESP8266 platform in its current configuration. When I have some time, I’ll see whether or not this code can be ported to run on the ESP8266 platform.

I still support the Arduino Mega with either the ThingShield (Zigbee) or an ESP-01 (Wifi) for network connectivity. However, I have not yet ported the old PulseCounter sketch and Device Handler example files to work with the newer Ethernet connectivity.

Dan

I would gladly donate an ESP07 module to the cause.

I already added support for using an ESP-01 module as a “WiFi shield” for the Arduino Mega. Check out my ST_Anything_WiFiESP.ino example sketch.

If you want to use any ESP8266 module as a standalone controller, try the ST_Anything_ESP8266WiFi.ino example sketch. I have run a stripped down version of this sketch on a ESP-01. I had to strip it down due to only having 2 GPIO pins.

Let me know if this meets your requirements.

For those of you who are only following this old thread, I am working on some new enhancements to the ST_Anything project. Still a work in process, but feel free to check it out if you’re so inclined…

1 Like

Hi all,

with all of the work that Dans has done … WOW …
does any one want to part with a couple of the original Smar Thing Arduino Shields?

I built a custom motherboard to hold the ThingShield, and now the MB’s and my project is useless.

I will pay top dollar, $60.00 each plus shipping for at least 2 units

Any assistance is appreciated

Ben

1 Like

Hey @BenB2016,
I may actually have two shields. I definitely have one never used spare Shield, and may have one that I used (very little) for prototyping/testing new device types. I will check tonight and send you a private message.

BTW: Giving up my precious Shields would not have been possible without all of Dan’s great work!

1 Like

Hi Garnet

Thank you

Ben

Ogiewon,
grateful for your work I am from Colombia and I have smartthings in my house and I am a DIY enthusiast, I have saved some Xbee WIFI S6B, I would like to know if these can be connected to smartthings

I have never used an Xbee module, but others have. Search the forums and you’ll find some examples, although they are pretty scarce. The old ST ThingShield (Zigbee) and Ethernet based connectivity are much more popular. These are the connectivity options I support in ST_Anything.

Dude… you rock!!! I just now noticed the whole cancellation deal with ThingShield and then read all the angry posts about it. Your solution is not only faster and more elegant, it is cheaper and more standard. If the ST folks were really on the ball they would have thought of this themselves. Anyway, thank you. You have made so many important contributions to the community. I ordered a few W150’s and a few ESP8266’s to try it out and I can’t wait. Now I just have to think of a fun project… maybe controlling my hot tub…

1 Like

@kewashi

Ken - Be sure to try using the latest and greatest code which eliminates the need for virtual devices altogether. My latest software uses the new Composite Device Handler (Parent/Child) to permit one device to have multiples of a single ST capability (like having 8 contact sensors on one arduino.) I haven’t updated the Github ReadMe yet, but I am working on it…

All, I have just released v2.5 of ST_Anything with support for the new Parent / Child Device Handlers. Check it out at

1 Like

I had a similar issue and wonder if it’s the 5V output of the Arduino going to the 3.3V ESP-01. I bought a 5.5V-3.3V voltage regulator to try, but changed my project to use the Arduino Ethernet Shield. Only one regulator would be needed as the 3.3V output of the ESP to the Arduino would be fine. I did find a couple post that indicated that the ESP should be 5V tolerant for some of the input ports, but not sure if this is completely correct.
Anyway, something to consider as the 5V input my eventually mess up the ESP. If you try it before me, please let us know your results.
Update: I do have a separate 3.3V supply input voltage for my ESP-01.

@anon69466676

I agree with @Garnet. I too have seen some unstable behavior from the Arduino + ESP-01 combination.

Can you please share a wiring diagram of exactly how you have connected the ESP-01 to the Arduino? Are you trying to power the ESP-01 directly from the Arduino’s 3.3v pin? Or do you have a dedicated 3.3V power supply for the ESP-01?

Since I already have the system running and it has been running great under the old board does anyone know if you can set this up to openand close a damper and turn off and on a fan on a fresh air duct that I am going to through into my HVAC system. I would like to be able to open and close at a percentage based on voltage.

I have the same problem. After about a week it freezes but the networking is still responsive. I originally had the ESP-01 then tried it with the w5100 shield and same issue on both the new and old st_anything code versions. Sucks cause I really love this setup. In order to get it working I have to power cycle the board and then it repeats