Giter VIP home page Giter VIP logo

neewer-controller's Introduction

Neewer RGB660 WIFI module

This custom ESPHome firmware was designed to run my Neewer RGB660 WIFI module. It's a small ESP32 based gizmo that can be mounted directly to the back of your Neewer RGB660 lights to create a stable Bluetooth connection and make the light available over WIFI. It gets powered directly from the light. Once installed it just lives with the light, whereever it goes.

Neewer RGB660 WIFI Controller mounted to the back of a Neewer RGB660 light

Getting a Neewer RGB660 WIFI module

If you are interested in building one for yourself, I've provided the instructions on my blog Rarely Unplugged. I also put together an instructional video on YouTbe. If you would rather buy one than build one yourself, I'm going to be selling these devices for a fair price. Make sure to get notified when the first batch is ready.

Flashing

You can flash the firmware on your ESP32 to turn it into a Neewer 660RGB controller by either building the firmware from source or by uploading a pre-built binary firmware. To flash the firmware from source you will need a running ESPHome instance. If you do not have ESPHome or do not want to use it, you can instead follow the instructions to flash the firmware from a prebuilt binary.

Flash from binary (ESPHome optional)

  1. Download the most recent build of the firmware (Wemos D1 Mini only).
  2. Visit the ESPHome Web Tools website.
  3. Plug your ESP32 device into your computer.
  4. Click on "Connect", select the serial port your device is connected to and click "Connect" again.
  5. Now click "Install" (NOT "Prepare for first use"!) and select the firmware binary you just downloaded.
  6. After the firmware was flashed, click the three dot menu and then select "Configure Wifi" and then "Connect to Wifi".
  7. Fill in your Wifi credentials and click "Connect"

Once you get the "Provisioned!" message you can either go to your ESPHome instance and adopt the newly flashed device into your ESPHome dashboard.

If you do not have ESPHome or don't want to use it, you can instead click "Visit device". You will be able to pair and control your device directly from this web interface. Note: currently color control is not available from this interface. The web server also exposes a simple REST API that allows you to integrate the paired light into other systems or apps, e.g. Bitfocus Companion.

Flash from source (using ESPHome)

Prepare your ESP32 device for first use and adopt it into ESPHome. Then add the following to the start of your devices yaml configuration:

packages:
  DanielBaulig.neewer-controller: github://DanielBaulig/neewer-controller/neewer-controller.yaml

And make sure to add the following to the esphome section:

esphome:
    # [...]
    name_add_mac_suffix: false

This will prevent readding the devices MAC address to the device name upon rebuilding.

Reflash your device. You should now be able to add it to Home Assistant. To pair a Neewer 660RGB light to your ESP32, follow the instructions under "Pairing".

Pairing

To pair the controller to a Neewer RGB660 light, simply put the controller board close to the powered on light (or make sure there is no other unpaired light close by) and hit the "Pair with closest device" button. You can find this button both in Home Assistant or on the controller web interface. It can also be triggered via REST API. The controller will pair with the light and proceed to connect to it. Connecting can take a few seconds, so give it some time. Once the light is connected you will be able to control it through Home Assistant, the controller web interface or REST API (e.g. using Bitfocus Companion).

Thanks

This ESP32 firmware is based on Aria Barrel's work on adapting Xu Lian's reverse engineered Neewer BLE protocol for ESPHome.

It expands on the previous work by providing a more user-friendly discovery and pairing process that is independent from an actual ESPHome instance and reflashing the device and can be completed with just the binary firmware and a web browser, if need be.

neewer-controller's People

Contributors

danielbaulig avatar

Stargazers

 avatar

Watchers

 avatar

neewer-controller's Issues

What if... I have 2 Neewer 660's?

Hey Daniel, thanks for putting this together.

Was wondering how your code could be modified to handle more than 1 neewerlite?

I currently have my 2 RGB660's working with a much more simple and rudimentary configuration:

# Litui's NeewerLight Component
external_components:
- source: github://litui/esphome-components@main
  components: [ neewerlight ]


ble_client:

- mac_address: FF:75:F4:08:XX:XX
  id: neewer_rgb660_left
  on_connect:
    then:
      - lambda: |-
          ESP_LOGD("ble_client_lambda", "BLE: Neewer RGB660 LEFT Connected");
  on_disconnect:
    then:
      - lambda: |-
          ESP_LOGD("ble_client_lambda", "BLE: Neewer RGB660 LEFT Disconnected");

- mac_address: E6:6D:20:1B:XX:XX
  id: neewer_rgb660_right
  on_connect:
    then:
      - lambda: |-
          ESP_LOGD("ble_client_lambda", "BLE: Neewer RGB660 RIGHT Connected");
  on_disconnect:
    then:
      - lambda: |-
          ESP_LOGD("ble_client_lambda", "BLE: Neewer RGB660 RIGHT Disconnected");


light:

- platform: neewerlight
  name: "Office Desk Light Left"
  ble_client_id: neewer_rgb660_left
  icon: mdi:view-grid-compact
  gamma_correct: 1.0
  default_transition_length: 2s

- platform: neewerlight
  name: "Office Desk Light Right"
  ble_client_id: neewer_rgb660_right
  icon: mdi:view-grid-compact
  gamma_correct: 1.0
  default_transition_length: 2s

I would love to incorporate your additions and changes for resiliency as you've built in the interval, binary_sensor, and button sections, but alas, I'm not as skilled to modify your code to accomplish this task.

Happy to help and test.

Cheers.

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.