Ok this is complete. The code is in an early version but is fully functional for the blinds.
Things you will need:
A Particle Photon
A servo (preferably analog) I use futaba S3003 https://www.servocity.com/s3003-servo
A servo shaft coupler with set pin https://www.servocity.com/25t-futaba-set-screw-shaft-coupler
Standard horizontal slat window blinds (plantation style will work too)
Wire up your Particle Photon with the servo(in the sketch I use pin A4)
Load your Particle with the .ino, .cpp and .h from the github code (adjusting ip address of your MQTT server and all of your topics) https://github.com/jjhtpc/ParticleMQTTblinds
You will need to configure a device using MQTT in configuration.yaml (I will provide an example below)
After you restart your HASS service you should be able to test that everything is working
Put on your DIY hat finally and with your wife’s/significant other’s permission dissect and determine a way to hook this up to your window blinds
**Things of note… You have to use a borker other than the embedded broker. I could not get the protocol on particle to work with the embedded broker.
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.
OH and there is a 3d printed servo mount I created so that the servo sits nicely in the 2" blind tray.
name: "Window Bottom Left"
** this will show up as a light, but functionally it should work great. You will need to adjust all of your topics to match your need
I do want to put a request out to change the light for MQTT, currently HASS sets the level and then also sends an ON command.
So a subscribe to level and command looks like this.
This caused me to code around this and set a trap so that after level is set I set a flag “itsatrap” to 1 then conditionally my ON statement requires that itsatrap = 0. If HASS would just send the level I would not have to have some ugly extra code. Let me know any thoughts on this. I know I am not using the device the way it is intended(as a light), but I have another use for Particle Photons that I will be cutting over shortly that controls RGB lights and this will impact that code as well.