lifxlan icon indicating copy to clipboard operation
lifxlan copied to clipboard

Latest LIFX Smart Downlight (AU store, SKU: MTDCWAU) not discoverable on local network

Open thatandrewguy opened this issue 1 year ago • 3 comments

LIFX has refreshed their downlights on the AU store. The SKU for these new models are 'MTDCWAU', they boast a CRI of 90 and are being marketed as 'Super Colour'. These new model lights are not found by the lifxlan library.

I have six of the previous models and these are all discoverable by lifxlan.

Last week I bought two of the latest Smart Downlight model from Clever House and installed them as Wifi lights. These two new downlights are not discoverable by lifxlan so therefore they are not able to be controlled via lifxlan.

Running the below python code does not return the two new model downlights that are installed.

# Import the necessary modules from lifxlan
from lifxlan import LifxLAN
import ipaddress
import json
from datetime import datetime
import time

# Initialize the LifxLAN object to interact with LIFX lights
lan = LifxLAN()

# Discover all LIFX lights on the network with a delay to ensure all lights are found
print("Discovering LIFX lights. Please wait...")
time.sleep(10)  # Wait for 10 seconds to ensure all lights are discovered
lights = lan.get_lights()

# Prepare a list to hold light information
lights_info = []

# Loop through each light and gather detailed information
for light in lights:
    # Get the IP address, label, MAC address, and product name of the light
    ip_address = light.get_ip_addr()
    label = light.get_label()
    mac_address = light.get_mac_addr()
    product_name = light.get_product_name()
    
    # Convert the IP address to an ipaddress object for sorting
    ip_obj = ipaddress.ip_address(ip_address)
    
    # Append the light information to the list
    lights_info.append({"IP Address": str(ip_obj), "Label": label, "MAC Address": mac_address, "Light Name": product_name})

# Sort the lights by IP address in ascending order
lights_info.sort(key=lambda x: ipaddress.ip_address(x["IP Address"]))

# If no lights are found, inform the user
if not lights:
    print("No LIFX lights found on the network.")
else:
    # Generate the filename with current date and time
    now = datetime.now()
    filename = now.strftime("lifx_lights_%Y%m%d_%H%M%S.json")
    
    # Write the sorted data to a JSON file with pretty printing
    with open(filename, 'w') as file:
        json.dump(lights_info, file, indent=4)
    
    print(f"Data has been saved to {filename}")

# Print the sorted list of lights to console for immediate viewing
print("LIFX Lights Information (Sorted by IP Address):")
for light in lights_info:
    print(f"- Label: {light['Label']}, MAC Address: {light['MAC Address']}, IP Address: {light['IP Address']}, Light Name: {light['Light Name']}")

The two new models are discoverable and found when using the HTTP API.

thatandrewguy avatar Nov 05 '24 20:11 thatandrewguy

I suspect the issue I'm having is related to this. I have two LIFX Mini bulbs and they are not discovered on the LAN. I can ping it and the mobile app sees it no problem. windows 10, python 3.8.8

deseipel avatar Jan 24 '25 15:01 deseipel

aa76b5c62153bea6894cfe385e1cd6519bce919c might help, try using the latest version from GitHub

exking avatar Jul 05 '25 17:07 exking

Hello, I met the same issue. I can control the light from mobile app, and direct connection through MAC and IP also works. However, the LifxLAN() cannot find the light. I tried installing the latest master (7fe35d6) but still the same.

Following is the output from LifxLAN(verbose=True)

Discovering lights...
SEND: GetService
  Size: 36
  Origin: 0
  Tagged: 1
  Protocol: 1024
  Source ID: 527254876
  Target MAC Address: 00:00:00:00:00:00
  Ack Requested: 0
  Response Requested: 1
  Seq Num: 0
  Message Type: 2
  Payload:
    <empty>
  Bytes:
    ['0x24', '0x0', '0x0', '0x34', '0x5c', '0x45', '0x6d', '0x1f', '0x0', '0x0', '0x0', '0x0', '0x0', '0x0', '0x0', '0x0', '0x0', '0x0', '0x0', '0x0', '0x0', '0x0', '0x1', '0x0', '0x0', '0x0', '0x0', '0x0', '0x0', '0x0', '0x0', '0x0', '0x2', '0x0', '0x0', '0x0']

LIFX Candle C Intl Firmware v4.112 OS: Fedora 42 Python: 3.13.7 Poetry: 1.8.5

lancatlin avatar Sep 16 '25 11:09 lancatlin