Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Basic support for Light categories #80

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

airy10
Copy link

@airy10 airy10 commented Oct 19, 2023

Only support basic modes for now (no fancy music or animation mode), and the only model ID I know, but that still could be useful for some - and used as some base works if anyone is interested in improving it

@airy10 airy10 changed the title Basic support for color lights Basic support for color lights strip Oct 29, 2023
@airy10
Copy link
Author

airy10 commented Nov 3, 2023

Some refactoring has been done on the Light class so the device functions are fetched from the cloud instead of having to be hardcoded for each product. And some change has been done so the Tuya BLE Light component code is now very close to the official Tuya component code. Similar changes could be done for other product categories

@airy10 airy10 changed the title Basic support for color lights strip Basic support for Light categories Nov 4, 2023
@opensource-alt
Copy link

Hello.
I'm trying to reuse this work to be able to use GU10 bulbs ("dj" category, "roqu3xef" product ID "GU10 B505Z2 Light" from Tuya). There's no device discovered using this integration on the Tuya cloud. With the (Wifi) integrated Tuya integration: devices shows up (but are unsupported as Wifi is expected). I added an "official support" for my devices by modifying custom_components/tuya_ble/devices.py from devices_database dict with no success.

Something chages on the cloud API or home assistant (I'm on 2023.11.3 - docker version) that could make the API calls to Tuya cloud fail?

Philippe

@airy10
Copy link
Author

airy10 commented Nov 28, 2023

Your device should be at least discovered, even without your addition when using this fork.
So unfortunately, not sure what's going wrong here.

@opensource-alt
Copy link

opensource-alt commented Nov 28, 2023 via email

@tikismoke
Copy link

tikismoke commented Jan 28, 2024

I've add my device type id here:

    "dd": TuyaBLECategoryInfo(
        products={
            **dict.fromkeys(
            [
              "nvfrtxlq",
              "0qgrjxum",
            ],  # device product_id
            TuyaBLEProductInfo(
                name="LGB102 Magic Strip Lights",
                manufacturer="Magiacous",


Got his from tuya api explorer:

  "result": {
    "active_time": 1706310212,
    "bind_space_id": "",
    "category": "dd",
    "create_time": 1706293299,
    "custom_name": "",
    "icon": "smart/icon/ay1497491823009SFeNH/e39ab4087a8ec66b30cac9b2e4ac50af.png",
    "id": "",
    "ip": "",
    "is_online": false,
    "lat": "",
    "local_key": "'",
    "lon": "",
    "model": "",
    "name": "RGB Strip Light",
    "product_id": "0qgrjxum",
    "product_name": "RGB Strip Light",
    "sub": false,
    "time_zone": "+01:00",
    "update_time": 1706310212,
    "uuid": "uuid4bc997ad6908"
  }

But the integrations says:
No unconfigured devices found.

@felipecrs
Copy link

I tested your fork @airy10. Unfortunately I am out of luck:

chrome_hWJcaqp0qR

chrome_FXqzt837NT

Too bad I bought so many of these lights. 😭

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants