Announcing the "ST_Anything" Arduino/ThingShield Project

What I got from ST today: “At this time we are no longer making and selling the SmartThings Arduino
Shield. We will continue providing whatever official support we can. At this time we don’t have any plans for an alternative to the Arduino Shield.” :sob:

Anybody know if these two items can be used https://www.arduino.cc/en/Main/ArduinoWirelessShield and coupled with https://www.jameco.com/webapp/wcs/stores/servlet/ProductDisplay?storeId=10001&langId=-1&catalogId=10001&pa=2123581&productId=2123581

It almost looks identical to the ST thingshield. The ST thingshield devicr handler would need tweaks no??

I am not aware of anyone successfully getting the Xbee boards to work with ST as a ThingShield replacement. The biggest issue to overcome is that the Xbee board will need to implement the Zigbee HA protocol. I have not seen a widespread, open-source Zigbee HA protocol stack available for the masses to use.

I am not saying it cannot be done, I just haven’t seen anyone do it and share the results with the community.

Looking for some guidance on how to limit false alarms. When it rains real hard the front door (facing west) gets a tiny bit of moisture in between the sensors and triggers the alarm.
I see the variable for numReqCounts but I’m trying to figure out a good starting point for this number. 1? 5? 500? Any help would be appreciated!

Assuming you’re using an IS_Contact sensor device, the ST_Anything library simply scans the corresponding digital input pin as fast as it can looking for a change. So, the numReqCounts is equivalent to the number of times through the loop that the digital pin has to stay at the new value.

So, I’d probably start with a number like 500 and increase/decrease from there as necessary.

Thanks for the quick reply :slight_smile:

I have the beginnings of an Xbee working as a ThingsShield replacement. check out the video in this other thread. I will be releasing a guide and code over the weekend.

https://community.smartthings.com/t/things-shield-replacement/66201/6?u=cr76

2 Likes

I have been working on a version of the “ThingShield” library (i.e. SmartThings.h and SmartThings.cpp) which uses a standard Arduino Ethernet Shield as a replacement for the obsolete ThingShield. I have this working as a proof of concept. Now it needs to be packaged up and documented properly to be released. I also want to add support for the NodeMCU ESP8266 board’s built-in WiFi.

Hopefully between what I am working on, as well as @CR76’s Xbee solution, the maker community will have plenty of options to choose from.

3 Likes

I think it just makes RasberryPi into a z-wave controller (replaces SmartThings hub).

You all should seriously look at ESP8266/NodeMCU :slight_smile:

wired alarm alarm retrofit

contact sensor

What would be cool, if I ever can find time, would be to make a generic arduino firmware that sent all the ESP8266 pin and analog status to SmartThings. Then have a configurable SmartThings DH that let you configure what each pin on ESP is doing:
ADC0=light sensor
GPIO1=DHT22 temperature/humidity
GPIO2=contact sensor
GPIO3=motion sensor
etc…

The DH selectable options could be numerous for each GPIO…
-ANALOGIN-Gas Sensor
-ANALOGIN-Light Sensor
-IN-DHT-22 Temperature/Humidity
-IN-Contact
-IN-Motion
-IN-Leak
-OUT-LED-Red PWM
-OUT-LED-Green PWM
-OUT-LED-Blue PWM
-OUT-Buzzer
-OUT-Relay

Hi Dan,

does your work with the Ethernet shield and the ESP8266 still use the Samsung Hub? or are we bypassing the hub and going directly to the Cloud?

Thanks

Ben

My plan is to still use the ST Hub. This prevents the need for an OAUTH SmartApp and provides seemless bidirectional communications. Again, my goal is to replicate the ThingShield functionality, passing strings between the systems.

2 Likes

Hi Dan,

with the Ethernet shield, do you envision a hard line connection to a Router/switch that the Hub is connected to?

With the ESP8266 Wifi connection to the Hub or to a Wireless router?

Thanks

Ben

The device just needs to be connected to the same home network as the hub. It doesn’t matter how you connect, cat5 or wifi.

The hub only communicates via a hard wired cat5 connection to your home router. Your router will provide the wifi capability, not the hub.

Hi Dan, please see

Your comments are appreciated

Ben

1 Like

I know this is an old post but I am getting confused reading through all the threads and I am wondering if anyone has a detailed write up on how they successfully used “ST anything” with wired sensors from their alarm panel. If anyone has a step by step that would be awesome.

this was an awesome write up until, smartthings decided not to produce the thingshield anymore. looking for another way.

All - I have some good news! I have successfully added Ethernet support to the ST_Anything/SmartThings libraries. I have it working properly on my desk. Happy to report that Ethernet appears to be quicker than the ThingShield as well. I need to do some more testing and write up some new documentation to explain the changes needed within your Arduino sketches. I hope to have everything uploaded to Github this weekend.

To give you a feel for the changes…

Since, ST is no longer supporting the ThingShield and its Arduino library, my son and I decided it was alright to break backwards compatibility in the name of progress. There is now a class hierarchy which you should be aware of, however it really is pretty simple to use still. The same basic functions are all still there. Just the name of the class for the old ThinShield has changed from “SmartThings” to “SmartThingsThingShield” to make it clear which device you are using. And, I’ve added support for the W5100 Ethernet shield as well as the NodeMCU ESP8266 Wifi board to provide a couple methods of using Ethernet.

SmartThings
----SmartThingsThingShield
----SmartThingsEthernet
--------SmartThingsEthernetW5100
--------SmartThingsESP8266WiFi

The classes in BOLD above are the ones you would use depending on how you’re connecting to SmartThings. Additional classes could easily be added for other methods of connecting to the ST Cloud. Currently, all three methods above send and receive all of their traffic via the ST Hub (v2 hub tested, not sure about v1.)

I know that wired Ethernet or WiFi may not be ideal for every application, but at least these will provide options for users who can no longer purchase ThingShields. There are some other efforts underway within the community to see if Xbee shields could be used to continue using Zigbee. I have chosen to focus on Ethernet and WiFi for now. If there is a need for another method/shield, we can easily add another subclass to the new SmartThings library as shown above.

Each class simply needs to support:

  1. the Callback Function to handle data from ST
  2. the run() command
  3. the send() command
  4. and a new init() command

I hope to have everything ready for a release sometime this weekend, schedule permitting. Please let me know if you have any questions.

12 Likes

To use “ethernet shields w5100” with your program should I also buy “Arduino UNO R3”. And if I have 8 contact sensor , I need add “Mega 2560”.??

To use “NodeMCU esp8266” do I have to buy another module to run your system. I would like to buy the hardware to try your system when it’s ready. Maybe put the amazon links of material necessary. I want to try both wifi and ethernet.

Thank you for your efforts for integrated this.

Good questions…

I bought my W5100 Ethernet Shield a few years ago on eBay. Here is an Amazon link to one that looks identical to mine. You need to be a little cautious and read the reviews on these shields as quality of the cheap clones can be an issue.

Currently, I only have an Arduino MEGA 2560 available for my testing. I strongly recommend getting a MEGA 2560 due to the increased RAM size versus an UNO R3. I have not tested Ethernet with an UNO R3 since my spare UNO R3 was put into service to replace one that was destroyed by lightning.

As for the NodeMCU ESP8266 board, here is the one that I am using currently. It’s the only one I have, so not sure if there are better alternatives or not.

1 Like