[RELEASE] ST_Anything - Arduino/ESP8266/ESP32

In the ESP8266 example sketch, one of the devices is a DS18B20 temperature sensor. That should get you going. :slight_smile:

Can anyone help me get ST_Anything working with an Arduino Uno with a Tentacle Shield using I2C to talk to sensors?

Thank you!

Haven’t started using ST_Anything yet but a couple of questions for @ogiewon:

I’m slowly moving off SmartThings to another platform and would like to use ST_Anything on it with the existing Arduino code. Is there an API I can target when writing a handler/binding for it on the new platform?

How much effort would it take to have the Arduino return a very basic HTML page listing the status of the configured sensors? I can see this being quite useful as a debugging aid.

What is the “other platform”? You can reuse your Arduino code already on Hubitat :wink:

If it is using I2C sensors, then I would hope it should not matter that you’re using a special shield to hold these sensors.

What are the sensors? Specific model numbers? Do these have readily available Arduino libraries? Decent example sketches?

I support many I2C sensors already. Temperature, Humidity, Pressure, Illuminance…

Adding new sensors is simply a matter of adding a new device class (.h and .cpp) which implements one of the standard SmartThings capabilities and reads data from a specific sensor type using an available Arduino library. Plenty of examples available for I2C devices in the ST_Anything library.

Are you still trying to figure out your parts list?

The hardware you’ll need will depend on how you plan on hooking things up, especially to your home network.

I’m migrating to Openhab, would be nice to have a binding equivalent to the handler you have for ST

I’ve never messed around with OpenHAB. Unfortunately, when I wrote ST_Anything along with my son, we were focused on the ST Zigbee ThingShield. Thus the communications interface is a very simple ascii name value pair (space delimited.)

When i added Ethernet support, I kept the same simplistic interface. It does not comply with any true standards.

Not sure what it would take to add OpenHAB support.

Have you looked at “MySensors”? I think it is supported by OpenHAB… :thinking:

1 Like

I hadn’t come across the MySensors project before, looks perfect.

Thanks for the tip : )

Can anyone help me get ST_Anything working with an Arduino Uno with a Tentacle Shield using I2C to talk to sensors?

If it is using I2C sensors, then I would hope it should not matter that you’re using a special shield to hold these sensors.

What are the sensors? Specific model numbers? Do these have readily available Arduino libraries? Decent example sketches?

I support many I2C sensors already. Temperature, Humidity, Pressure, Illuminance…

Adding new sensors is simply a matter of adding a new device class (.h and .cpp) which implements one of the standard SmartThings capabilities and reads data from a specific sensor type using an available Arduino library. Plenty of examples available for I2C devices in the ST_Anything library.

That’s great.

I’m using the Tentacle Shield by Whitebox Labs to hold Atlas Scientific PH, ORP and temperature sensors.

The shield has 4 slots for these sensors and can communicate using I2C or serial.

Detailed description here:

https://www.whiteboxes.ch/docs/tentacle/t1/#/

This is a sample sketch:

https://raw.githubusercontent.com/whitebox-labs/tentacle-examples/master/arduino/tentacle-setup/tentacle_setup/tentacle_setup.ino

This is the github for the sensors in I2C mode:

This is the github for Whitebox Labs:

BTW, I sent a private email – not sure if you received it.

Thank you,

Joseph

Yes I am still looking. From what I believe to be a good solution I am thinking

Some Sort of Arduino device (with wifi to connect to network, i do have ethernet close currently)
2 Relays (either separate or built into board)
2 Magnet sensors

I am basing this off the garage door device in ST_Anything. I can run wires from magnets back to the board, but also want to know there there is anyway to the ST Multipurpose sensors.

Right now I have the 4 port relay board in place in the interim as basic push buttons, but this is a cool project for me to work on. Just looking for any input as to best equipment to buy as a first step into playing in this arena.

Thank you @ogiewon for awesome work. Got an initial version of a dimmer device up and running today on NodeMCU.

I am unable to add a dimmer device to a scene - when I select my dimmer device on creation of new scene, the app refreshes and goes back to scenes list. This is on Android. Is this a known behavior?

Thanks,
-MB

Good question. Unfortunately, I don’t know how Scenes on ST work. I have never used a ST Scene, and these days I am running Hubitat as my primary hub.

Hopefully another ST + ST_Anything user will be able to assist.

I’m using ST_Anything and things work pretty well, I have some lights running through a relay and everything works most of the time. The problem I have is really with smart things, but I’m not sure where else to ask this. If the power goes out, or if the wifi disconnects at the set time to turn on, the lights never turn on. Is there a way to create some kind of looping check during a set time to turn them on, and again to turn them off? There only appears to be a way to set a specific time on and off, and I can’t imagine going through and creating 288 more on routines to run every 5 minutes being the smart way to achieve the goal. I looked at the IFTTT stuff, and it doesn’t seem to be any smarter.

I guess I was expecting it to be like programming where you could make a loop, for instance, If time is > 0700 and if time is < 1900 then turn on switch A, else turn off switch A, have it loop infinitely and wait 300 seconds between. If anyone knows how to achieve this kind of goal, I’d be really appreciative. I haven’t even been able to find a good way to search what I’m looking for.

Take a look at webCoRE. It is a community created rules engine for SmartThings that should allow you the flexibility you’re looking for.

Curious… :thinking: How often are you losing power and/or WiFi at your home? These are both incredibly rare at my home.

It’s not often, but they control the lighting for my bearded dragons so even one time when I’m at work can be a pretty big problem. I’ll check that out.

I need help on this one. Im a beginner. I had set up my keurig to work with alexa by using an arduino uno a 5v board out of a usb wall plug and a smart light bulb… ive since broken that uno and now i have an esp32 and want to hook it up to smart things to control my keurig. For some reason i cant find a link that with an example i can work from.(they all want to add in complicated things. I need to control 2 buttons and a switch.

Were you using ST_Anything on your UNO? If so, much of the sketch can be reused on the ESP32.

Or, is this your first time using ST_Anything? If so, start with the example sketch ST_Anything_Multiples_ESP32WiFi and get that running just to get used to how ST_Anything works. From there, we can tweak the sketch to remove unnecessary devices and to add exactly what you need.

When you say “control two buttons and a switch”, please provide some more details of what you mean exactly. I don’t know if these are part of the Keurig or something else. A simple wiring diagram would be very helpful to explain what you’re trying to accomplish.

Welcome to the community!

Ok so no on the st_anything. Keurig 110 power>smart light bulb insides>5v board>uno. Uno went to power button and to brew button as well as lid switch. Unforturately the code my have been accidentally altered as well. The switch part is the worst. Currently the way i activate it manunally is by first seperating then touching the 2 lid switch wires together to activate. So its state is always on and needs to be turned off then on to activate

Also where do i get the st_anything info to set up? What libraries do i need?