Git Product home page Git Product logo

bler's Introduction

BLER

ESP32 BLE remote control for ZhiJia (ZhiGuang) LED controllers.

Usage

  1. Flash firmware to ESP32 devboard.
  2. Connect to BLER_AP WiFi access point (password: 12345678) and configure home network connection.
  3. Send GET requests to HTTP command endpoint: http://<device ip>/cmd/<command name><room id: 0..9>

Binding

To bind device to room 1:

  • Power off device.
  • Direct your browser to http://bler.lan/cmd/bind1 .
  • Simultaneously power on device. The device should blink several times to indicate successful binding.

Unbinding

To unbind device use the same steps s for binding:

  • Power off device.
  • Direct your browser to http://bler.lan/cmd/unbind1 .
  • Simultaneously power on device. The device should blink several times to indicate successful binding.

Room 0

To send command to all devices, use room id 0. For example, to put all light on, send GET request to http://bler.lan/cmd/on0

Available commands

  • bind - bind device to remote, to specific group (room)
  • unbind
  • on
  • off
  • a - put first LED channel to max brightness and second channel to zero
  • b - put second LED channel to max brightness and first channel to zero
  • ab - both LED cahnnels to max brightness
  • night

bler's People

Contributors

reverieline avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

bler's Issues

gatttool command

I try command and nothing happend. I miss something?
gatttool -t random --char-write-seq -a 0x9d22 -n 2f4c044b85780bdb276cc901d8c4f614764a5f85f69ca919 -b FF:FF:FF:FF:FF:FF

ZhiGuang lamp work only one time.

Hello, after successful binding between ESP32 and my ZhiGuang lamp, on\off commands works only one time. I suspect, what nothing wrong with code, but new china's lamps not only can check ID of sending device, but also can check uniqueness of packets.

I find out, if binding all rooms id (1..9) to one lamp, then cycling comands, it works. So, lamp just remember several packets. Original app ZhiGuang also create around 20 advertisings on one comand.

Add support for brightness control

Hi,

thank you for this lib. I finally got some control over my Zhi Jia lights.
Everything works fine. However I'm really missing the brightness control.

Would it be possible to add commands for a few presets that include brightness, e.g. 25%, 50%, 75%
I don't know how this works exactly, maybe it needs to be per channel, so something like:
a25, a50, a75, b25, b50, b75, ab25, ab50, ab75

Or could you please provide info on how you sniffed out the existing codes, then I could add them myself and make a PR.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.