# Is there code that acts as the smart things hub?

**URL:** <https://community.smartthings.com/t/is-there-code-that-acts-as-the-smart-things-hub/128077>\
**Category:** SmartApps & Automations\
**Tags:** hubv2\
**Created:** [June 7, 2018, 6:19pm UTC](https://community.smartthings.com/t/is-there-code-that-acts-as-the-smart-things-hub/128077 "2018-06-07T18:19:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![John\_Mancini](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/john_mancini/32/80888_2.png) [@John\_Mancini](https://community.smartthings.com/u/John_Mancini)\
**Post date:** [June 7, 2018, 6:19pm UTC](https://community.smartthings.com/t/is-there-code-that-acts-as-the-smart-things-hub/128077/1 "2018-06-07T18:19:03Z")

</div>

Is there source code that I can access that can act as the hub for a smart app? For instance, when data is sent from the smart app to the hub, this hub library would have some sort of getData method that would allow me to retrieve said data? This is not the only access method I would need. I am looking for a library that fully or at least partially represents the hub a smart app is connected to. This would be greatly appreciated!

---

<div class="post-metadata">

**Author:** ![ogiewon](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/ogiewon/32/13743_2.png) [@ogiewon](https://community.smartthings.com/u/ogiewon)\
**Post date:** [June 7, 2018, 6:49pm UTC](https://community.smartthings.com/t/is-there-code-that-acts-as-the-smart-things-hub/128077/2 "2018-06-07T18:49:23Z")

</div>

The SmartThings Hub is a closed source product. So, there is no way to emulate one yourself.

This doesn’t mean that there are no options though. What exactly are you trying to accomplish? I have a project (ST\_Anything) that allows bi-directional communications between the ST Hub on your LAN and an Arduino/ESP8266/ESP32 type of micocontroller.

You can also directly communicate from the ST to other computers on your network that support RESTful API’s.

It really depends on what your needs are.

---

<div class="post-metadata">

**Author:** ![John\_Mancini](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/john_mancini/32/80888_2.png) [@John\_Mancini](https://community.smartthings.com/u/John_Mancini)\
**Post date:** [June 7, 2018, 6:54pm UTC](https://community.smartthings.com/t/is-there-code-that-acts-as-the-smart-things-hub/128077/3 "2018-06-07T18:54:20Z")

</div>

Thank you for replying. My end goal is to be able to use some zigbee compatible device that can act as a middle man of the IOT device and the smart thing hub, to filter out data transmitted between them. I want the IOT device to think my device is the hub, and the hub to think my device is the IOT device. I hope that makes sense.  
In regards to your project, what does the Arduino function as? What sort of information can it receive from the ST Hub?

---

<div class="post-metadata">

**Author:** ![ogiewon](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/ogiewon/32/13743_2.png) [@ogiewon](https://community.smartthings.com/u/ogiewon)\
**Post date:** [June 7, 2018, 7:15pm UTC](https://community.smartthings.com/t/is-there-code-that-acts-as-the-smart-things-hub/128077/4 "2018-06-07T19:15:50Z")

</div>

> [@John\_Mancini](#):
>
> I want the IOT device to think my device is the hub, and the hub to think my device is the IOT device. I hope that makes sense.

So, if I understand you correctly, you basically have a Zigbee device currently connected to the ST Hub. You want to add a custom device between the ST Hub and the Zigbee device. Is that correct? May I ask why you need to filter the communications between this the device and ST hub? I can think of a few ways to accomplish this, but they all involve inserting another home automation ‘hub’ between the ST Hub and the Zigbee device. For example, you could insert a Hubitat Hub, which has very good Zigbee support, and allows you to write your own drivers (very similar to SmartThings, but is 100% local processing.) There are apps you can load on ST and Hubitat that then allow data to be transferred between them.

> [@John\_Mancini](#):
>
> In regards to your project, what does the Arduino function as? What sort of information can it receive from the ST Hub?

ST\_Anything allows you to create your own devices. For example, I have pre-wiring in my home for an alarm system. Instead of buying Zigbee/Z-Wave door and window sensors, I simply hooked up the existing wiring to an Arduino. This in turns results in SmartThings devices being created. I also use it to control a relay for each garage door, allowing me to open/close the doors when away from home (have you even forgotten to close your garage door, or had to turn around to prove to yourself that you did?). I also have a motion detector attached, as well as temperature and humidity sensors. The library is pretty extensive and implements many of the ST Device Capabilities.

Take a look at

> [@\[DEPRECATED\] ST\_Anything - Arduino/ESP8266/ESP32](https://community.smartthings.com/t/release-st-anything-v2-9-1-arduino-esp8266-esp32-to-st-via-thingshield-ethernet-or-wifi/77707):
>
> UPDATE 2022-08-17 - Per [this recent SmartThings announcement, the Groovy IDE will disabled on September 30, 2022](https://support.smartthings.com/hc/en-us/articles/7055691183380?mc_cid=75421954c8&mc_eid=574074d8e5). My best guess is that any existing ST\_Anything devices will probably cease to operate at this time, or shortly thereafter. It has been a good 7+ year run for ST\_Anything users. I want to thank you all for making ST\_Anything a successful project! My son and I really had a lot of fun creating it together, and have enjoyed hearing how you have all used it in so many creative ways. As many of you probably already know, I have moved on from ST and have [ported ST\_Anything over to Hubitat as “HubDuino”](https://community.hubitat.com/t/release-hubduino-v1-1-9-hubitat-to-arduino-esp8266-esp32-thingshield-integration-st-anything/399?u=ogiewon). If you have devices running ST\_Anything that you ‘can’t live without,’ at least you know you have options. Another option for ESP8266/ESP32 users would be to use ESPHome along …

You can also simply use the communications libraries to completely roll-your-own Arduino sketch, if desired. Let me know if you have any additional questions.
