Skip to main content

Python package to control Awox mesh light bulbs.

API inspired by Matthew Garrett's python light bulb interfaces.

I have only one light bulb and so didn't really test the mesh features, and my light bulb was never associated with the official app.

Only tested with the ESMLm_c9 model, firmware version 1.2.4

Requires :

  • A recent version of Python 2 or 3 (tested with 3.6 and 2.7)
  • bluepy
  • pycryptodome

Installation

From the directory containing setup.py : pip install . or pip install --user . to install in the user's Python directory.

Usage :

From reports, it may not be possible to use the Awox app at the same time as this.

Setting the password on an unpaired light

The setMesh function may hang, but the light blinks when accepting the settings.

import awoxmeshlight
mylight = awoxmeshlight.AwoxMeshLight ("A4:C1:38:78:11:33")
mylight.connect() # Unless specified, the default name and password are used
mylight.setMesh("new_mesh_name", "new_mesh_password","new_mesh_key")
mylight.disconnect()

With the remote

Contributed by Pixtxa.

Reset the light (hold PowerOn + Fav. 1) and the remote (hold PowerOn + ColorCycle) and connect the remote to the light again (hold PowerOn). Now hold PowerOn and the blue button for a few seconds, so the remote switches to Bluetooth-mode. Use BT-app (nRF-Connect or so) to get the mac and name (both will have the same name, its "R-" followed by the last 6 digits of the remotes mac-address). Password will be "1234".

For the remote:

import awoxmeshlight
myremote = awoxmeshlight.AwoxMeshLight ("A4:C1:38:75:24:93", "R-752593", "1234") #change to your remotes data
myremote.connect()
myremote.setMesh("PixtxaLightNet", "IeY3johvoosh","4556572782865925") #better change all of them
myremote.disconnect()

[After setMesh(...) the program didn't work, but the data was set, so i killed the task]

For the light:

import awoxmeshlight
mylight = awoxmeshlight.AwoxMeshLight ("A4:C1:38:78:62:74", "R-752593", "1234") #change to your lights data
mylight.connect()
mylight.setMesh("PixtxaLightNet", "IeY3johvoosh","4556572782865925") #same as on the remote
mylight.disconnect()

[After setMesh(...) the program didn't work, but the data was set, so i killed the task]

Now you can run a simple test script:

import awoxmeshlight
import time
mylight = awoxmeshlight.AwoxMeshLight ("A4:C1:38:78:62:74", "PixtxaLightNet", "IeY3johvoosh")
mylight.connect()
mylight.setColor(0x00, 0xFF, 0x00) #green
mylight.setColorBrightness(0x01) #dark
time.sleep(1)
mylight.setColorBrightness(0x64) #bright
time.sleep(1)
mylight.setPreset(0) #colorchange
mylight.setSequenceFadeDuration(500)
mylight.setSequenceColorDuration(500)
time.sleep(15)
mylight.setWhite(0x00, 0x7F) #coldwhite
time.sleep(1)
mylight.setWhite(0x73, 0x63) #warmwhite
time.sleep(1)
mylight.off()
time.sleep(1)
mylight.on()
mylight.disconnect()

Printing some debug info

Functions don't print anything, instead the logging module is used.

Example using the logger to print everything to stderr :

import awoxmeshlight
import logging

logger = logging.getLogger("awoxmeshlight")
logger.setLevel(logging.DEBUG)
handler = logging.StreamHandler ()
handler.setLevel(logging.DEBUG)
logger.addHandler (handler)

mylight = awoxmeshlight.AwoxMeshLight ("A4:C1:38:97:11:33", "mesh_name", "mesh_password")
mylight.connect ()
mylight.setColor (0x50, 0x76, 0x00 )
mylight.disconnect()

Procedure to manually reset the light bulb (from Awox FAQ video):

Turn on and off in the following sequence :

  • 3 times :
    • On during 1 sec
    • Off during 6 sec
  • On 10 sec
  • Off 10 sec
  • On 10 sec
  • Off 6 sec
  • On -> Light will blink and turn red

Metadata

Release files for awoxmeshlight 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for awoxmeshlight 0.2.0
File Size Uploaded
awoxmeshlight-0.2.0.tar.gz 7.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for awoxmeshlight 0.2.0
File Interpreter ABI Platform
awoxmeshlight-0.2.0-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 16.2 kB

Release files / awoxmeshlight-0.2.0.tar.gz

Download URL awoxmeshlight-0.2.0.tar.gz
Size 7.9 kB
Tags Source
SHA-256 checksum
How to use checksums
acb49d9b77c8f3cdf10d4b702157530a9f612a481c80529a37875f8894a87897
BLAKE2b-256 checksum
How to use checksums
19f5d70b3b088eff5f692cfd2dd1727b66fe201963bb7ea5bba074e9368e6abc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6

Release files / awoxmeshlight-0.2.0-py2.py3-none-any.whl

Download URL awoxmeshlight-0.2.0-py2.py3-none-any.whl
Size 8.4 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
6ef74261f699b181b636af04a44b72641d0e81ce2b49dc0fe35e9c9b1049b393
BLAKE2b-256 checksum
How to use checksums
2f6dd20725d61103e683e43d6284e3cc4eb2e17e9d42fcaf98f8c8762c99664b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page