Skip to content

Rename BUZZER to SOUND and implement proper encoding/decoding - #286

Open
its-tom wants to merge 5 commits into
mill1000:mainfrom
its-tom:pr_add_beep_controls
Open

Rename BUZZER to SOUND and implement proper encoding/decoding#286
its-tom wants to merge 5 commits into
mill1000:mainfrom
its-tom:pr_add_beep_controls

Conversation

@its-tom

@its-tom its-tom commented Aug 19, 2026

Copy link
Copy Markdown
  • Maps PropertyId.SOUND to 0x022C (matches buzzer_all from midea-lan)
  • Maps PropertyId.PROMPT_TONE to 0x001A (matches prompt_tone from midea-lan)
  • Updates encoding and decoding to correctly use 0x01 and 0x00 for these properties
  • Updates device.beep to map to PROMPT_TONE so that applying changes triggers an acknowledgment beep (matching the V2 protocol behavior)
  • Exposes a new device.sound property mapped to SOUND to allow toggling the AC's global buzzer setting
  • Updates all corresponding capability mappings and unit tests

Regarding mill1000/midea-ac-py#481

Original implementation: https://github.com/wuwentao/midea-lan/blob/main/midealan/devices/ac/message.py

- Maps PropertyId.SOUND to 0x022C (matches buzzer_all)

- Maps PropertyId.PROMPT_TONE to 0x001A (matches prompt_tone)

- Updates encoding and decoding to correctly use 0x01 and 0x00

- Adds corresponding unit tests
…erty

- device.beep now maps to PROMPT_TONE (0x001A) again, which triggers the beep to acknowledge the command.

- Added a new device.sound property mapped to SOUND (0x022C) to toggle the global buzzer capability.

- Added missing SOUND capability map and implicitly support PROMPT_TONE
- CapabilitiesResponse now exposes the sound property.

- Fixed missing attribute error in device tests by using the property correctly.
Comment thread msmart/device/AC/device.py Outdated
Comment thread msmart/device/AC/command.py Outdated
Comment thread msmart/device/AC/device.py
Comment thread msmart/device/AC/command.py Outdated
@mill1000

Copy link
Copy Markdown
Owner

This looks pretty good. Thanks for working on it.

I made a few comments, and only saw one potential issue.

For UX, I wonder if we should just merge sound/beep. I don't understand how they differ. Is beep the "old" method and sound the "new" method? Or are they controlling different things?

@mill1000

Copy link
Copy Markdown
Owner

I need to fix that docker workflow sometime too..

@its-tom

its-tom commented Aug 20, 2026

Copy link
Copy Markdown
Author

This looks pretty good. Thanks for working on it.

I made a few comments, and only saw one potential issue.

For UX, I wonder if we should just merge sound/beep. I don't understand how they differ. Is beep the "old" method and sound the "new" method? Or are they controlling different things?

They control two different things, so we should keep them separate:

  • beep determines if the AC beeps to acknowledge a specific command (without feedback of the device). It seems to be not supported on newer devices (atleast for my PortaSplit).

  • sound is a newer capability that permanently toggles the AC's internal buzzer globally (with feedback of the device). It is only supported on some units.

@mill1000

Copy link
Copy Markdown
Owner

They control two different things, so we should keep them separate:

Yeah, but a user probably wants to achieve one thing: mute/unmute their device. They don't care which bit/byte in the protocol does it for their device.

What I propose:

  • Always send BUZZER
  • Only send SOUND when updated
  • Merge the beep/sound properties at the AC device level.
    • Make beep a deprecated alias to sound
  • Expose the capability. e.g. a supports_sound property
  • Revert "PROMPT_TONE" back to "BUZZER" (I never cared for that name: 0e1dfc4)

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.

2 participants