Code Monkey home page Code Monkey logo

zaluziogeret's Introduction

Zaluzio Geret

Automated smart blinds retrofit device with WiFi , MQTT and light measurement capability.

Bill of material

Settings

You can redefine some default settings through Settings.h file. It is pretty self-explanatory I think.

Usage

There is WiFi Manager on board so after burning the firmware, device is in AP mode, default password for connecting to AP is: configure. Default account for configuring / controlling the device is admin with password: password

After connecting to WiFi, there is UI configuration interface, you can find device IP address through serial terminal or through in your router, or through scanning the network. Device hostname is ZaluzioGeret-MAC_END.

There are settings for specifiing MIN and MAX angle of rotation, and reverse direction of inner logic.

There are 2 buttons connected, UP and DOWN, each short press control the servo with 5° in respective direction. Short pressing of both buttons resets the servo in middle position. Long press of each button moves the servo to the MIN or MAX position defined. Long pressing of both buttons starts the LightFinder procedure. LightFinder procedure moves the servo to MIN position, and then continually measure light after each move. Then it move to the position in which highest light was measured.

Long pressing of both buttons for 8 seconds resets the WiFi settings, putting the device into AP configuration mode.

Slave device controll

There is option in settings to setup Slave device ID which is automatically generated hostname which you can see in top of home screen. I assume using identical settings of PUB and SUB topic prefixes and also angles.

When slave device ID is set, after pressing button, MQTT command will be sent to slave device and thus linking these together.

If you want to controll multiple devices remotely, not through buttons, you can easily done it in Home automation system, for example automation would have 2 actions, send command to 2 different topics.

MQTT Commands

  MQTTPUBTOPIC/hostname/LWT - Where status of device is sent 
  MQTTSUBTOPIC/hostname/Rotate  - Command for controlling angle of servo number expected
  MQTTSUBTOPIC/hostname/FindLight - Command for start LightFinder procedure. On expected
  MQTTPUBTOPIC/hostname/Light - Here is light measured sent
  MQTTPUBTOPIC/hostname/Angle - Here is current angle of servo sent

API call / rest command

This call will start LightFinder procedure. You have to be authenticated or send basic auth with request.

ip.of.dev.ice/lightcontrol

This call will move servo to desired angle. You have to be authenticated or send basic auth with request.

ip.of.dev.ice/servocontrol?angle=XX

Example Home Assisant configuration

cover:
  - platform: mqtt
    name: "Žalúzie spálňa lavé"
    device_class: "blind"
    availability_topic: "stat/ZaluzioGeret-3252d1/LWT"
    qos: 0
    retain: false
    payload_available: "Online"
    payload_not_available: "Offline"
    optimistic: false
    value_template: '{{ value.x }}'
    tilt_command_topic: 'cmnd/ZaluzioGeret-3252d1/Rotate'
    tilt_status_topic: 'stat/ZaluzioGeret-3252d1/Angle'
    tilt_min: 0
    tilt_max: 180
    tilt_closed_value: 180
    tilt_opened_value: 90
    
  - platform: mqtt
    name: "Žalúzie spálňa pravé"
    device_class: "blind"
    availability_topic: "stat/ZaluzioGeret-5d26b9/LWT"
    qos: 0
    retain: false
    payload_available: "Online"
    payload_not_available: "Offline"
    optimistic: false
    value_template: '{{ value.x }}'
    tilt_command_topic: 'cmnd/ZaluzioGeret-5d26b9/Rotate'
    tilt_status_topic: 'stat/ZaluzioGeret-5d26b9/Angle'
    tilt_min: 0
    tilt_max: 180
    tilt_closed_value: 180
    tilt_opened_value: 90

  - platform: group
    name: "Žalúzie spálňa"
    entities:
      - cover.zaluzie_spalna_lave
      - cover.zaluzie_spalna_prave

Wiring scheme

Wiring scheme

Physical installation

Device is mounted to window frame by self adhesive tape by 3M.

For cable routing I used sticky cable trunking with name MONTERA.

All parts for 3D printing are on thingiverse project page

If You liked my work, You can buy me a coffee :)

Buy Me A Coffee

Or send some crypto

Donate Bitcoin

zaluziogeret's People

Contributors

luc3as avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

zataras corbolais

zaluziogeret's Issues

Some questions

Hello Lukas,

Thank you for sharing this project. It looks very similar to what I want to build in the upcoming weeks. I have a couple of questions.
When do you plan to share 3D models for the case?
How did you solve the problem with opening the window due to the power cable?
Did you consider mounting servo inside the sunblinds mechanism directly?

Thank you. Have a nice day.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.