Closed asrusch closed 8 years ago
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.
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 https://github.com/pdlove/homebridge-smartthings/issues/43#issuecomment-184986669 .
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 https://github.com/pdlove/homebridge-smartthings/issues/43#issuecomment-184986669 .
/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 https://github.com/pdlove/homebridge-smartthings/issues/43#issuecomment-184986669 .
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)
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
}
]
}
Nothing looks out of whack. What version node are you using? The area indicated looks right and is working flawlessly everywhere I've looked.
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?
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
I think the problem is that we need to be on node v5.x
https://github.com/nfarina/homebridge/issues/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 https://github.com/pdlove/homebridge-smartthings/issues/43#issuecomment-185302011 .
Upgrading to 5.6.0 and then removing and reinstalling homebridge and homebridge-smartthings via npm solved the issue for me.
Im using Ubuntu 14.04 LTS so not sure if that will apply for you but I did the following:
sudo npm remove homebridge homebridge-smartthings -g
curl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash -
sudo apt-get install -y nodejs
nodejs -v
sudo npm install npm@latest -g
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.
I'm running nodejs 0.10.29 without problems.
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.
Remove/move the persist directory in your homebridge config dir if you are trying to readd it to homekit and it doesnt show up.
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 https://github.com/pdlove/homebridge-smartthings/issues/43#issuecomment-185393611 .
And @pdlove, like you said it is FAST. You are awesome.
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. :)
I did an $npm -g update homebridge-smartthings and now...