hjdhjd / homebridge-myq

:car: myQ Liftmaster and Chamberlain Plugin for Homebridge https://github.com/nfarina/homebridge
Other
568 stars 43 forks source link

Plugin issues excessive DNS requests #1098

Closed mpherg closed 11 months ago

mpherg commented 11 months ago

Describe The Problem: The plugin issues an excessive number of DNS resolution requests, especially for accounts.myq-cloud.com and devices.myq-cloud.com. For instance, on my network of ~40 devices, these domains account for ~30% of all DNS resolution requests (26,701 requests in a single 24 hour period) from a single homebridge installation.

Admittedly this is a low-priority problem, but this noise makes it more difficult to analyze "real" DNS traffic on my network.

To Reproduce: Run the homebridge-myq plugin and configure it with proper myq credentials and devices.

Logs: n/a

Homebridge Configuration:

{
    "bridge": {
        "name": "Homebridge 8CDA",
        "username": "<redacted>",
        "port": 51883,
        "pin": "<redacted>",
        "advertiser": "avahi"
    },
    "accessories": [],
    "platforms": [
        {
            "name": "Config",
            "port": 8581,
            "auth": "form",
            "theme": "auto",
            "tempUnits": "f",
            "lang": "auto",
            "platform": "config"
        },
        {
            "email": "<redacted>",
            "password": "<redacted>",
            "name": "myQ",
            "debug": false,
            "_bridge": {
                "username": "<redacted>",
                "port": 47295
            },
            "platform": "myQ"
        }
    ],
    "disabledPlugins": []
}

Screenshots:

Environment:

hjdhjd commented 11 months ago

This plugin does not have an excessive number of DNS requests - it produces exactly as many as I've designed it to. 😄

It's the way a polling interface to the myQ API like this works. It's also been asked-and-answered previously in prior issues, I'll refer you to searching through prior issues rather than re-answering it here.

Best of luck.

mpherg commented 11 months ago

Thank you for your prompt response, and sorry for not finding the prior issues; I'll go take a look. I'm a C++ developer, so js/ts is a bit foreign to me. Generally in C/C++ we resolve the DNS name once and cache it for some long-ish duration. Perhaps there's a node/OS configuration I can find.

Thanks for the plugin -- works great.

github-actions[bot] commented 11 months ago

This issue is locked to prevent necroposting on closed issues. Please create a new issue for related support requests, bug reports, or feature suggestions.