Skip to main content

An implementation of the BLE protocol for controlling Zuli smartplugs

Project description

This project serves to reconstruct and document the protocol used to interact with Zuli smartplugs. Included is a Python CLI that can be used to perform basic operations on Zuli devices (turn them on/off, set schedules, check power usage, etc.). This project is by no means mature or complete or even under active development. I originally started the project out of curiosity, although I do find myself using it from time to time. (I use it to manage several Zuli smartplugs running various schedules for lights at home.) Whatever you use it for, I hope you will find it to be useful in your hacking ;)

Installation

pip install zuli

How to use

This utility does not run as a standalone command as you might expect. This design allows BLE connections with devices to be kept open in between commands. To start the utility:

python -m zuli

[!NOTE] macOS users must give Terminal (or your app of choice) Bluetooth access for this utility to work.

First, you might query the current list of discovered smartplugs. My output shows UUIDs instead of true MAC addresses due to the way the Bluetooth stack on macOS works; your output may look a little different.

>>> devices
1A494372-A92F-4710-BFBF-07DBD8604702
693907F9-3013-43AF-B8DC-8839686CBE59
74215D76-212E-45D5-BA05-AF289EB34416

Now, you could turn all of the discovered devices on with:

>>> on

Or, you could turn on a specific device.

>>> on -d 1A49

To see a complete list of commands, type garbage into the prompt:

argument {on,off,mode,power,time,synctime,schedules,remove_schedule,add_schedule,devices,quit}: invalid choice: 'qwertyasdf' (choose from on, off, mode, power, time, synctime, schedules, remove_schedule, add_schedule, devices, quit)

Next steps

I would love to get a Home Assistant integration working.

About Zuli smartplugs

Zuli smartplugs were announced on Kickstarter in 2015 with an iOS app announced at launch and an Android app promised shortly thereafter. The company has recently discontinued support for both apps, though it is still possible to use their smartplugs since they operate locally via Bluetooth.

Project details


Download files

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

Source Distribution

zuli-0.1.0.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zuli-0.1.0-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

Details for the file zuli-0.1.0.tar.gz.

File metadata

  • Download URL: zuli-0.1.0.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.0

File hashes

Hashes for zuli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 09ceebbf4cd40da11a1159f77e558d8c65ff0531d5cf0af878ffd90e8b051638
MD5 b500cbf4e5cd56d15e8ebf94e4489b82
BLAKE2b-256 c4b1706aa6d93f8c5a378a12491c131d12e0acad6e90c3290b47ac250786c063

See more details on using hashes here.

File details

Details for the file zuli-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: zuli-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.0

File hashes

Hashes for zuli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 73fac3ebd3463743f5b420a62465694b37e9613b9b84f2c1e7f17ac36ddabe87
MD5 c3d39e26d7b3850399091ba9dee6a63e
BLAKE2b-256 4eae68a3a8e27a3bbb2b668c0e6f1e4ec92c1baf873575085d02ca73b6fec062

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page