Connect wired alarm system sensors to SmartThings with a NodeMCU ESP8266 [deprecated]

I am starting to wonder if there is an issue with the device itself. I have tried every known firmware downloader for the 8266 with still no luck. But what I noticed recently now is at one point I actually got the lua files on the feather, but it would just go into a reboot cycle and never stop. After research this problem it seems to be either a cable or power issue. So I tried 4 different USB cables but I still have the same issue, even after wiping the firmware again with multiple cables. The last flash I did the feather went back into the issue of not allowing the lua files to upload.

I hate to say it but I may just bit the bullet and buy a different board, they are pretty cheap.I do need at least 7-8 zones though. Is there any single board that can handle this many? I would prefer one that already has the pins soldered on the board.

I was looking at this one. https://www.amazon.com/HiLetgo-Version-NodeMCU-Internet-Development/dp/B010O1G1ES/ref=sr_1_1?ie=UTF8&qid=1490708437&sr=8-1&keywords=8266

Yes, that NodeMCU v1.0 ESP8266 board has the exact same ESP8266-12e cpu as your Adafruit Feather board. It is the one almost everyone uses without any issue.

Also, to verify whether or not your Feather is bad, why not try loading a simple sketch on it using the Arduino IDE?

The ESP chip on on my feather is actually a ESP8266-12S, not sure if that makes a difference.

The ESP8266-12e actually has a few more pins broken out on its board vs the -12s. You still get 9 GPIO Digital pins and 1 analog input pin.

So would the board I linked above be enough for at least 7 zones?

On a side note I seem to be able to replicate this error causing the reboot in Esplorer.

Yes, you can handle at least 9 zones with the board you linked above. The only thing you really give up is the battery charging circuit, which I always thought was a great addition by Adafruit. Too bad their board isnā€™t the most compatible.

The HiLetGo version board sold by Amazon is high quality and is the one I used when developing this application. I donā€™t think youā€™ll have issues with it. The nice thing about this one is that itā€™s very tiny and fits great on a standard 400-point breadboard. With Amazon Prime you can get it delivered in one day (at least in my area - San Francisco).

Iā€™m a little skeptical that youā€™ll be able to use 9 pins on it though. The pinout diagram does technically show 13 GIPO pins, but I know that many of them serve dual duty with other functions of the board (for example pin D4 also controls the onboard LED), and in my experience Iā€™ve found that many of the pins donā€™t work well for input, and/or cause the board to not boot correctly when the pins are constantly energized.

I think the easiest/safest thing to do is to buy two of them. Thereā€™s no reason you canā€™t have two boards running the same code and both posting to SmartThings. With a slightly larger breadboard you can simply pop two on there together. At less than $10 each, itā€™s not a big investment if you have that many sensors to hook up.

Yeah I am going to place an order for the HiLetGo board. Even if I got the feather to work I donā€™t trust it because of all the issues I have had. If I need two boards its not a big deal, I would rather have two that work without issues then 1 that is problematic.

Edit: Is there certain pins that you would recommend not using with the HiLetGo board?

I also mentioned this in the README somewhere but pins D3, D9 and D10 didnā€™t work well for me. Pin D4 is shared with the blue onboard LED, so if you want to use that you canā€™t use it as an input pin (the next release of my program will support blinking the LED on success).

@heythisisnate

I am finally doing it! Got stuck on the Rest Client. Getting an error. Not sure what I am doing wrong. I verified oath is enabled for smart app and its published.

Thanks

UPDATE: Got it to work! Just redid step 5. Continuing the processā€¦

You might want to make that ā€œoptionalā€ (via comment) since it takes away a pin. I know Iā€™d rather have an additional sensor than an LED that I would only use to troubleshoot a problem.

@heythisisnate

I need some help flashing, so I have your .bin firmware on my desktop in a folder and cd(ed) on terminal into the folder.

I installed the USB to UART driver along with pip and esptool.py. How do I obtain the port name? Do I need to enable flash mode, if so how do I do it?

When I type:
ls /dev/tty.*
I get:
/dev/tty.Bluetooth-Incoming-Port/
dev/tty.lpss-serial2
/dev/tty.lpss-serial1

I am using a 2016 MacBook Pro so I am using a dongle (USB-C to USB 3.0)

Thanks

I think the LoLin version NodeMCU uses a different USB-UART controller, so you might need different drivers. I think it uses a CH340G USB controller which you can download for mac from here. You can verify this by looking at the component thatā€™s connected to the USB port, itā€™ll probably have CH340 engraved on it (you may need a magnifying glass). Once the driver is installed and itā€™s plugged in you should see something like /dev/cu.wchusbserial.

The HiLetgo version uses the silicon labs driver which shows up as /dev/cu.SLAB_USBtoUART on my mac.

Just installed the drivers, now my Mac is dying whenever I plug it in. It says CH340G.

Looks like the last driver install did something as it was working fine before that. Anyway I can delete it and try something else??

UPDATE: Will try this patch. http://kig.re/2014/12/31/how-to-use-arduino-nano-mini-pro-with-CH340G-on-mac-osx-yosemite.html

UPDATE: The patch worked, I see a /dev/tty.wchusbserial1450 so I will enter that into terminal and try it now.

1 Like

Phew! I was worried there for a sec. I did not have this problem but my Mac is a year or so older and running El Capitan.

Yea, my new Mac was crashing upon boot up. Got me worried! So looks like I got the firmware updated. Gonna proceed to the next step.

esptool.py v1.3
Connectingā€¦
Auto-detected Flash size: 32m
Running Cesanta flasher stubā€¦
Flash params set to 0x0240
Wrote 454656 bytes at 0x0 in 39.5 seconds (92.2 kbit/s)ā€¦
Leavingā€¦

@heythisisnate
Is this what I delete to disable the internal pullup?

Thanks

Yup. Thatā€™s it.

The download link for ESPlorer is broken. Any other links? The ones I found arenā€™t launching. Thanks

UPDATE: found v0.2.0 on some random site to load. Hopefully I wonā€™t have a problem with it.

Okay, so I am using ESPloter V0.2.0-rc2. I selected my device /dev/cu.wchusbserial1450 and opened the connection and selected RTS. The screen stated this:

So I opened and saved all the files to ESP and then hit the reset button but it was just doing this ā€¦

I connected and disconnected again and it went back to the first screen. Donā€™t know if the files are actually on the unit. And I tried to connect the GRND pin to 6 but the status on SmartThingā€™s is still open.

**UPDATE: I disabled RTS and got it to work (almost). So it tells me when the pin is 1 and 0 when I move them around on the board but the SmartThingā€™s app isnā€™t updating. It was telling me a few errors for the application when I hit save to ESP but I just hit ok and moved on. How do I fix it? **