aurc / melview-mitsubishi-au-nz

Apache License 2.0
9 stars 6 forks source link

Slow / delay in response & EHOSTUNREACH errors #12

Open broomwalker opened 1 year ago

broomwalker commented 1 year ago

Hi all,

I've been running Homebridge on a Rasp Pi 4B 8GB for a year or two now, I've been using this plugin for quite a while since having the Mitsubishi air-con units installed (great work & thank you!).

I've recently redone my Rasp Pi with docker/portainer to run all my services and in my re-install I'm coming across some strange behaviour with 2-5 minute delays for turning on/off air-con units and receiving the following error in my Homebridge logs:

[4/1/2023, 12:43:53 AM] [homebridge-airconditioner-mitsubishi-au-nz] Unable to access unit via direct LAN interface. FetchError: request to http://192.168.1.151/smart failed, reason: connect EHOSTUNREACH 192.168.1.151:80
    at ClientRequest.<anonymous> (/homebridge/node_modules/homebridge-airconditioner-mitsubishi-au-nz/node_modules/node-fetch/lib/index.js:1505:11)
    at ClientRequest.emit (node:events:513:28)
    at Socket.socketErrorListener (node:_http_client:496:9)
    at Socket.emit (node:events:513:28)
    at emitErrorNT (node:internal/streams/destroy:151:8)
    at emitErrorCloseNT (node:internal/streams/destroy:116:3)
    at processTicksAndRejections (node:internal/process/task_queues:82:21) {
  type: 'system',
  errno: 'EHOSTUNREACH',
  code: 'EHOSTUNREACH'
}

I've tried this with child bridges and without, with no difference. I've tried to see if Home Assistant would help by again using the child bridges and without to no avail. Enable Dry Mode is ticked.

The following is the plugin config:

{
    "user": "email@email.com",
    "password": "password",
    "dry": true,
    "platform": "MitsubishiAUNZ",
    "_bridge": {
        "username": "##:##:##:##:##:##",
        "port": 32980
    }
}

The following is the homebridge config.json:

{
    "bridge": {
        "name": "Homebridge 5251",
        "username": "##:##:##:##:##:##",
        "port": 51393,
        "pin": "###-##-###",
        "advertiser": "bonjour-hap"
    },
    "accessories": [],
    "platforms": [
        {
            "name": "Config",
            "port": 8581,
            "platform": "config"
        },
        {
            "user": "email@email.com",
            "password": "password",
            "dry": true,
            "platform": "MitsubishiAUNZ",
            "_bridge": {
                "username": "##:##:##:##:##:##",
                "port": 32980
            }
        }
    ]
}

Rasp Pi 4B 8GB Rasp Pi OS 64bit (Buster) Homebridge version: v1.6.0 Node.js version: v18.13.0 Docker

Thank you!

MichaelJohn124 commented 1 year ago

Hi Broomwalker! I have fixed this issue by removing the plugin and reinstalling it.