GithubHelp home page GithubHelp logo

roslovets / sp110e-hass Goto Github PK

View Code? Open in Web Editor NEW
12.0 2.0 2.0 154 KB

Control SP110E RGB LED BLE Controller from Home Assistant

License: MIT License

Python 100.00%
hass home-assistant sp110e ble rgb integration

sp110e-hass's Introduction

SP110E Home Assistant Integration

Control SP110E RGB LED BLE Controller from Home Assistant

Supported features:

  • Turn on/off
  • Set brightness
  • Set color
  • Set white color brightness
  • Select mode
  • Configure device

Installation

Copy custom_components/sp110e folder to <config_dir>/custom_components/.

Add the following entry in your configuration.yaml (quick example):

light:
  - platform: sp110e
    mac: AF:00:10:01:C8:AF # Replace with your MAC address (required)

Full list of options (full example)

light:
  - platform: sp110e
    mac: AF:00:10:01:C8:AF # Replace with your MAC address (required)
    name: SP110E # Device name for UI (optional, default: SP110E)
    ic_model: UCS1903 # Circuit model (optional)
    sequence: GRB # Color sequence (optional)
    pixels: 60 # Number of LED pixels (optional)
    strict: false # If true, you will get an error trying to operate with offline device (optional, default: false)
    add_effects: # Custom effects in addition to built-in modes (optional)
      - name: New Year # Custom name (required)
        mode: 2 # (optional)
        speed: 75 # (optional)
      - name: Sunset
        color: [255, 64, 0]
        brightness: 255

FAQ

Q: I'm getting error [Errno 2] No such file or directory when running Home Assistant from Docker container

A: Add this volume to your container: /var/run/dbus/:/var/run/dbus/:z

Development

Create new release

⚠️ Do not forget to update requirements section in manifest.json

Push changes to 'main' branch following Conventional Commits.

Useful links

⭐️ Show your support

Give a star if this project helped you.

sp110e-hass's People

Contributors

actions-user avatar roslovets avatar

Stargazers

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

Watchers

 avatar  avatar

sp110e-hass's Issues

ask for help

I just came into contact with this, and I just installed a part of the program. What should a novice do to start this project from scratch, how to configure the environment, and compile and burn

HA does not connect to SP110E any logs?

Hey there!
Much appreciate that you created this plugin! Always wanted to integrate my SP110E into HA since I got it.

Is there any kind of log that I can have a look in why my HA instance isn't able to connect to the SP110E?
Is the MAC address that the 'LED Hue' app shows while connecting to the SP110E the one that I can use in my config?

Thanks for your help!

Homebridge

Hi,

I've got a SP110E Controller and I've been looking around to see if there is any way to connect it to homebridge.

I'm on a rpi 3 with bluetooth and it doesn't look like anyone has made any plugin for this.

I've got minimal coding experience and I'm not sure how to apply what I've seen in your repositories to my homebridge.

Would you be able to help with this?

Requirements not found again

Hello,
after the last Issue with sp110e 1.4.0 has been fixed, it worked great, until a few days ago, when I noticed the device stopped responding. When I checked earlier today, I noticed I was getting the Message "Platform error light.sp110e - Requirements for sp110e not found: ['sp110e==1.4.1']." again :/

Light Not Connecting to Device or Showing RGB

Home Assistant OS 2022.11.4-2022.12.0 Hardware SP110e + WS2811. Lights and Controller tested working via Cellphone APP. BluetoothCTL in home assistant terminal sees mac address. Installed Via HACS, verified files are in custom components directory. Added basic configuration and full configurations to try inside configuration.yaml.

Entity shows up correctly under Developer Tools "states" but under Settings > Devices & Services > "entities" without RGB controls and has no communication to device. Verified MAC Address against phone app which does control lights, disconnected phone app before rebooting HA. Have tried uninstalling, rebooting and reinstalling several times.

I am not sure why the entity shows in developer tools with all the properties, but not in the entity itself or in any light card. I have seen video of the same install giving the RGB controller and controlling the lights. Photos below for reference.

image
image

This integration is not working...

The SP110E is working fine with the LED Hue app on my phone.

This error originated from a custom integration.

Logger: homeassistant.helpers.entity
Source: custom_components/sp110e/light.py:217
Integration: sp110e (documentation, issues)
First occurred: 8:36:19 PM (1 occurrences)
Last logged: 8:36:19 PM

Update for light.sp110e fails
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/sp110e/controller.py", line 208, in _connect_with_retries
    await self._driver.connect(self._mac, timeout=self._timeout)
  File "/usr/local/lib/python3.10/site-packages/sp110e/driver.py", line 42, in connect
    device = await BleakScanner.find_device_by_address(mac_address, timeout=timeout)
AttributeError: type object 'HaBleakScannerWrapper' has no attribute 'find_device_by_address'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 548, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 746, in async_device_update
    raise exc
  File "/config/custom_components/sp110e/light.py", line 220, in async_update
    self._handle_exception(exception)
  File "/config/custom_components/sp110e/light.py", line 246, in _handle_exception
    raise exception
  File "/config/custom_components/sp110e/light.py", line 217, in async_update
    await self._device.update()
  File "/usr/local/lib/python3.10/site-packages/sp110e/controller.py", line 60, in update
    await self._connect_with_retries()
  File "/usr/local/lib/python3.10/site-packages/sp110e/controller.py", line 211, in _connect_with_retries
    raise Exception
Exception
  - platform: sp110e
    mac: 37:73:03:2a:37:82 # Replace with your MAC address (required)
    name: SP110E
    sequence: BRG
    pixels: 10
    strict: true

image

image

  "data": {
    "manager": {
      "adapters": {
        "hci0": {
          "address": "00:1A:7D:DA:71:07",
          "sw_version": "homeassistant",
          "hw_version": "usb:v1D6Bp0246d053F",
          "passive_scan": true,
          "manufacturer": "cyber-blue(HK)Ltd",
          "product": "CSR8510 A10",
          "vendor_id": "0a12",
          "product_id": "0001"
        }
      },

Bluetooth integration

Do I need to have bluetooth integration installed to have SP110E working? The bluetooth integration finds the bluetooth adapter, but doesn't see any other devices. There are some errors in the log related to this integration:

2022-09-27 21:54:04.327 ERROR (MainThread) [homeassistant.components.bluetooth.scanner] hci0 (B8:27:EB:7F:B2:13): Error stopping scanner: [org.bluez.Error.InProgress] Operation already in progress
...
2022-09-27 22:36:34.606 WARNING (MainThread) [bluetooth_auto_recovery.recover] Bluetooth adapter hci0 successfully turned back ON
...
2022-09-28 02:04:02.862 ERROR (MainThread) [homeassistant.components.bluetooth.scanner] hci0 (B8:27:EB:7F:B2:13): Error stopping scanner: [org.bluez.Error.NotReady] Resource Not Ready
2022-09-28 02:04:05.885 WARNING (MainThread) [bluetooth_auto_recovery.recover] Power state of bluetooth adapter hci0 is OFF after power cycle
...
2022-09-28 18:37:35.567 ERROR (MainThread) [homeassistant.components.bluetooth.scanner] hci0 (B8:27:EB:7F:B2:13): Error stopping scanner: [org.bluez.Error.InProgress] Operation already in progress
2022-09-28 18:39:35.569 ERROR (MainThread) [homeassistant.components.bluetooth.scanner] hci0 (B8:27:EB:7F:B2:13): Error stopping scanner: [org.bluez.Error.NotReady] Resource Not Ready
2022-09-28 18:39:35.803 WARNING (MainThread) [bluetooth_auto_recovery.recover] Bluetooth adapter hci0 successfully turned back ON
2022-09-28 18:40:02.179 WARNING (MainThread) [homeassistant.helpers.entity] Update of light.sp110e is taking over 10 seconds
2022-09-28 18:46:32.195 WARNING (MainThread) [homeassistant.helpers.entity] Update of light.sp110e is taking over 10 seconds
2022-09-28 18:46:52.193 WARNING (MainThread) [homeassistant.components.light] Updating sp110e light took longer than the scheduled update interval 0:00:30

Wouldn't it be better just to delete this integration?

Is there any way to see detailed log of SP110E integration? Was it able to establish connection with the device or not?

Unable to control the light

Integration adds the light and it's features, but unable to control it. When toggling switch on it turns off without any changes to the light. No errors that I could see in the logs.

Requirements for sp110e not found

After installing this using HACS and adding the necessary content to the configuration.yaml it shows the following error when checking the configuration:

Platform error light.sp110e - Requirements for sp110e not found: ['sp110e==1.4.0'].

How can I avoid this error?

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.