Skip to content

Building a python module for controlling Zengee BLE mesh devices using Bleak as the backend. Ultimate goal is Zengee Home Assistant integration.

License

Notifications You must be signed in to change notification settings

SleepyNinja0o/ZenggeBLEMeshBleak

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ZenggeBLEMeshBleak

Building a python module for controlling Zengge BLE mesh devices using Bleak as the backend.
Ultimate goal is Zengge Home Assistant integration.

Requirements

cryptography
requests
bleak
paho-mqtt

Examples

Pull Mesh Info from Cloud

Supported country servers:
AU AL CN GB ES FR DE IT JP RU US

from zengge_bleak import *
zengge_cloud = ZenggeCloud("usernameHere","passwordHere","US")  #Login and data retrieval happens on init
zengge_cloud.list_meshes()
zengge_cloud.list_mesh_devices()

Control Lights

from zengge_bleak import *
import asyncio

meshID = 0x0211
meshName = "q31k125n759z2fkn"
meshPass = "4rie6o2dl56fz2ui"
meshLTK = "83dd4d4630f5h57g"

deviceName = "Light1"
deviceMAC = "08:65:F0:05:25:65"
deviceMeshAddress = 0x05
deviceType = 0x41

mesh = ZenggeMesh(deviceMAC, meshName, meshPass, meshLTK, meshID)
device = ZenggeLight(deviceName,deviceMAC,deviceMeshAddress,deviceType,mesh)

async def execute():
    await mesh.connect()
    await device.light_on()
    await device.light_rgb(255,0,0)
    await asyncio.sleep(3)
    await device.light_off()
    await asyncio.sleep(10) #Test notifications here
    await mesh.disconnect()

asyncio.run(execute())

About

Building a python module for controlling Zengee BLE mesh devices using Bleak as the backend. Ultimate goal is Zengee Home Assistant integration.

Resources

License

Stars

Watchers

Forks

Languages