Skip to content
This repository has been archived by the owner on Dec 31, 2023. It is now read-only.

WebSocket and MQTT supported device code for ESP8266 blinds controller.

License

Notifications You must be signed in to change notification settings

conphilpott/motor-on-roller-blind-ws

 
 

Repository files navigation

Smart Home Blinds Controller

Roller Blind STL files for 3D printing https://www.thingiverse.com/thing:2392856

Vertical or Venetian Blind (tilt only) STL files for 3D printing https://www.thingiverse.com/thing:3923529

Binary File added flash to ANY ESP8266 BASED DEVICE with DOUT mode selected

  1. A tiny webserver is setup on the esp8266 that will serve one page to the client
  2. Upon powering on the first time WIFI credentials, a hostname and - optional - MQTT server details is to be configured. You can specify if you want clockwise (CW) rotation to close the blind and you can also specify MQTT authentication if required. Connect your computer to a new WIFI hotspot named BlindsConnectAP. Password = 1234
  3. Connect to your normal WIFI with your client and go to the IP address of the device - or if you have an mDNS supported device (e.g. iOS, OSX or have Bonjour installed) you can go to http://{hostname}.local. If you don't know the IP-address of the device check your router for the leases (or check the serial console in the Arduino IDE or check the /raw/esp8266/register MQTT message if you are using an MQTT server)
  4. As the webpage is loaded it will connect through a websocket directly to the device to progress updates and to control the device. If any other client connects the updates will be in sync.
  5. Go to the Settings page to calibrate the motor with the start and end positions of the roller blind. Follow the instructions on the page

MQTT

  • When it connects to WIFI and MQTT it will send a "register" message to topic /raw/esp8266/register with a payload containing chip-id and IP-address
  • A message to /raw/esp8266/[chip-id]/in will steer the blind according to the "payload actions" below
  • Updates from the device will be sent to topic /raw/esp8266/[chip-id]/out

If you don't want to use MQTT

Simply do not enter any string in the MQTT server form field upon WIFI configuration of the device (step 3 above)

Payload options

  • (start) - (calibrate) Sets the current position as top position
  • (max) - (calibrate) Sets the current position as max position. Set start before you define max as max is a relative position to start
  • (0) - (manual mode) Will stop the curtain
  • (-1) - (manual mode) Will open the curtain. Requires (0) to stop the motor
  • (1)- (manual mode) Will close the curtain. Requires (0) to stop the motor
  • 0-100 - (auto mode) A number between 0-100 to set % of opened blind. Requires calibration before use. E.g. 50 will open it to 50% (The firmware actually moves the stepper to one position less than the payload. So when you send the esp8266 a payload of 10, it actually moves the stepper to 9 and the MQTT reflects that decremented value.)

Required libraries (if compiling)

Screenshots

Control

Control

Calibrate

Settings

Communication settings

WIFI Manager

About

WebSocket and MQTT supported device code for ESP8266 blinds controller.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 100.0%