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

No button to uninstall MyQ plugin resulting in error #977

Closed nebbenneb closed 3 years ago

nebbenneb commented 3 years ago

Description The myQ plugin stopped working, and so I went to uninstall and reinstall but there was no button. So I searched plugins and found what appeared to be a new version. I installed it, imaging it would overwrite the old version, but now I have two version of the myQ plugin installed and the service will not run. MyQ2 is the obsolete plugin without the uninstall button. I've tried a few different npm terminal commands I've found here to uninstall, and then restarted. No change in behavior, logs, config, etc. With so few plugins, not a big deal to start over, but I would prefer a fix.

Version Version 3.3.1

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

Pervious version Unsure, I update regularly. Whatever the most recent previous version was, likely. Is there a place to look this up?

Did you originally 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? Pi 3B

List your plugins Please include a list of the plugins you are using. We need to be able to find it on NPM. If the plugin is no published, please include a link to the repository.

Bond 3.2.2 published 12/14/2020 • 4 days ago Bond plug-in for HOOBS using the Bond V2 API

myQ 2.3.7 published 12/18/2020 • 1 day ago HomeKit integration of myQ enabled devices such as those from LiftMaster and Chamberlain.

Tplink Smarthome 6.1.0 published 10/20/2020 TPLink Smarthome plugin for HOOBS

myQ2 2.1.11 /home/hoobs/.hoobs/node_modules/homebridge-myq2

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,
        "autostart": 0,
        "home_setup_id": "X-HM://0023ISYWY4MPI",
        "polling_seconds": 5,
        "origin": "*"
    },
    "client": {
        "default_route": "status",
        "inactive_logoff": 30,
        "theme": "hoobs-dark",
        "locale": "en",
        "temp_units": "fahrenheit",
        "country_code": "US",
        "postal_code": "12345"
    },
    "bridge": {
        "name": "HOOBS",
        "port": 51826,
        "pin": "XX",
        "username": "XX"
    },
    "description": "",
    "ports": {},
    "accessories": [],
    "platforms": [
        {
            "platform": "myQ",
            "plugin_map": {
                "plugin_name": "homebridge-myq"
            },
            "verbose": false,
            "openDuration": 15,
            "closeDuration": 25,
            "longPoll": 15,
            "shortPoll": 5,
            "shortPollDuration": 600,
            "email": "XX",
            "name": "Garage Door",
            "password": "XX",
            "options": []
        },
        {
            "platform": "TplinkSmarthome",
            "plugin_map": {
                "plugin_name": "homebridge-tplink-smarthome"
            },
            "name": "TplinkSmarthome",
            "addCustomCharacteristics": true,
            "deviceTypes": [
                "plug",
                "bulb"
            ],
            "switchModels": [],
            "macAddresses": [],
            "excludeMacAddresses": [],
            "devices": []
        },
        {
            "platform": "Bond",
            "plugin_map": {
                "plugin_name": "homebridge-bond"
            },
            "include_dimmer": false,
            "include_toggle_state": false,
            "fan_speed_values": true,
            "bonds": [
                {
                    "ip_address": "XX",
                    "token": "XX"
                }
            ]
        }
    ]
}

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

12/19/2020, 8:07:19 PM HOOBS listening on port 8080.
12/19/2020, 8:07:23 PM Loaded plugin 'homebridge-bond'
12/19/2020, 8:07:23 PM [12/19/2020, 20:07:23] Registering platform 'homebridge-bond.Bond'
12/19/2020, 8:07:24 PM Loaded plugin 'homebridge-myq'
12/19/2020, 8:07:24 PM [12/19/2020, 20:07:24] Registering platform 'homebridge-myq.myQ'
12/19/2020, 8:07:24 PM Loaded plugin 'homebridge-myq2'
12/19/2020, 8:07:24 PM [12/19/2020, 20:07:24] Registering platform 'homebridge-myq2.myQ'
12/19/2020, 8:07:24 PM Loaded plugin 'homebridge-tplink-smarthome'
12/19/2020, 8:07:24 PM Loading 3 platforms...
12/19/2020, 8:07:24 PM Error loading platform requested in your config.json at position 1
12/19/2020, 8:07:24 PM [12/19/2020, 20:07:24] Registering platform 'homebridge-tplink-smarthome.TplinkSmarthome'
12/19/2020, 8:07:24 PM Error: The requested platform 'myQ' has been registered multiple times. Please be more specific by writing one of: homebridge-myq.myQ, homebridge-myq2.myQ
    at PluginManager.getPluginForPlatform (/usr/local/lib/node_modules/@hoobs/hoobs/node_modules/homebridge/lib/pluginManager.js:156:23)
    at /usr/local/lib/node_modules/@hoobs/hoobs/bridge/server.js:334:45
    at Array.forEach (<anonymous>)
    at Server.loadPlatforms (/usr/local/lib/node_modules/@hoobs/hoobs/bridge/server.js:320:31)
    at Server.start (/usr/local/lib/node_modules/@hoobs/hoobs/bridge/server.js:152:35)
    at /usr/local/lib/node_modules/@hoobs/hoobs/bridge/cli.js:94:16
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
mkellsy commented 3 years ago

The developer renamed this plugin and the two conflict with each other. You will have to manually uninstall homebridge-myq2.

  1. Open the terminal and navigate to ~/.hoobs

    cd ~/.hoobs
  2. Edit your config and remove the homebridge-myq2 plugin from the plugin list.

    nano etc/config.json

    Look for the plugins array.

    ...
    "plugins": [
    "homebridge-myq2",
    "homebridge-myq",
    "homebridge-tplink"
    ]

    Pay attention to the commas, every line in the plugins array should end with a comma except the last line. To save press ctrl+x and follow the instructions in nano.

  3. Edit the package.json file.

    nano package.json

    Remove the "homebridge-myq2" line in the "dependencies" section. It will look something like this.

    "dependencies": {
    "homebridge-myq2": "^8.2.0",
    "homebridge-myq": "^8.2.0",
    "homebridge-tplink": "^4.17.1"
    },

    Again pay attention to the commas, every line should end with a comma except the last line in the "dependencies" section. Save the changes ctrl+x.

  4. Use NPM to clean everything up.

    sudo rm -fR node_modules
    npm install
  5. Reboot. This is the easy way to restart the services.

nebbenneb commented 3 years ago

Worked like a charm. Thank you! I’m seeing multiples of some accessories now. Ok to post details here, or should I open a new issue?

mkellsy commented 3 years ago

You might need to purge the cache and then re-pair with homekit.

nebbenneb commented 3 years ago

That worked in that everything is now working smoothly - thanks. However, I still see multiples of some devices in HOOBS. For example, the screen porch fan shows up with a clickable icon/button in the correct room (“Screen Porch”), but also shows as an unassigned device with no button, text only. The bedroom fan shows up only once and in the correct room, but as text only without a button. I can control everything fine from the Home app. Is this a potential issue with Bond since these are all devices integrated with that plugin?

askovi commented 3 years ago

That's normal. The ones with just text are usually secondary functions of that accessory. For example a doorbell can have a camera, motion sensor, sound sensor, doorbell button, etc. Not all of these are yet supported in the HOOBS accessories even though they are supported in Homekit. More of them will be supported in future updates and will change from just a text icon to a more functional one.

nebbenneb commented 3 years ago

Thank you!