hoobs-org / HOOBS

Build your Smart Home with HOOBS. Connect over 2,000 Accessories to your favorite Ecosystem.
https://hoobs.org
GNU General Public License v3.0
553 stars 51 forks source link

harmony plugin causes hoobs to crash on daily base #1191

Closed SvenKempf closed 3 years ago

SvenKempf commented 3 years ago

Description Since a couple of days my hoobs installation - which was used to be rock stable - is crashing on daily base (sometimes even multiple times per day). I did a couple of hoobs- and plugin updates. One of them might have caused this behavior. To me it looks to be related to the "harmony" plugin

Expected behavoir The plugin shall (and did in the past) steer my harmony hub scenes.

Plugin name homebridge-harmony

Please report the issue to the plugin developer This was done by me but he consists of this must be an issue of hoobs (shall be stable on native homebridge and might be an issue with hoobs network stack), Issue was reported here: https://github.com/nicoduj/homebridge-harmony/issues/361

Version 3.3.5

Did you upgrade Please let us know if you upgraded from a previous version.

Pervious version the direkt version bevor (doing updates on regular base)

Did you orginally upgrade to HOOBS 3 from HOOBS 2.1.1? Did you perform an upgrade from HOOBS 2.1.1? Some things are different.

What device are you using? Please let us know the device you are running HOOBS on.

If this is a custom install, what's your operating system? hoobs SD image

Post your config This can be found in the interface, Configuration -> Advanced or you can get it via SSH cat ~/.hoobs/etc/config.json

{
    "server": {
        "port": 8080,
        "origin": "*",
        "autostart": 0,
        "home_setup_id": "X-HM://0023ISYWYAA10",
        "polling_seconds": 5
    },
    "client": {
        "default_route": "status",
        "inactive_logoff": 30,
        "theme": "hoobs-dark",
        "locale": "en",
        "temp_units": "celsius",
        "country_code": "DE",
        "postal_code": "64807"
    },
    "bridge": {
        "name": "HOOBS",
        "port": 51826,
        "pin": "031-45-154",
        "username": "09:CF:80:E5:24:52"
    },
    "description": "",
    "ports": {},
    "accessories": [
        {
            "accessory": "DummySwitch",
            "plugin_map": {
                "plugin_name": "homebridge-dummy",
                "index": 0
            },
            "stateful": false,
            "reverse": false,
            "time": 60000,
            "name": "Weg Licht 1 Min",
            "resettable": false
        },
        {
            "accessory": "DummySwitch",
            "plugin_map": {
                "plugin_name": "homebridge-dummy",
                "index": 0
            },
            "stateful": false,
            "reverse": false,
            "time": 180000,
            "name": "Weg Licht 3 Min",
            "resettable": false
        },
        {
            "accessory": "DummySwitch",
            "plugin_map": {
                "plugin_name": "homebridge-dummy",
                "index": 0
            },
            "stateful": false,
            "reverse": false,
            "time": 300000,
            "name": "Weg Licht 5 Min",
            "resettable": false
        }
    ],
    "platforms": [
        {
            "platform": "FHEM",
            "name": "FHEM",
            "server": "192.168.178.40",
            "port": "8083",
            "auth": {
                "user": "***",
                "pass": "***"
            },
            "ssl": true,
            "filter": "room=Homekit",
            "plugin_map": {
                "plugin_name": "homebridge-fhem"
            }
        },
        {
            "platform": "Hue",
            "plugin_map": {
                "plugin_name": "hue"
            },
            "host": "192.168.178.54",
            "name": "hinterhaus hue",
            "forceCt": true,
            "nativeHomeKitLights": true,
            "nativeHomeKitSensors": true,
            "nupnp": false,
            "resource": true,
            "groups": true,
            "group0": false,
            "lights": true,
            "users": {
                "***": "***"
            },
            "rooms": true,
            "scenes": true,
            "rules": true,
            "schedules": true,
            "sensors": false,
            "anyOn": true
        },
        {
            "platform": "MagicHome-Platform",
            "debug": false,
            "lights": [
                {
                    "name": "Schreibtisch Sven",
                    "ip": "192.168.178.26",
                    "setup": "RGBW"
                }
            ],
            "plugin_map": {
                "plugin_name": "homebridge-magichome-platform"
            }
        },
        {
            "platform": "HarmonyHubWebSocket",
            "plugin_map": {
                "plugin_name": "homebridge-harmony"
            },
            "activitiesToPublishAsAccessoriesSwitch": [
                "Ambiente Modus",
                "Bluetooeh Musik",
                "Fernsehen"
            ],
            "name": "Harmony Hub",
            "hubIP": "192.168.178.59",
            "hubName": "Harmony Hub",
            "DELAY_BEFORE_RETRY_AFTER_NETWORK_LOSS": 600,
            "HUB_CONNECT_TIMEOUT": 600,
            "HUB_SEND_TIMEOUT": 600,
            "cleanCache": false,
            "publishAllTVAsExternalAccessory": false,
            "TVAccessory": false,
            "switchAccessories": true,
            "activitiesToPublishAsInputForTVMode": [],
            "remoteOverrideCommandsList": [],
            "skippedIfSameStateActivities": [],
            "devicesToPublishAsAccessoriesSwitch": [],
            "sequencesToPublishAsAccessoriesSwitch": [],
            "homeControlsToPublishAsAccessoriesSwitch": [],
            "otherPlatforms": []
        }
    ]
}```

**Post your log**
You can get the log from the intercafe. This is in the Log section.

Mar 27 08:19:49 hoobs hoobs[12903]: [HarmonyHub] (HarmonyHub)ERROR (2)- refreshC urrentActivity TimeoutError: Can't open WebSocket within allowed timeout: 600 ms . - Stack : TimeoutError: Can't open WebSocket within allowed timeout: 600 ms. Mar 27 08:19:49 hoobs hoobs[12903]: at PromiseController._handleTimeout (/ho me/hoobs/.hoobs/node_modules/promise-controller/src/index.js:172:19) Mar 27 08:19:49 hoobs hoobs[12903]: at Timeout. (/home/hoobs/.hoo bs/node_modules/promise-controller/src/index.js:178:43) Mar 27 08:19:49 hoobs hoobs[12903]: at listOnTimeout (internal/timers.js:531 :17) Mar 27 08:19:49 hoobs hoobs[12903]: at processTimers (internal/timers.js:475 :7) Mar 27 08:21:28 hoobs hoobs[12903]: Error: connect ETIMEDOUT 192.168.178.59:8088 Mar 27 08:21:28 hoobs hoobs[12903]: at TCPConnectWrap.afterConnect [as oncom plete] (net.js:1134:16) Mar 27 08:21:28 hoobs hoobs[12903]: Error: connect ETIMEDOUT 192.168.178.59:8088 Mar 27 08:21:28 hoobs hoobs[12903]: at TCPConnectWrap.afterConnect [as oncom plete] (net.js:1134:16) Mar 27 08:21:28 hoobs hoobs[12903]: Got SIGTERM, shutting down Bridge... Mar 27 08:21:28 hoobs hoobs[12903]: [HarmonyHub] INFO - shutdown Mar 27 08:21:28 hoobs hoobs[12903]: [HarmonyHub] INFO - shutdown```

Additional context I meanwhile had to remove harmony module to get system stable again

nicoduj commented 3 years ago

Just a few other ideas : Did you check the ip of the hub is stable ? (fixed) . Is there any issue connecting ti the hub with iphone / android app ?

Did you try increasing the connect timeout ?

One other things : on normal homebridge, such error does not crash the bridge ....

But as I said, it seems either to be a network issue or related to the hoobs stack itself.

SvenKempf commented 3 years ago

The IP is definitely fixed. Connection might anyways be an issue. I have a AVM Mesh installed and have observed that the harmony hub toggles between repeaters (even as everything is stationary) Timeout indeed helped a little as hoobs didn‘t crash sooo frequently. But as you say: Even if the module/connection times out this should not result in a complete shutdown.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.