[DEPRECATED] ST_Anything - Arduino/ESP8266/ESP32

Hi All, Sorry if this has been asked before but I haven’t been able to find anything with my searching. I am reasonably new to the scene but am working on getting a C-Bus system (Yup I’m from Australia :wink: ) connected in someway to ST. After seeing a post by Dan on another forum, my plan is to do this via a simple serial coms between the C-Bus controller and a Mega2560 with W5100 (So I have a few HW serials to play with). I have my serial coms and protocol happily working, but just looking for some guidance in the best way of tying it into ST_Anything. My hub is on its way from the US but just trying to get a headstart if possible.

Does anyone have an example sketch of ST_Anything running with serial rather than physical IO?

Any help would be much appreciated and a big thanks to all the work from Dan and the Devs on this!

This is the best example I have of building a “bridge” device between ST and a Serial device. It actually does not use the ST_Anything library, just my “SmartThings…” Arduino to ST communications libraries.

Sounds like a fun project. Let me know if you have any questions as you get started.

Awesome thanks, I will have a look into that. May be a little above my capabilities at the moment but I will see how I go. My plan is to at least get ST_Anything working with my hub on some IO and folding some basic serial into that, to make sure I get that working before I delve into rewriting anything major!

Sorry I have since re read your message and completely missed this!

So within my Arduino script I have substituted the default line for the following:

static st::PS_TemperatureHumidity_AM2320 sensor2(F("temphumid1"), 120, 7, PIN_TEMPERATURE_1, st::PS_TemperatureHumidity::DHT22, "temperature1", "humidity1", false);

Where PIN_TEMPERATURE_1 is the data pin from my AM2320, I am getting the error however:

'PS_TemperatureHumidity_AM2320' in namespace 'st' does not name a type
     static st::PS_TemperatureHumidity_AM2320 sensor2(F("temphumid1"), 120, 7, PIN_TEMPERATURE_1, st::PS_TemperatureHumidity::DHT22, "temperature1", "humidity1", false);

Any ideas what I am doing wrong?

Gary,

I have never used the AM2320 sensor, so I have never tested the PS_TemperatureHumidity-AM2320 class. It was added to ST_Anything by another user.

I have looked through the code and I do not believe it would actually work for the AM2320 sensor. The AM2320 uses I2C for communication. I do not see where the AM2320 library included in the Arduino\libraries\PS_TemperatureHumidity-AM2320 library folder actually could work for the AM2320 I2C sensor.

My advice to you, in the short term, is to simply buy a DHT22 sensor. They are inexpensive and work pretty well.

I am sure I could add properly tested support for the AM2320, but I am quite busy and I do not have an AM2320 to test with. I have ordered a couple of them from China via eBay, but that will take some time before they arrive.

I wish I had better news…

I have been running the ESP8266 off of the USB port of my laptop. Today I purchased a dedicated 5V power supply to see if it makes a difference on the operation.

1 Like

Hopefully that helps. My test NodeMCU ESP8266 has now been running fine for 24 hours. I use a powered USB 3.0 hub when developing/testing these boards. Not sure how much of a difference that makes, if any.

Well, it works now…I had to delete the Ring Video Doorbell from ST devices…???

I really appreciate all the help…

1 Like

I ended up deleting devices inside ST…for me, the Ring Video Doorbell must have been causing issues. I deleted it and now I am getting updated temps.

1 Like

Gene,

Glad to hear you’ve got things working better now. I just wanted to provide a data point… I also have a Ring Video Doorbell 2 connected to ST and everything works fine. So, at least there may be hope for yours as well. :slight_smile:

Hi Dan,

Thanks again for your help! I have no issue at all with buying the correct sensor instead, below is a picture of what I have instead, can you confirm this is a DHT22? It referenced it when I bought it but they seem to also be called AM2302?

Thanks!

That looks like a DHT22 to me.

I started from scratch again and now it seems to be working now! Thanks so much for your help! Fantastic support.

1 Like

hi all, i am trying st_anything and on arduno schetch
#define PIN_BUTTON_1 D3 //SmartThings Capabilty Button / Holdable Button (Normally Open!)
#define PIN_BUTTON_2 D4 //SmartThings Capabilty Button / Holdable Button (Normally Open!)

static st::IS_Button sensor4(F(“button1”), PIN_BUTTON_1, 1000, LOW, true, 500);
static st::IS_Button sensor5(F(“button2”), PIN_BUTTON_2, 1000, LOW, true, 500);

st::Everything::addSensor(&sensor4);
st::Everything::addSensor(&sensor5);

but after setup everything, all switch , contacts… show up but button above. I can’t figure out why. are button suppose to show up? i configure as 2 button on little gear on smartthing app

Turns out I had an IP conflict…which is why deleting the Ring Doorbell helped. Thanks again for your help. Its working great now with no IP conflicts!:grin:

I have a new issue now with Dimmer Switch I am using to control my pool pump (sounds weird, I know). I’m using the dimmer to control a variable speed pump (converting from 0-3.3V to 0-10V) In any case, I have everything working except the ST interface. I can control the dimmer with the slider but it wont update the value (%).

Buttons don’t show up as child devices but they are there, under the parent device. If you’re trying to use them in another smartapp they will show up just like any other button. That got me at first too.

1 Like

Hi, So I am hoping to integrate a multicoloured LED and LCD display to my project, the screen will display the humidity and temperature levels and the LED colour is to change colour depending on the temperature.

My question is, where can I place the code to update the screen text and LED colour etc? As in where abouts in the code is the ‘update’ or polling process?

Thank you!

I am currently using a sensor for temperature/humidity and a photo sensor for light, all is working perfectly but after maybe 2 hours of updates I do not receive any more? That is until I reset the chip?

Any ideas of what I could do to fix this or diagnose it at all?

Thanks in advance!

It since looks like I have had one temperature update in 4 hours but no updates in terms of humidity or light level?

Hey All, Quick question, if I set the state of an executor (let say a relay) locally on my Micro, does that set the state in ST or will it change back to the state ST thinks it should be?

Ie, can I change the state of a relay and have it reflect in ST or do I also have to have a button as well and link it up in STs?

Thanks!