Skip to content

Code to mess around with my smartthings connected lights utilizing the pysmartthings library.

Notifications You must be signed in to change notification settings

grantlemons/light-control

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is python code to mess around with my lights

In order to use it, the first thing one needs to do is get a smartthings personal access token. Secondly, one must copy the .env.example file into a .env file. Copy your token and put it in your .env file (example can be found here.)

Running it

To get it working, go into LightControl.py, and run the program. This will give an output of all devices and their states. Find your desired device and add it to your .env file as the value for DEVICE_NAME.

Comment the line loop.run_until_complete( listDevices() ) and uncomment the line #weirdRandomLights(my_lights_object, device_name)

Run the program again and it should turn on and off the device specified in a semi-random manner.

About

Code to mess around with my smartthings connected lights utilizing the pysmartthings library.

Topics

Resources

Stars

Watchers

Forks