Skip to content
This repository has been archived by the owner on Jul 15, 2021. It is now read-only.

(BUG) "The requested platform 'SmartThings-v2' was not registered by any plugin." #317

Open
1 task done
vidgizmo opened this issue May 22, 2020 · 18 comments
Open
1 task done
Assignees
Labels
bug Something isn't working as expected

Comments

@vidgizmo
Copy link

Verify the following before opening an trouble issue

Go over all the following points, and put an x in all the boxes that apply.
If you're unsure about any of these, don't hesitate to ask. We're here to help!

  • That OAuth is Enabled for the SmartApp under the IDE.
  • [?] The SmartApp and Device Handler are using the latest code available.
    The SmartApp shows appVersion 2.3.3 and appModified 04-28-2020 and branch master.
  • [?] That Both the SmartApps and Device Handlers have been Published for You in the IDE.
    The SmartApp is published, but I do not have any Device Handlers installed.

About Your Setup

  • How many devices are detected?: None by the Homebridge app running on my Raspberry Pi, but 20 in the Homebridge-v2 SmartApp running on my iPhone.
  • Mobile App Version(Not required):
  • SmartApp Version: 2.3.3
  • Device Handler Version: N/A
  • Homebridge Version: maybe 1.1.0?
    [5/22/2020, 11:24:56 AM] [HB Supervisor] Starting Homebridge with extra flags: -I -D
    [5/22/2020, 11:24:56 AM] [HB Supervisor] Started Homebridge v1.1.0 with PID: 3248
    [5/22/2020, 11:24:57 AM] Loaded config.json with 0 accessories and 2 platforms.
    [5/22/2020, 11:24:57 AM] ---
    [5/22/2020, 11:24:58 AM] Loaded plugin: [email protected]
    [5/22/2020, 11:24:58 AM] Registering platform 'homebridge-config-ui-x.config
  • NodeJS Version: 12.16.3

Expected Behavior

Expecting Homebridge on my Raspberry Pi to start up and find devices.

Current Behavior

Giving the following error messages at startup.
Error: The requested platform 'SmartThings-v2' was not registered by any plugin.

Steps to Reproduce (for bugs)

Just boot the Raspberry Pi

Context

Unable to get started with HomeBridge-v2 :(

Config

here's the config file w/ redacted specific info
{
"bridge": {
"name": "Homebridge 696F",
"username": "0E:90:41:DA:69:6F",
"port": 51780,
"pin": "860-18-426"
},
"accessories": [],
"platforms": [
{
"name": "Config",
"port": 8581,
"platform": "config"
},
{
"platform": "SmartThings-v2",
"name": "SmartThings-v2",
"app_url": "https://graph-na02-useast1.api.smartthings.com:443/api/smartapps/installations/",
"app_id": "a1a9d787-be4b-4e90-b708-da7083e293a2",
"access_token": "96f21153-78b0-4e20-aa2f-************",
"communityUserName": "tonesto7",
"temperature_unit": "F",
"validateTokenId": false,
"logConfig": {
"debug": true,
"showChanges": true,
"hideTimestamp": false,
"hideNamePrefix": false,
"file": {
"enabled": true
}
}
}
]
}

Please include a copy of any relevant log output to assist in tracking down the bug

Logs

[5/22/2020, 11:24:56 AM] [HB Supervisor] Starting Homebridge with extra flags: -I -D
[5/22/2020, 11:24:56 AM] [HB Supervisor] Started Homebridge v1.1.0 with PID: 3248
[5/22/2020, 11:24:57 AM] Loaded config.json with 0 accessories and 2 platforms.
[5/22/2020, 11:24:57 AM] ---
[5/22/2020, 11:24:58 AM] Loaded plugin: [email protected]
[5/22/2020, 11:24:58 AM] Registering platform 'homebridge-config-ui-x.config'
[5/22/2020, 11:24:58 AM] ---
[5/22/2020, 11:24:58 AM] Loading 2 platforms...
[5/22/2020, 11:24:58 AM] [Config] Initializing config platform...
[5/22/2020, 11:24:58 AM] [Config] Running in Service Mode
[5/22/2020, 11:24:58 AM] Error loading platform requested in your config.json at position 2
[5/22/2020, 11:24:59 AM] Error: The requested platform 'SmartThings-v2' was not registered by any plugin.
at PluginManager.getPluginForPlatform (/usr/lib/node_modules/homebridge/src/pluginManager.ts:224:15)
at /usr/lib/node_modules/homebridge/src/server.ts:386:37
at Array.forEach ()
at Server.loadPlatforms (/usr/lib/node_modules/homebridge/src/server.ts:373:27)
at Server.start (/usr/lib/node_modules/homebridge/src/server.ts:152:29)
at cli (/usr/lib/node_modules/homebridge/src/cli.ts:80:10)
at Object. (/usr/lib/node_modules/homebridge/bin/homebridge:17:22)
at Module._compile (internal/modules/cjs/loader.js:1133:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1153:10)
at Module.load (internal/modules/cjs/loader.js:977:32)
[5/22/2020, 11:24:59 AM] Got SIGTERM, shutting down Homebridge...
[5/22/2020, 11:25:04 AM] [HB Supervisor] Homebridge Process Ended. Code: 143, Signal: null
[5/22/2020, 11:25:09 AM] [HB Supervisor] Restarting Homebridge...

@bsaint9
Copy link

bsaint9 commented May 28, 2020

if it helps, I had the exact same issue. I resolved it by reinstalling the plugin from the command line. Once i did that, it finally booted up without that error.

@vidgizmo
Copy link
Author

vidgizmo commented May 30, 2020 via email

@tonesto7 tonesto7 transferred this issue from tonesto7/homebridge-smartthings-v2 Jul 10, 2020
@tonesto7 tonesto7 pinned this issue Jul 10, 2020
@tonesto7 tonesto7 added the bug Something isn't working as expected label Jul 10, 2020
@ab-iancu
Copy link

I have the same issue. I tried re-install the plugin but it did not work.

Is there any other fix for the issue?

@knozturk
Copy link

knozturk commented Jan 1, 2021

I am also having the same issue after updating the node.js to the latest version.

@jumpinghigh
Copy link

Same issue
1- Uninstalled the plugging
pi@raspberrypi:~ $ sudo npm uninstall -g homebridge-smartthings-v2

2- removed from the config.json the whole section for smarthings-v2, keep a copy to get the info back
pi@raspberrypi:~ $ sudo vi /var/lib/homebridge/config.json

3- Restarted the homebridge service
pi@raspberrypi:~ $ systemctl restart homebridge

4- use the Homebridge UI to install the previous version (2.3.4)
image

and put the config back from the file you back-up in step 2

Worked for me

@bdpna
Copy link

bdpna commented Jan 1, 2021

Not working for me. Tried full uninstall and reinstall. As soon as config gets added back in, fail again. 2.3.5 version here.

ERROR LOADING PLUGIN homebridge-smartthings-v2:
Error: Cannot find module '/homebridge/node_modules/homebridge-smartthings-v2/index.js'

@knozturk
Copy link

knozturk commented Jan 1, 2021

Ok this is how I made it work. Instead of installing v2 version on Homebridge side (2.3.5), I have installed 2.3.8 verified version and it has worked again.
image

@bdpna
Copy link

bdpna commented Jan 1, 2021

Think I need some clarification on v2 vs. the one above, which has not been updated in a while. I believe v2 is what we are supposed to be using (but not currently working).

@jumpinghigh
Copy link

Ok this is how I made it work. Instead of installing v2 version on Homebridge side (2.3.5), I have installed 2.3.8 verified version and it has worked again.
image

I re-installed 2.3.4, then it worked

@xeminix
Copy link

xeminix commented Jan 2, 2021

same issue in 2.3.5 (latest), After rollback to 2.3.4, works fine

@cedstrom cedstrom mentioned this issue Jan 2, 2021
@danletnes
Copy link

Sorry for the dumb question, but is there an easy guide on how to rollback? I'm having the same issue.

@AndreaCCIE
Copy link

Sorry for the dumb question, but is there an easy guide on how to rollback? I'm having the same issue.

sudo npm install -g [email protected]

@adavison007
Copy link

OK, I have Homebridge-smartthings-v2 installed, how do I and should I migrate to the home bridge-smartthings without loosing any settings and automations, devices etc?

@FlyersPh9
Copy link

Last night I updated from Homebridge-smartthings-v2 2.3.4 to 2.3.5. After updating, HomeBridge wouldn't not run and the logs showed an issue with the smartthings plugin. I uninstalled the plugin & removed the related config, then reinstalled the latest plugin. After this HomeBridge did start up. I then copy / pasted my old config & saved which brought HomeBridge down again. I have since reverted back to 2.3.4 and everything is working again. I think the issue must have something to do with the format of the config.

@adavison007
Copy link

adavison007 commented Jan 5, 2021

I FOUND A SEAMLESS PERMANENT FIX -

It's because the home bridge-smatthings-v2 is depreciated.... you need to move to homebridge-smartthings !

If you install the new plugin and then and then only after a restart remove the old plugin, everything will carry on without the loss of devices etc

@Huyner
Copy link

Huyner commented Jan 13, 2021

I FOUND A SEAMLESS PERMANENT FIX -

It's because the home bridge-smatthings-v2 is depreciated.... you need to move to homebridge-smartthings !

If you install the new plugin and then and then only after a restart remove the old plugin, everything will carry on without the loss of devices etc

Yes! Thank you @adavison007

What I had to do was roll back homebridge-smartthings-v2 to 2.3.4. This alone will get it to boot up again but since it has been depreciated, perform the following steps below:

Install the new "homebridge-smarthings" plugin and name the platform different than what was previously named in "homebridge-smartthings-v2". Reboot

Verify it is working with no issues.

Remove "homebridge-smartthings-v2"

@bdpna
Copy link

bdpna commented Jan 13, 2021

This is crazy it works, considering (I think) it has not been updated or maintained since 2019, unless I am missing something. Homebridge-smartthings-v2 and the smartapp all have 2020 dates on them in the smartthings API. So, I'm confused, or Tonesto has abandoned v2 and rolling back to the year old app just works (which is fine I guess).

@ericheien0520
Copy link

This is crazy it works, considering (I think) it has not been updated or maintained since 2019, unless I am missing something. Homebridge-smartthings-v2 and the smartapp all have 2020 dates on them in the smartthings API. So, I'm confused, or Tonesto has abandoned v2 and rolling back to the year old app just works (which is fine I guess).

Tonesto posted the following at the top of SmartThings v2.0 thread over at community.smartthings.com:

"Plugin Change Notice
I’m about to make things slightly more confusing but simpler in the end :slight_smile:

In an effort to simplify the discovery and maintenance of the SmartThings plugin for Homebridge I wanted to consolidate the available packages in NPM.
So I reached out to @pdlove who was the owner of the homebridge-smartthings plugin to get access to the GitHub repository and NPM package, and he quickly relinquished control to me.
I then updated the repository and package to the latest version to match that of my homebridge-smartthings-v2 plugin code.

Once I updated the repository and plug I then submitted the homebridge-smartthings plugin for review to become a verified homebridge plugin, and as of this morning it’s officially verified and will become the plugin I maintain going forward.
I’m going to removing the homebridge-smartthings-tonesto7 and homebridge-smartthings-v2 packages from node package manager so they are no longer searchable and archiving the GitHub repos.

How will this affect plugin updates?
If you are already running my v2 plugin please do the following:

Install the homebridge-smartthings plugin
Remove the homebridge-smartthings-v2 (Make sure the Remove Configuration option is not checked if using the WebUI to manage your plugins)
Just restart Homebridge and it will use the existing configuration file from the v2 plugin.
If you are using the existing homebridge-smartthings or homebridge-smartthings-tonesto7 you will need to start over which will remove your ST devices from HomeKit and add them as new devices."

So installing homebridge-smartthings then removing homebridge-smartthings-v2 is the right path to follow.
I just did that and everything is working fine for me.
Thread is here:
https://community.smartthings.com/t/release-homebridge-smartthings-v2-0/179589

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working as expected
Projects
None yet
Development

No branches or pull requests