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

Error after update #43

Closed
asrusch opened this issue Feb 17, 2016 · 18 comments
Closed

Error after update #43

asrusch opened this issue Feb 17, 2016 · 18 comments

Comments

@asrusch
Copy link

asrusch commented Feb 17, 2016

I did an $npm -g update homebridge-smartthings and now...

====================
ERROR LOADING PLUGIN homebridge-smartthings:
SyntaxError: Unexpected token (
    at Module._compile (module.js:439:25)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Plugin.load (/usr/lib/node_modules/homebridge/lib/plugin.js:65:22)
    at Server.<anonymous> (/usr/lib/node_modules/homebridge/lib/server.js:70:14)
    at Array.forEach (native)
    at Server._loadPlugins (/usr/lib/node_modules/homebridge/lib/server.js:66:22)
====================
No plugins found. See the README for information on installing plugins.
Loaded config.json with 0 accessories and 1 platforms.

---
Loading 1 platforms...
Error: The requested platform 'homebridge-smartthings.SmartThings' was not registered by any plugin.
    at API.platform (/usr/lib/node_modules/homebridge/lib/api.js:94:13)
    at Server._loadPlatforms (/usr/lib/node_modules/homebridge/lib/server.js:194:45)
    at Server.run (/usr/lib/node_modules/homebridge/lib/server.js:35:36)
    at module.exports (/usr/lib/node_modules/homebridge/lib/cli.js:23:16)
    at Object.<anonymous> (/usr/lib/node_modules/homebridge/bin/homebridge:17:22)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)

@pdlove
Copy link
Contributor

pdlove commented Feb 17, 2016

Is anyone else getting this? I uninstalled mine and re-installed it via npm and verified I'm definitely using the version I released and I'm not having this problem.

@asrusch
Copy link
Author

asrusch commented Feb 17, 2016

Ok I can uninstall and reinstall and let you know.

On Tuesday, February 16, 2016, pdlove notifications@github.com wrote:

Is anyone else getting this? I uninstalled mine and re-installed it via
npm and verified I'm definitely using the version I released and I'm not
having this problem.


Reply to this email directly or view it on GitHub
#43 (comment)
.

@asrusch
Copy link
Author

asrusch commented Feb 17, 2016

I believe it has something to do with my config.json.

On Tue, Feb 16, 2016 at 6:48 PM, Andy Rusch asrusch@gmail.com wrote:

Ok I can uninstall and reinstall and let you know.

On Tuesday, February 16, 2016, pdlove notifications@github.com wrote:

Is anyone else getting this? I uninstalled mine and re-installed it via
npm and verified I'm definitely using the version I released and I'm not
having this problem.


Reply to this email directly or view it on GitHub
#43 (comment)
.

@asrusch
Copy link
Author

asrusch commented Feb 17, 2016

/usr/lib/node_modules/homebridge-smartthings/index.js:107
addAttributeUsage(attribute, deviceid, mycharacteristic) {

I am going to completely reinstall my server and try everything from scratch

On Tue, Feb 16, 2016 at 7:01 PM, Andy Rusch asrusch@gmail.com wrote:

I believe it has something to do with my config.json.

On Tue, Feb 16, 2016 at 6:48 PM, Andy Rusch asrusch@gmail.com wrote:

Ok I can uninstall and reinstall and let you know.

On Tuesday, February 16, 2016, pdlove notifications@github.com wrote:

Is anyone else getting this? I uninstalled mine and re-installed it via
npm and verified I'm definitely using the version I released and I'm not
having this problem.


Reply to this email directly or view it on GitHub
#43 (comment)
.

@asrusch
Copy link
Author

asrusch commented Feb 17, 2016

Reinstalled everything from scratch (OS, etc.)

still getting:

/usr/lib/node_modules/homebridge-smartthings/index.js:107
    addAttributeUsage(attribute, deviceid, mycharacteristic) {
                     ^
====================
ERROR LOADING PLUGIN homebridge-smartthings:
SyntaxError: Unexpected token (
    at Module._compile (module.js:439:25)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Plugin.load (/usr/lib/node_modules/homebridge/lib/plugin.js:65:22)
    at Server.<anonymous> (/usr/lib/node_modules/homebridge/lib/server.js:70:14)
    at Array.forEach (native)
    at Server._loadPlugins (/usr/lib/node_modules/homebridge/lib/server.js:66:22)
====================
No plugins found. See the README for information on installing plugins.
Loaded config.json with 0 accessories and 1 platforms.
---
Loading 1 platforms...
Error: The requested platform 'homebridge-smartthings.SmartThings' was not registered by any plugin.
    at API.platform (/usr/lib/node_modules/homebridge/lib/api.js:94:13)
    at Server._loadPlatforms (/usr/lib/node_modules/homebridge/lib/server.js:194:45)
    at Server.run (/usr/lib/node_modules/homebridge/lib/server.js:35:36)
    at module.exports (/usr/lib/node_modules/homebridge/lib/cli.js:23:16)
    at Object.<anonymous> (/usr/lib/node_modules/homebridge/bin/homebridge:17:22)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)

@asrusch
Copy link
Author

asrusch commented Feb 17, 2016

This is my config.json:

andy@homebridge:~$ cat .homebridge/config.json
{
    "bridge": {
        "name": "Homebridge",
        "username": "my:mac:address",
        "port": 51826,
        "pin": "123-45-678"
    },

        "platforms": [
        {
                "platform": "homebridge-smartthings.SmartThings",
                "name": "SmartThings",
                "app_url": "https://graph.api.smartthings.com:443/api/smartapps/installations/",
                "app_id": "id-from-smartapp",
                "access_token": "token-from-smartapp",
                "polling_seconds": 3600,
                "update_seconds": 1
        }
                        ]
}

@pdlove
Copy link
Contributor

pdlove commented Feb 17, 2016

Nothing looks out of whack. What version node are you using? The area indicated looks right and is working flawlessly everywhere I've looked.

@asrusch
Copy link
Author

asrusch commented Feb 17, 2016

 nodejs                   0.10.25~dfsg2-2ub amd64             evented I/O for V8 javascript
ii  nodejs-dev               0.10.25~dfsg2-2ub amd64             evented I/O for V8 javascript (development files)
ii  nodejs-legacy            0.10.25~dfsg2-2ub all               evented I/O for V8 javascript (legacy symlink)
ii  npm                      1.4.21+ds-2     

is that what youre looking for?

@kdanthony
Copy link

Same issue here after upgrade:

$ nodejs -v
v0.10.42

I upgraded to v0.12.10 and am still having the issue. Completely removed homebridge and homebridge-smartthings npm and reinstalled as well. MD5 of the index.js if that matters to make sure its the same.

51120ea8b047c5a99e647b59e6a7ff0c index.js

@asrusch
Copy link
Author

asrusch commented Feb 17, 2016

I think the problem is that we need to be on node v5.x

homebridge/homebridge#347

I could not get the solutions posted on that to work, so I am yet again
starting from scratch.

On Wed, Feb 17, 2016 at 9:08 AM, Kevin Anthony notifications@github.com
wrote:

Same issue here after upgrade:

$ nodejs -v
v0.10.42


Reply to this email directly or view it on GitHub
#43 (comment)
.

@kdanthony
Copy link

Upgrading to 5.6.0 and then removing and reinstalling homebridge and homebridge-smartthings via npm solved the issue for me.

@kdanthony
Copy link

Im using Ubuntu 14.04 LTS so not sure if that will apply for you but I did the following:

  • Remove homebridge and homebridge-smartthings (you may need to remove others here if you are using different plugins): sudo npm remove homebridge homebridge-smartthings -g
  • Install the Node repo for 5.x from nodesource: curl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash -
  • Upgrade nodejs: sudo apt-get install -y nodejs
  • Verify I had node 5.6.0 after: nodejs -v
  • Upgraded NPM to newest: sudo npm install npm@latest -g
  • Install homebridge and homebridge-smartthings again via NPM: sudo npm install homebridge homebridge-smartthings -g

Things started up fine after that. My homebridge config was untouched by this but you may want to back it up anyway before starting.

@pdlove
Copy link
Contributor

pdlove commented Feb 17, 2016

I'm running nodejs 0.10.29 without problems.

@asrusch
Copy link
Author

asrusch commented Feb 17, 2016

Thank you very much for the detailed help! It is working for me now (sorta).

Homebridge starts and it loads all the smartthings, but I can't add it to my homekit. I think this is for me to figure out and not pdlove.

@asrusch asrusch closed this as completed Feb 17, 2016
@kdanthony
Copy link

Remove/move the persist directory in your homebridge config dir if you are trying to readd it to homekit and it doesnt show up.

@asrusch
Copy link
Author

asrusch commented Feb 17, 2016

Thank you!! Worked like a charm.

On Wed, Feb 17, 2016 at 12:39 PM, Kevin Anthony notifications@github.com
wrote:

Remove/move the persist directory in your homebridge config dir if you are
trying to readd it to homekit and it doesnt show up.


Reply to this email directly or view it on GitHub
#43 (comment)
.

@asrusch
Copy link
Author

asrusch commented Feb 17, 2016

And @pdlove, like you said it is FAST. You are awesome.

@pdlove
Copy link
Contributor

pdlove commented Feb 17, 2016

No problem. I need to do work to speed up the Wink platform like this next weekend. Then I'll finally be able to work on a better app for the phone. :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants