Skip to content

ELK-BLEDDM: effects dropped because effect speed is sent ~1 ms after the effect; speed range is 0-100 #157

Description

@dany250

Device

  • Name: ELK-BLEDDM (public address), firmware string read from fff3: ALS1037R20R24K0V02, sold as HX-DD-005 RGB strip (Lotus Lantern app)
  • Service fff0, write fff3 (read, write-without-response), notify fff4
  • elkbledom 1.6.5, Home Assistant 2026.9.3, via ESPHome Bluetooth proxy (active connections)

Problem
On/off, colour and brightness work, but selecting an effect does nothing: the strip keeps its current colour.

Cause 1: the effect packet is dropped when the speed packet follows immediately

In light.py, after set_effect() the integration calls set_effect_speed() right away. With debug logging the two writes go out about 1 ms apart:

09:29:07.861 Sending BLE command: 7e 05 03 8a 03 ff ff 00 ef   (effect)
09:29:07.862 Sending BLE command: 7e 04 02 32 ff ff ff 00 ef   (speed)

The controller echoes both on fff4, but it does not apply the effect. Writing directly to fff3 with bleak:

  • effect alone → effect starts
  • effect + speed back to back → effect lost (the strip keeps the previous colour)
  • effect, then a 300–500 ms pause, then speed → both applied

The code already handles the same problem for ELK-BLEDOB with ELK_BLEDOB_COMMAND_SETTLE_TIME.

Cause 2: the effect speed range is 0–100, and the default of 128 is out of range

The official Lotus Lantern app (wl.smartled 6.5.10) uses a speed slider with max="100" and sends the value raw: 7E 04 02 vv FF FF FF 00 EF. With speed at 0, blink and jump effects look like a static colour, so they appear broken as well.

Fix, tested locally: all 22 effects, speed and brightness now work from HA

# elkbledom.py
ELK_BLEDDM_COMMAND_SETTLE_TIME = 0.3
...
            if self._model_name == "ELK-BLEDOB":
                await asyncio.sleep(ELK_BLEDOB_COMMAND_SETTLE_TIME)
            elif self._model_name == "ELK-BLEDDM":
                await asyncio.sleep(ELK_BLEDDM_COMMAND_SETTLE_TIME)
...
        self._effect_speed = 50  # was 128, outside the 0-100 range of this model
// models.json, ELK-BLEDDM entry
"effect_speed_range": { "min": 0, "max": 100 }

I also switched the ELK-BLEDDM effect and speed commands to the app's framing (7E 05 03 vv 03 FF FF 00 EF and 7E 04 02 vv FF FF FF 00 EF). The device accepts both, but I did not prove the original 7E 00 03 vv 03 00 00 00 EF fails; colour commands with a 00 length byte work fine. The timing and the speed range are what fixed it.

Thanks for the integration!

Diagnosed and tested by Claude (Anthropic's AI assistant), working from a decompilation of the official app and live tests on my strip. I confirmed every step on the device.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions