Control Solight sockets
Project description
Python Solight DY01 library for Raspberry Pi
This library allows you to control Solight DY01 sockets from Raspberry Pi.
How to use it
Connect a cheap 433 MHz transmitter to any GPIO pin (e.g. 17)
sudo apt-get install pigpio
sudo pip3 install solight-dy01
sudo pigpiod
import time
import pigpio
from dy01 import DY01
pi = pigpio.pi()
dy01 = DY01(pi, 17)
address = 1007 # Default address of socket A
while True:
dy01.send(address, 1)
time.sleep(1)
dy01.send(address, 0)
time.sleep(1)
After running this script, you should see the socket turning on and off every second.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
solight-dy01-1.0.0.tar.gz
(2.9 kB
view details)
Built Distribution
File details
Details for the file solight-dy01-1.0.0.tar.gz
.
File metadata
- Download URL: solight-dy01-1.0.0.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.5.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
09a00060f465dacd1b54fc3fbc1659946332d852f578e73188d9d24c96e16028
|
|
MD5 |
d87cd0142948ec060ee599cebcbc4db7
|
|
BLAKE2b-256 |
fdc2004b4aa7c24869d67377f0ff7fb448f4a66be148ed35cfc11b46188ba8b3
|
File details
Details for the file solight_dy01-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: solight_dy01-1.0.0-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.5.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
8f76561046481ef5c68bafe9d9464bffbbe4576ab4609137141aac7daf8379e3
|
|
MD5 |
4e70f34c9c2c4c9899ce07b528bd0b98
|
|
BLAKE2b-256 |
766f0939579bf5c46e310980a6a7a5784564aad888bdd0dc815f540668ff70e8
|