Skip to main content

Small package to open, close, stop Velux shutters, includes a CLI. Requires wiring of a Velux remote control.

Project description

What is this?

A very small and simple Python package meant to close, open, and stop a Velux shutter using a remote control wired to a few GPIOs.
For assembly details, see this section.

This GitHub repo: https://github.com/Theo-Dancoisne/velux-remote-control
This PyPi package: https://pypi.org/project/theo-velux-remote-control

How to install

pip install theo-velux-remote-control

Usage

This package provides a simple CLI, you can see all the available commands by running:

velux --help

Or use the module:

from theo_velux_remote_control import velux


def IdoThings():
    velux.v_close()

def IdoThings2():
    velux.v_open()

def IdoThings3():
    velux.v_stop()

[!NOTE] If you later want to use the GPIOs in other programs, or encounter strange results, try cleanning up the GPIOs setup with either velux clean or velux.v_clean().

Use other GPIOs pins

By default this package will use pin 2 to open, 3 to stop, and 4 to close.
To change this you can set these environment variables to some appropriate BMC codes:

GPIO_PIN_VOPEN=2
GPIO_PIN_VSTOP=3
GPIO_PIN_VCLOSE=4

Build from source

This package is managed with Poetry.

poetry install              # Installs dependencies
poetry build                # Builds the source and wheels archives
pip install --user /path_of_project/velux-remote-control/dist/package_name.whl
# ↳ Installs the package for the current user, don't forget to replace the project path and the name of the Wheel archive

Or if you simply want to test this package you can do this:

poetry install              # Installs dependencies
poetry run velux --help     # Runs a velux command in the Poetry virtual environment

Assembly instructions

Once you removed all but the circuit board from the remote controller (glued plastic foil with the 3 buttons included):
  • Connect the - to a ground pin
  • Connect the + to a 3.3V pin
  • Connect the inner contact of the close button (between + and -) to the GPIO 4
  • Connect the inner contact of the stop button (below close) to the GPIO 3
  • Connect the inner contact of the open button (below stop) to the GPIO 2

Image visible on the GitHub repo Image visible on the GitHub repo

[!CAUTION] If your connection touches both the inner and outer contact of a button, it will trigger it until they are disconnected.

[!TIP] Instead of wiring the + and - you can use the batteries, don't forget the battery connector if you do so.

Q&A

Can I use this package with multiple remote controls?

Althoug this package wasn't designed to use multiple remote controls, as it only uses 3 environment variables to define the pins, we can consider some solutions sucha as:

  • Do you know that a remote controls can operate several shutters at the same time?1
  • Connect all the remote controls to the same pins for simultaneous activation.
  • Create a Docker container for each remote control, each container runs the package with the appropriate environment variables, the GPIOs must be exposed.
  • Create your own program, this package is very simple, you can take inspiration to make your own.

  1. Quote from a Velux shutter documention:

    Registration of a solar product in more than one remote control
    One or more of the remote controls can be used for simultaneous operation.
    The example shows three solar products, A, B and C, where all three products are to be registered in the remote control from product C. ln this way, remote control C can operate solar products A and B as well.
    The next two steps must be completed within 10 minutes:

    1. Press RESET button at the back of remote controls A and B for at least 10 seconds with a pointed object.
    2. Press RESET button on the back of remote control C for 1 second.
      The solar products A, B and C can now be operated via remote control C.
      Note: The solar products A and B can still be operated with their respective remote controls.
      Cancelling of registration of a solar product
      To remove the registration of a solar product in the remote control, press button P on the product (3) for 10 seconds (or until the product starts running).
      Note: The cancellation applies to all remote controls in which the product has been registered.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

theo_velux_remote_control-1.0.3.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

theo_velux_remote_control-1.0.3-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file theo_velux_remote_control-1.0.3.tar.gz.

File metadata

File hashes

Hashes for theo_velux_remote_control-1.0.3.tar.gz
Algorithm Hash digest
SHA256 73df97b7cf7ef9b14213730c14e538b77af68979d79c893288d5fc339211f2d9
MD5 870d628103c0a04d086cf91dc06d02ab
BLAKE2b-256 99b3505b136e350c5e75ae252cc2d2387c320606e604c912414b207ce3abd6f6

See more details on using hashes here.

Provenance

The following attestation bundles were made for theo_velux_remote_control-1.0.3.tar.gz:

Publisher: publish.yml on Theo-Dancoisne/velux-remote-control

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file theo_velux_remote_control-1.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for theo_velux_remote_control-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 aad298bf98c44feeb077c1b3f9fe87b38382d96a06d90f58b32e31ba410bbb41
MD5 ee79d58148fa2c04538270c5504891e0
BLAKE2b-256 dd6646b90ca2ab9de9bf2436c4a8a7393fa12ede5fe11a0573b59d638bcd7760

See more details on using hashes here.

Provenance

The following attestation bundles were made for theo_velux_remote_control-1.0.3-py3-none-any.whl:

Publisher: publish.yml on Theo-Dancoisne/velux-remote-control

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page