[OBSOLETE] Absolute Simplest ESP8266 Smart Blinds, no mqtt, rest, bridge, or broker, just your board and your hub

This is my fourth and final code to control window blinds in SmartThings with a NodeMCU ESP8266 chip and a servo.

Why my fourth try?
Because all of my other attempts involved setting up a RaspberryPi, configuring Home Assistant, an MQTT broker, SmartThings MQTT Bridge, configuring paths, etc, etc…

All I wanted was for it to JUST WORK!
But at the end of every attempt I still had the same issues: Stability and Delays.

So here we are with my fourth attempt: Absolute Simplest ESP8266 Smart Blinds. Using just a micro web server on the ESP8266 and a simple HTTP GET command in SmartThings, response time is almost instantaneous and there’s no middle point of failure or complication.

  • Intended for a standard servo (not a continuous rotation servo) and amount of tilt degrees are commented in sketch code for adjustment
  • 1 custom device to add to SmartThings and 1 arduino sketch to flash
  • Just set your Wifi SSID and Password, choose a static IP and go
  • Tested with Amazon Echo, Alexa responds to both “Turn the Blinds On/Off” as well as “Open/Close the Blinds”
  • I have found servo shaft couplers are the absolute easiest way to connect your servo in-place of the blinds tilt gearbox, thus hiding your servo, board, and wires all in the blinds upper housing.

And while I know there is more elaborate solutions and implementations with SmartThings-MQTT Bridges and such, I was trying to keep this as simplistic, cheap, minimal points of failure, and zero-maintenance as possible.

Gallery: Imgur: The magic of the Internet
Code: GitHub - hobbzey/Simplest-SmartThings-ESP8266-Blinds: Extremely Simple ESP6288 NodeMCU SmartThings Blinds
Servo Shaft Couplers: https://www.servocity.com/html/servo_to_shaft_couplers.html

Click for makeshift Step-by-Step Programming Guide

Blind Install Pictures: coming-soon

Note: This was based off of a fork of user @Casper 's smartfan code which was based on user @JZst Generic HTTP Devices and pieces of the Arduino sketch were cherry-picked from various sources, all of which are cited and credited in the README.md on github.

Lastly: While I am using the NodeMCU board, this should work on just about any ESP8266 based board…

34 Likes

Nicely done!

This is actually my first code contribution so thank you, your comment means a lot!

1 Like

Very cool. Check out this video as it relates. It shows how to hack the servo internals and it delves into MQTT. Very interesting where these ESP8266/NodeMCU projects keep advancing into.

Uuuumm wow that video is hacky lol
All the effort that guy goes through to trash a servo into a dumb motor and build the mount and rig and such… =\

This implementation is intended for the servo to be hidden in the blinds upper housing and coupled directly onto the metal rotation shaft inside there. Here’s a video that better explains. It’s a very clean (my wife approved!) install with nothing showing outside the blinds.

Wow…nice job! I’ve been putting off working with my blinds…until now.
Thanks for figure out a great way to do it!

Clean indeed! I just liked his video because of the hacking :slight_smile: and MQTT, etc. Can’t deny that it looks terrible when comparing final product to the video you posted.

Totally just realized you’re the same @JZst that made the Generic HTTP Device Handler code I used! Thank you so much for that, your code completely took away all the headache I kept having with interfacing to local devices over Wifi!

Nice work, I actually have 1 myself too, but I like how you wired the power directly from USB cable to the servo.

But the thing is, all blinds in my house are plantation shutters :sob: and I don’t know how to attach the servo to them… :cry:

1 Like

We have @pstuart and @scottinpollock to thank for their phenomenal efforts with HTTP devices on LAN. I just packaged it up for Raspberry Pi and called it “generic” for good measure :slight_smile: I’m glad to see it wasn’t a wasted effort. Here are the original threads where they figured out how to do it: 1, 2, 3

My only issues are: I have curtains :slight_smile: and wife rarely approves anything :slight_smile:

Same here… I’ve consider building something to open and close the shutter similar to shuttereaze @ shuttereaze.com . I think we can get an ESP8266 to do it all. I tried it with a Photon already but didn’t complete the project. I am waiting to restart the project with the ESP. I have the motor coming from china, the pololu driver board, the worm drive are already here.

I got tired of waiting for shuttereaze

1 Like

I’m well aware of shuttereaze, awesome concept but I honestly don’t want to spend that much money, would be awesome if you could build a housing for our ESP8266 Servo.

I already have the servo and nodemcu setup with ST, just lacking a way to attach to the shutter.

Please let me know how it goes.

Hi Bobbs,
First of all, I really want to thank you for this, it’s exactly what I was looking for. I want to run some of my projects directly to the ST cloud without to use an ST shield. I already uploaded your sketch and created the device in the app. But I don’t understand how to join both of them, sorry if it sounds stupid but I am a beginner with groovy. Could you please explain me how do you get or post data from the webserver from the App is a bit confusing for me.
Thanks for your Help!!

Update: is it necessary to do port forwarding to reach de server from the St cloud?

The code uses a HUBACTION so no need to expose your device to WAN/cloud — just to answer your question.

What you need is the LOCAL IP of your NodeMCU — you can either get that from your router (view attached devices/clients) or by monitoring the serial port in the Arduino IDE which also spits out the notion that the device is connected to your wifi and gives you the IP — if you don’t see that, change the serial port speed.

That local IP is all you have to paste into the ST device configuration and obviously your servo needs to be connected to the same pin as the Arduino code calls for.

Good luck!

Hey @C_Hobbs this is really good work.

I developed something that is essentially the same thing. One thing that i noticed is that you only have open and close. I adapted the code to also map a dimmer slider (0-99) to servo (0-180). This allows control through full range of the servo. I specifically use this for partial closes. Also I have set a lux sensor and close the blinds incrementally from 4 hours before sunset to 45 minutes before sunset. This limits the light and heat coming in during peak sunlight on my windows. The blinds follow the sun with this, but still allow the view out the back of the house except for the last phase of the incremental close.

I hope this is good info. Oh and there is a 3d print servo mount over on my github that lets it sit perfect in the tray. Let me know of any questions. Again great work, I really love the price of these. I had thought about grabbing a few nodemcu devices, but I didn’t have any windows left.

1 Like

Very nice job!

jjhtpc I owe you some credit for inspiration! I actually looked over your github back when I was gathering ideas for implementing this, and it was your Particle Spark code sketch with its simple 50 lines or so of eloquent code that made me think “Hey I should try this with one of those cheap NodeMCU’s!”

Hi Justin,

How much would it cost to assemble a package including complete material list, code, installation instructions and shipping to Canada?

2 Likes

I was looking at your code and I think you have inspired me to clean mine up and put some documentation to it. I forget that not everyone can read code. I think you have also inspired me to do two things. I think I am going to setup the local cloud for my Particle devices and then I am going to purchase a few nodemcu devices. I really like the idea of this all being local calls instead of bouncing around the world just to open and close my blinds. That being said even the could Particle devices have been rock solid.

Thanks for the inspiration, and I am glad I could provide some to you.