ItzSwirlz / homebridge-wiiu

Homebridge plugin for Wii U (Aroma)
GNU General Public License v3.0
1 stars 0 forks source link

Crash on start up #2

Open TheFelixLive opened 2 weeks ago

TheFelixLive commented 2 weeks ago

Describe The Bug: When I start/restart the Homebridge server, the Wii U doesn't appear in Homebridge and in the Home app. Instadt Homebridge gives me the following errors, listed in Related Logs

To Reproduce: I want to try the Plugin and gave me this error, so try to install with the associated hardware mentioned in Environment

Expected behavior: It simply should run.

Related Logs:

[16/09/2024, 19:19:31] ====================
[16/09/2024, 19:19:31] ERROR LOADING PLUGIN homebridge-wiiu:
[16/09/2024, 19:19:31] Error: Invalid package config /var/lib/homebridge/node_modules/homebridge-wiiu/node_modules/axios/package.json while importing "axios" from /var/lib/homebridge/node_modules/homebridge-wiiu/dist/platform.js. Unterminated string in JSON at position 7671
    at Object.read (node:internal/modules/package_json_reader:83:15)
    at packageResolve (node:internal/modules/esm/resolve:835:45)
    at moduleResolve (node:internal/modules/esm/resolve:927:18)
    at defaultResolve (node:internal/modules/esm/resolve:1169:11)
    at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:540:12)
    at ModuleLoader.resolve (node:internal/modules/esm/loader:509:25)
    at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:239:38)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:96:40)
    at link (node:internal/modules/esm/module_job:95:36)
[16/09/2024, 19:19:31] ====================
[16/09/2024, 19:19:31] Loading 3 platforms...
[16/09/2024, 19:19:31] No plugin was found for the platform "HomebridgeWiiUPlugin" in your config.json. Please make sure the corresponding plugin is installed correctly.

JSON config file:

{
    "ip": "Wii U IP:8572",
    "name": "Wii U",
    "platform": "HomebridgeWiiUPlugin"
}

Wii U IP is replaced with an actual IP-Address

Environment:

ItzSwirlz commented 2 weeks ago

JSON needs to be formatted in a way that has proper indentation. For example, this is a part of my testing config.json:

        {
            "ip": "192.168.1.195:8572",
            "platform": "HomebridgeWiiUPlugin"
        },

Notice how there are indentations. Your config file needs that too.

TheFelixLive commented 2 weeks ago

My file actually had the indentations in it but I messed up something when formatting (that way the log is from 19 o'clock). I also tried yours

        {
            "ip": "Wii U IP:8572",
           "platform": "HomebridgeWiiUPlugin"
        },

Wii U IP is replaced with an actual IP-Address

and I got the same error.

ItzSwirlz commented 2 weeks ago

Just share your config file (omit or put in foo for parts that are actually needing to be kept secret like API keys). The Wii U IP address is local, only people on your network can access it. There's no harm in sharing it.

Here is the config.json of the homebridge instance I use for testing:

{
    "bridge": {
        "name": "Homebridge ABC3",
        "username": "0E:49:81:3A:AB:CB",
        "port": 51070,
        "pin": "318-08-913",
        "advertiser": "bonjour-hap"
    },
    "accessories": [],
    "platforms": [
        {
            "name": "Config",
            "port": 8581,
            "platform": "config"
        },
        {
            "ip": "192.168.1.195:8572",
            "platform": "HomebridgeWiiUPlugin"
        },
        {
            "name": "Google Smart Home",
            "token": "(token)",
            "notice": "Keep your token a secret!",
            "platform": "google-smarthome"
        }
    ],
    "disabledPlugins": [
        "homebridge-gsh"
    ]
}