Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add add support for lightbulbs #6

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

konsumer
Copy link

@konsumer konsumer commented Jan 7, 2017

This adds support for TP-link smart lightbulbs. Tested with LB120. The decrypter needs UDP, and no header bytes. I added this to both the wireshark dissector and tplink-smartplug.py.

@konsumer konsumer changed the title add add support for lights add add support for lightbulbs Jan 7, 2017
@konsumer
Copy link
Author

konsumer commented Jan 7, 2017

There are lots of other options like

{"smartlife.iot.smartbulb.lightingservice":{"transition_light_state":{"brightness":90,"color_temp":2900,"hue":0,"ignore_default":1,"mode":"normal","on_off":1,"saturation":0,"transition_period":150}}}

Not sure if these should be flags or what. Suggestions?

@konsumer
Copy link
Author

konsumer commented Jan 8, 2017

I ended up making this with node. My CLI looks like this:

Usage: tplight <COMMAND> <IP_ADDRESS> [options] [<JSON>]

Commands:
  scan     Scan for lightbulbs
  on       Turn on lightbulb
  off      Turn off lightbulb
  cloud    Get cloud info
  raw      Send a raw JSON command
  details  Get details about the device

Options:
  -?, --help        Show help                                          [boolean]
  --transition, -t  Transition time (for on/off)                    [default: 0]
  --hue, -h         Hue of lightbulb (for on)
  --saturation, -s  Saturation of color (for on)
  --color, -c       Color temperature (for on)
  --brightness, -b  Brightness of light (for on)

Examples:
  tplight scan            Get list of lightbulbs on your network
  tplight on 10.0.0.200   Turn on a light
  tplight off 10.0.0.200  Turn off a light

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant