luxtronik icon indicating copy to clipboard operation
luxtronik copied to clipboard

Auto Discovery does not work

Open DonPrimo12 opened this issue 11 months ago • 3 comments

According to the HACS documentation I should share some data with you if my heatpump is not auto discovered. Here it is:

Mac Adress: 04:D1:6E (first 6 chars) Original hostname: whats that? Manufacturer: AlphaInnotec Model: LWCV 82R1/3

Also, it seems like I cant add my heatpump anymore with the newest version of the integration (also not with the newest beta). Any advice?

Thanks!

DonPrimo12 avatar Feb 02 '25 15:02 DonPrimo12

Did anyone receive this thread?

DonPrimo12 avatar Feb 16 '25 13:02 DonPrimo12

I have the same first six characters in the MAC address and the same manufacturer, but a different model. Mine is also not auto-discovered.

Here are the details: MAC Address: 04:D1:6E (first six characters) Manufacturer: Alpha Innotec Model: SWCV 62K3

jopie255 avatar Mar 06 '25 07:03 jopie255

Would you be able to run a python file, and post the response? This may help in identifying why the discovery fails.


import socket
import logging

logging.basicConfig()
LOGGER = logging.getLogger()
LOGGER.setLevel(logging.DEBUG)


def discover():
    """Broadcast discovery for luxtronik heatpumps."""

    for p in (4444, 47808):
        LOGGER.debug(f"Send discovery packets to port {p}")
        server = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP)
        server.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1)
        server.bind(("", p))
        server.settimeout(2)

        # send AIT magic brodcast packet
        data = "2000;111;1;\x00"
        server.sendto(data.encode(), ("<broadcast>", p))
        LOGGER.debug(f"Sending broadcast request \"{data.encode()}\"")

        while True:
            try:
                res, con = server.recvfrom(1024)
                res = res.decode("ascii", errors="ignore")
                # if we receive what we just sent, continue
                if res == data:
                    continue
                ip = con[0]
                # if the response starts with the magic nonsense
                if res.startswith("2500;111;"):
                    res = res.split(";")
                    LOGGER.debug(f"Received answer from {ip} \"{res}\"")
                    try:
                        port = int(res[2])
                    except ValueError:
                        LOGGER.debug("Response did not contain a valid port number, an old Luxtronic software version might be the reason.")
                        port = None
                    return (ip, port)
                # if not, continue
                else:
                    LOGGER.debug(f"Received answer, but with wrong magic bytes, from {ip} skip this one")
                    continue
            # if the timout triggers, go on an use the other broadcast port
            except socket.timeout:
                break


LOGGER.info(discover())

rhammen avatar Mar 22 '25 17:03 rhammen

@jopie255 @DonPrimo12

Can you

  • install the latest beta version 2025.7.22-beta
  • add the following to your HA configuration.yaml:
logger:
  default: info
  logs:
    custom_components.luxtronik2: debug
  • try to add the luxtronik integration
  • download the HA raw logs, and post it here.

I'll then have a look to try to see where the discovery fails, and then try to define next steps.

rhammen avatar Aug 25 '25 20:08 rhammen

This issue could be solved by #430

AJediIAm avatar Oct 01 '25 20:10 AJediIAm

@jopie255 @DonPrimo12 Please test with the latest version 2025.10.01-Beta. I hope that has improved the detection. I will close this issue for now. In case you still have problems when using the new version, please create a new issue.

rhammen avatar Oct 02 '25 17:10 rhammen