Skip to content

Mode always returns "DIM" #390

@HimbeersaftLP

Description

@HimbeersaftLP

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions