Skip to main content

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


Download files

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

Files for solight-dy01, version 1.0.0
Filename, size File type Python version Upload date Hashes
Filename, size solight_dy01-1.0.0-py3-none-any.whl (3.5 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size solight-dy01-1.0.0.tar.gz (2.9 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page