tvl-depot/fun/idual
Vincent Ambo aa122cbae7 style: format entire depot with nixpkgs-fmt
This CL can be used to compare the style of nixpkgs-fmt against other
formatters (nixpkgs, alejandra).

Change-Id: I87c6abff6bcb546b02ead15ad0405f81e01b6d9e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/4397
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
Reviewed-by: lukegb <lukegb@tvl.fyi>
Reviewed-by: wpcarro <wpcarro@gmail.com>
Reviewed-by: Profpatsch <mail@profpatsch.de>
Reviewed-by: kanepyork <rikingcoding@gmail.com>
Reviewed-by: tazjin <tazjin@tvl.su>
Reviewed-by: cynthia <cynthia@tvl.fyi>
Reviewed-by: edef <edef@edef.eu>
Reviewed-by: eta <tvl@eta.st>
Reviewed-by: grfn <grfn@gws.fyi>
2022-01-31 16:11:53 +00:00
..
idual chore(fun/idual): Switch wakeup light to random colours 2020-06-10 00:12:54 +00:00
default.nix style: format entire depot with nixpkgs-fmt 2022-01-31 16:11:53 +00:00
idualctl feat(fun/idual): Introduce real CLI that can send all commands 2020-04-26 15:50:21 +01:00
README.md docs(fun/idual): Document how to capture codes 2020-04-25 21:43:08 +01:00
setup.py feat(fun/idual): Introduce real CLI that can send all commands 2020-04-26 15:50:21 +01:00

iDual light control

This folder contains some tooling for controlling iDual LED lights (which use infrared controls) using a "Broadlink RM Pro" infrared controller.

The supported colour codes of the iDual remote are stored in codes.txt.

The point of this is to make it possible for me to automate my lights in the morning, so that I can actually get out of bed.

Capturing codes

Capturing codes is relatively easy, assuming that the broadlink device is set up:

import broadlink
import base64

devices = broadlink.discover(timeout=5)
devices[0].auth()

For each code, the procedure is as follows:

devices[0].find_rf_packet()
# wait until this returns True

devices[0].check_data()
# this will return the code