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

Mode always returns "DIM" #390

Open
HimbeersaftLP opened this issue Jul 15, 2023 · 1 comment
Open

Mode always returns "DIM" #390

HimbeersaftLP opened this issue Jul 15, 2023 · 1 comment

Comments

@HimbeersaftLP
Copy link

My device is a Controller RGB/WW/CW (0x25).

This is the code I used:

import asyncio
import logging
import pprint

from flux_led.aiodevice import AIOWifiLedBulb

logging.basicConfig(level=logging.DEBUG)

ip = "192.168.1.160"

async def go():
    bulb = AIOWifiLedBulb(ip)

    def _async_updated():
        pprint.pprint(["State Changed!", bulb.raw_state])

    await bulb.async_setup(_async_updated)

    print(bulb.operating_mode)

    await bulb.async_set_device_config(operating_mode="RGB")

    await bulb.async_update();

    print(bulb.operating_mode)


asyncio.run(go())

and this is the output:

DEBUG:asyncio:Using proactor: IocpProactor
DEBUG:flux_led.aioprotocol:('192.168.1.160', 5577) => 0x81 0x8A 0x8B 0x96 (4)
DEBUG:flux_led.aioprotocol:('192.168.1.160', 5577) <= 0x81 0x25 0x24 0x61 0x21 0x13 0x26 0x26 0x26 0x00 0x01 0x00 0x00 0xD2 (14)
DEBUG:flux_led.base_device:192.168.1.160: set_available: Received message 81252461211326262600010000d2
DEBUG:flux_led.base_device:192.168.1.160: State: LEDENETRawState(head=129, model_num=37, power_state=36, preset_pattern=97, mode=33, speed=19, red=38, green=38, blue=38, warm_white=0, version_number=1, cool_white=0, color_mode=0, check_sum=210)
DEBUG:flux_led.base_device:192.168.1.160: unmapped raw state: 129,37,36,97,33,19,38,38,38,0,1,0,0,210,
DEBUG:flux_led.base_device:192.168.1.160: Mapped State: LEDENETRawState(head=129, model_num=37, power_state=36, preset_pattern=97, mode=33, speed=19, red=38, green=38, blue=38, warm_white=0, version_number=1, cool_white=0, color_mode=0, check_sum=210)
['State Changed!',
 LEDENETRawState(head=129, model_num=37, power_state=36, preset_pattern=97, mode=33, speed=19, red=38, green=38, blue=38, warm_white=0, version_number=1, cool_white=0, color_mode=0, check_sum=210)]
DEBUG:flux_led.aiodevice:192.168.1.160: device_config: wiring=None operating_mode=DIM
DIM
DEBUG:flux_led.aioprotocol:('192.168.1.160', 5577) => 0x62 0x03 0x0F 0x74 (4)
DEBUG:flux_led.aioprotocol:('192.168.1.160', 5577) => 0x81 0x8A 0x8B 0x96 (4)
DIM
@HimbeersaftLP
Copy link
Author

This issue also affects HomeAssistant, making it always show "DIM" in the operating mode and the color picker always being an RGBWWCW color picker.
@bdraco (sorry for tagging, but it appears you maintain the HASS integration here), should I create a separate issue on the HASS repo?

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

No branches or pull requests

1 participant