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?[^vhack]
  • 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.

[^vhack]: 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.2.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.2-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for theo_velux_remote_control-1.0.2.tar.gz
Algorithm Hash digest
SHA256 ff3c9810ca6fa7d8930526ccfa601d0d52682ff5feed11b0fa886bd72cfcbc8e
MD5 5cb1f100eac9798b03596fa8d53a18a6
BLAKE2b-256 ed93a23899e0ebe4cc52913b5dd3ec134ae4bd6f62f2c3bd9b78f05a3e82cdcc

See more details on using hashes here.

Provenance

The following attestation bundles were made for theo_velux_remote_control-1.0.2.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.2-py3-none-any.whl.

File metadata

File hashes

Hashes for theo_velux_remote_control-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6d70064228e659315ec71592d6859dc032b08dd589e2fc5622e23559fa57e853
MD5 15a45944800b966d7a476eac5a8b0e87
BLAKE2b-256 fd5bf7219b38423c69ab0ba4fbbdd7f10d0c66ce4fc6626066af37f966380b42

See more details on using hashes here.

Provenance

The following attestation bundles were made for theo_velux_remote_control-1.0.2-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