SmartThings Community

[RELEASE] ST_Anything v2.9.2 - Arduino/ESP8266/ESP32 to ST via ThingShield, Ethernet, or WiFi

arduino
alarm
dth_misc
esp8266
esp32

(Fraser Wallace) #2207

Good news, I have managed to compile the a smartphones multiples sketch on my laptop. Looks like I will be working on that from now on. Thanks again for all your work and patience. Of course, you may hear from again.


(HousePanel Author) #2208

Hey Dan… I am getting back to making some custom things using your code. I am starting over and I can’t get the button devices to be created. I am using a W5100 board and a very simple variant of your script that defines only 8 simple buttons. The install goes fine but it doesn’t make the child devices and it keeps saying I haven’t set up the parent completely, but I did. What am I missing? Do I have to define at least one non-button item?


(HousePanel Author) #2209

Never mind… I think I figured it out. Buttons don’t make virtual devices - they are attributes of the parent device. I saw it register activity in the log when I grounded the pin so it is working. I added two contact devices just for giggles and they were created just fine. I think I am now all set. You might want to clarify how buttons work in the documentation - unless I missed it.


(HousePanel Author) #2210

Anyone know why an ESP8266 might give errors trying to upload a sketch? I get the same error even if I try to upload a simple “blink” sketch. It just says mem upload error. I have AnyThing working great on a W5100 board but both of my ESP8266 boards give this error. They are older versions so I’m thinking they may have outdated firmware. They say “ESP8266 MOD” on the chip.


(Dan) #2211

Yep, it’s in there… :wink:

Button Devices - "where do they show up?" Buttons show up in the SmartApps that use them. The Aeon Minimote Device Handler, for example, has one tile with a remote control icon on it. Nothing else. It also has zero configuration options as well. I used this as a model for adding "Button" capabilities to ST_Anything per a user request. When you define the number of buttons (via the gear-based configuration menu in the parent DH) you are announcing to all SmartApps the number of buttons defined. This in turn allows SmartApps like "Smart Lighting", "CoRE", and "WebCoRE" to know how many "buttons" to offer you to configure an action. So, the easiest test is to create a new "Smart Lighting" automation, where you define the action to be based on a button "pushed" or "held" event from the Parent Device (no child devices are created for buttons). Give it a try! I have used this successfully in the past for testing purposes.


(Dan) #2212

You have changed the Board Manager to the NodeMCU ESP8266 entry, correct? And, the Arduino IDE is properly finding the COM port created by the ESP8266?


(HousePanel Author) #2213

Yup… I have the board set properly and the board is identified on the serial port. I have no clue why it isn’t working. I am thinking my ESP boards have a non-Arduino firmware on them… I vaguely recall reading something about Lua firmware somewhere…


(HousePanel Author) #2214

I should have known… you are such a pro!!! Thanks man.


#2215

Doesn’t matter, what you are writing to them will overwrite whatever is on the board. What board do you have? What version of the ESP library did you load in the Arduino IDE?


(HousePanel Author) #2216

Thanks Ryan… I have an Amica NodeMcu ESP8266 bought a year ago.
Libarary is 2.3
Here is the error message:


(Dan) #2217

Have you tried to manually place the ESP8266 into flash mode?

There should be a RESET and FLASH button on the module.

  1. Press and hold the Reset button.
  2. Press and hold the Flash button.
  3. Release the Reset button.
  4. Release the Flash button.

I have had to do this every now and then to get a board to behave. I release the Flash button in step four when I know the Arduino IDE is just done compiling the sketch and is about to try to download the image to the board.


(HousePanel Author) #2218

This did the trick! Many thanks. Both boards are now behaving properly. Thanks again - I was going crazy with this.


(L B) #2219

Dan
I am seeing something weird on the board I set up to read 5 contracts. It is a mega with a Ethernet shield. I sporadically get on/off reports from a single pin. It can be 5-10 times in a minute. Could it be a bad board?


(Richard Gross) #2220

Dan,

I was able to hack the voltage .h and .cpp files to return watts from the CT. I would be happy to share code and then work on how to make this a supported sensor.

BTW, I wish my coding skills were better than they are.


(Dan) #2221

Sounds good. Please send me a Private Message with the code and I’ll take a look. I appreciate your contributions to ST_Anything!


(Dan) #2222

Which PIN are you using? Some of the pins are reserved. Also, what device is wired up to the pin? How is it wired?

If you remove the current device from that pin, and move it to another pin (and modify the code accordingly), does the problem move to the new pin? If yes, what happens if you simply use a short piece of wire between the pin and GND? This will help determine if the device is at fault, or board.


(L B) #2223

I am using pins 5,6,7,8,9. I am monitoring relays and I am on the dry contact side. The problem is they don’t keep doing it. Only two pins have done it and it’s sporadic. All connections are tight…
A shorting wire and operating the contacts operates normally.


(Dan) #2224

What is controlling the relays?

How old are the relays? What brand?


(L B) #2225

The relays are feed by the 120 output of the input/ output of the generator and utility feed. There is also a micro switch on the side of the transfer switch to indicate position.
All relays are new and not sure of manufacturer…


(Richard Gross) #2226

Dan,

How do I send a private message?