First of all a big thank you to those I borrowed code from: @bruhautomation and the pubsub client from nick oleary
I had started to use my current setup that included particle photons, but there has been a lot of instability on the IDE and in the firmware for those devices lately and it was causing me more headache than it was worth. so I sunk $45 in six new esp8266 and solved all my problems.
Create your device in your configuration.yaml (an example is on github)
Load the code to the esp8266 using arduino ide
Wire up your esp with the servo. (I set the com pin to D4 in the code)
Put on your DIY hat finally and with your wife’s permission dissect and determine a way to hook this up to your window blinds (this often requires a bolt cutter)
Here is a video of the blinds in action:
things to note…
you will have to remove the manual pull string. I know, but don’t worry you won’t use it anymore… you will use the google home or amazon echo to open all of your blinds. Besides the whole point of home automation is to automate. Set this thing up with a light sensor and 4 hours before sunset close or partially close those blinds… keep tracking the sun every hour and continue to close them a little more until about 10 minutes before sunset and then open them up and enjoy that beautiful sunset.
also your action rod in the blinds might have to be cut down to fit the servo. use a bolt cutter and cut the end opposite where you will attach the servo.
Here are some pics of the servos attached to the blind action rod. Even with a breadboard the esp sits nicely in the blind tray.
Also I ran a usb cable in the wall that runs down to a receptacle box. That box just has a usb port and then I run a wire from that to an receptacle in wall that has usb power. These wires are hidden by the couch so you essentially see no wires. Keep the WAF high!! (just don’t cut the holes in the wall right after your wife had the couches cleaned)
Not a problem. Let me know any feedback. I always follow KISS. I keep my code as simple and clean as possible, but if you have any recommendations feel free to post here or to pull from the branch on github.
@jjhtpc I’m trying out an esp8266 with a servo for blind control and I can see the esp8266 connecting to my wifi access point. It is failing to connect to my mqtt server, which is mosquitto running on my HASS system. I have mosquitto configured to use TLS on port 8883 and updated the port in the sketch file I uploaded to the esp8266. Does your code work with mqtt/TLS?
Here’s the error I’m getting:
Attempting MQTT connection…failed, rc=-4 try again in 5 seconds
Thanks for any help, I’m a newbie with the esp8266. This is a really cool solution if I can get mine working.
Switched back to port 1883 since it’s on my internal network and it works like magic. I now have a working light in HASS that controls the server through the esp8266. Love this stuff. Now for actually mounting it in some blinds
Works like a champ using port 1883. Thanks so much for posting your project and code, it was really helpful in getting this working. I’ve never done anything Arduino before, I bought a NodeMCU ESP8266 for the blinds. Now I’m looking for other things I can use them with.
I submitted a pull request that got put into 44.2 so now the MQTT Cover can have tilt operation. I’ve got a pull-cord switch that allows someone local control of the tilt of the blinds. I’m still waiting on some pulleys from China so I can test the up/down.
It appears so. Yes this is a cut-over to home assistant from smartthings and using particle photons:
I have had some form of window blinds operating for over two years. I love the idea of the pull cord, but after I started using these I ended up setting up a fibaro light sensor and I use that to adjust the blinds(I rarely have to do anything to them). I read your write up and my windows face the west as well. We have a large bay of six windows and really laziness drove me to automate the windows. I was tired of pulling the cords.
If you are interested in using lux value I segment phases by hour before sunset and use the lux value to set the blinds to different positions based on the how many hours before sunset.
You could change your blinds to be covers now if you wanted. Your scripts would look a little more sane
I’m planning on integrating a luminance sensor eventually but I wanted to get the up/down stuff sorted first.
I was planning on using a temp sensor inside the room and the set point of the thermostat to determine if the blinds should close or open depending on if I’m trying to keep it cool inside vs warming. I’m still working on the python code to intercept the readings from my thermostat (Carrier Infinity Touch) and haven’t gotten that integrated into Home Assistant yet.
Hello I got my blinds working a few days ago and works great,
I’m using them with Alexa,
Is there a way to say open and close with Alexa, Instead of turn on and turn off
No that is a backend API problem for Amazon. Interestingly enough I think close will work, but open will not. I use on, off or dim to x%. Open and close used to work until about 1 year ago.
@quadmasta Thanks, I already have had haaska setup, I can as a few days ago say open or close blinds and they work, not sure if it was the Alexa update or HS 0.49.0 update.
@quadmasta Did you ever get your blinds to raise up? I have Vertical Blinds they open and close traveling across the window all the way open or all the way close, works great,
But I would like to have them open 50% or adjustable,
They travel across (more rotations with the servo) instead of tilting
@quadmasta I am using MQTT to a esp8266 nodemcu to open and close the blinds, and its working good, I have tried 3 times to get a cover platform to work but, it fails, and crashes HA every time. so I just stopped trying. I know I must have something in the config wrong just haven’t taken the time to find it.