Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

A Python module and CLI for controlling Broadlink devices locally. The following devices are supported:

- **Universal remotes**: RM home, RM mini 3, RM plus, RM pro, RM pro+, RM4 mini, RM4 pro, RM4C mini, RM4S, RM4 TV mate
- **Universal remotes**: RM home, RM mini 3, RM plus, RM pro, RM pro+, RM4 mini, RM4 pro, RM4C mini, RM4S, RM4 TV mate, RM Max
- **Smart plugs**: SP mini, SP mini 3, SP mini+, SP1, SP2, SP2-BR, SP2-CL, SP2-IN, SP2-UK, SP3, SP3-EU, SP3S-EU, SP3S-US, SP4L-AU, SP4L-EU, SP4L-UK, SP4M, SP4M-US, Ankuoo NEO, Ankuoo NEO PRO, Efergy Ego, BG AHC/U-01
- **Switches**: MCB1, SC1, SCB1E, SCB2
- **Outlets**: BG 800, BG 900
Expand Down
1 change: 1 addition & 0 deletions broadlink/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@
0x27A6: ("RM plus", "Broadlink"),
0x27A9: ("RM pro+", "Broadlink"),
0x27C3: ("RM pro+", "Broadlink"),
0xAF8B: ("RM Max", "Broadlink"),
},
rmminib: {
0x5F36: ("RM mini 3", "Broadlink"),
Expand Down
46 changes: 46 additions & 0 deletions test_rm_max.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#!/usr/bin/env python3
"""Test if Broadlink RM Max can authenticate despite reporting as locked."""
import sys
sys.path.insert(0, "/Users/amasolov/projects/python-broadlink")
import broadlink

IP = "192.168.2.144"

print(f"Attempting direct discovery of {IP}...")
try:
device = broadlink.hello(IP)
print(f" Found: {device.model} (devtype=0x{device.devtype:04x})")
print(f" Locked: {device.is_locked}")
print(f" Name: {device.name}")
except Exception as e:
print(f" Discovery failed: {e}")
sys.exit(1)

print(f"\nAttempting auth (even though locked={device.is_locked})...")
try:
device.auth()
print(" AUTH SUCCEEDED!")
print("\nAttempting to enter IR learning mode...")
device.enter_learning()
print(" Learning mode entered! Point a remote at the RM Max and press a button...")

import time
for i in range(10):
time.sleep(1)
try:
data = device.check_data()
print(f" Got IR code! ({len(data)} bytes)")
print(f" Hex: {data[:20].hex()}...")
break
except Exception:
print(f" Waiting... ({i+1}/10)")
else:
print(" No IR data received (that's OK, just testing auth)")

except Exception as e:
print(f" Auth failed: {e}")
print("\n The device truly requires unlocking.")
print(" Options:")
print(" 1. Try the older 'BroadLink' app (not Magic Home)")
print(" 2. Factory reset and set up fresh in the older app")
print(" 3. We can patch HA to bypass the lock check")