question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

nodejs rejects my username/MAC address -- SOLVED!

See original GitHub issue

Expected Behavior

upon startup, homebridge should read properly formatted mac address as valid username, which I derived from running ‘ifconfig’:

pi@LeFanu:~ $ ifconfig

wlan0 Link encap:Ethernet HWaddr b8:27:eb:60:40:24

Current Behavior

starting up homebridge throws this error: /opt/nodejs/lib/node_modules/homebridge/lib/server.js:215 throw new Error('Not a valid username: ’ + username + ‘. Must be 6 pairs of colon-’ + ^

Error: Not a valid username: undefined. Must be 6 pairs of colon-separated hexadecimal chars (A-F 0-9), like a MAC address.

Steps to Reproduce (for bugs)

execute ‘/opt/nodejs/bin/homebridge’

Versions

  • Homebridge: homebridge --version
  • Node: node --version
  • OS:

homebridge version: 0.4.33 node version: v9.3.0 OS arch/version: Linux LeFanu 4.9.65-v7+ #1056 SMP Fri Nov 24 13:58:07 GMT 2017 armv7l GNU/Linux (Raspberry pi, running raspbian Jessie)

Configuration


{
	"bridge": [{
		"name": "Homebridge",
		"username": "B8:27:EB:60:40:24",
		"port": 51827,
		"pin": "031-45-154"
	}],
	"description": "JSON API",
	"platforms": [{
		"platform": "SmartThings",
		"name": "SmartThings",
		"app_url": "https://graph-na04-useast2.api.smartthings.com:443/api/smartapps/installations/",
		"app_id": "REDACTED",
		"access_token": "REDACTED"
	}]
}


Homebridge Log / Command Output

Dec 21 05:14:31 LeFanu systemd[1]: homebridge.service: Main process exited, code=exited, status=203/EXEC
Dec 21 05:14:31 LeFanu systemd[1]: homebridge.service: Unit entered failed state.
Dec 21 05:14:31 LeFanu systemd[1]: homebridge.service: Failed with result 'exit-code'.
Dec 21 05:14:42 LeFanu systemd[1]: homebridge.service: Service hold-off time over, scheduling restart.
Dec 21 05:14:42 LeFanu systemd[1]: Stopped Node.js HomeKit Server.
Dec 21 05:14:42 LeFanu systemd[1]: Started Node.js HomeKit Server.
Dec 21 05:14:42 LeFanu systemd[1]: homebridge.service: Main process exited, code=exited, status=203/EXEC
Dec 21 05:14:42 LeFanu systemd[1]: homebridge.service: Unit entered failed state.
Dec 21 05:14:42 LeFanu systemd[1]: homebridge.service: Failed with result 'exit-code'.
Dec 21 05:14:52 LeFanu systemd[1]: homebridge.service: Service hold-off time over, scheduling restart.
Dec 21 05:14:52 LeFanu systemd[1]: Stopped Node.js HomeKit Server.
Dec 21 05:14:52 LeFanu systemd[1]: Started Node.js HomeKit Server.
Dec 21 05:14:52 LeFanu systemd[1]: homebridge.service: Main process exited, code=exited, status=203/EXEC

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:37

github_iconTop GitHub Comments

1reaction
ajfromazcommented, Jan 5, 2018

I got it up and running too! I did have the sq brackets where you show but I just created a new config.json file and updated the token id etc, and it works now. Phew!!

btw, pls delete your token id - what i posted was from the earlier webpage sample json. Yours look like the real deal. In that case please delete asap.

Good, now we both can enjoy Siri enabled Smartthings. Cheers!

0reactions
pburris67commented, Jan 5, 2018

closing to protect values in config samples

Read more comments on GitHub >

github_iconTop Results From Across the Web

NodeJS/mySQL - ER_ACCESS_DENIED_ERROR Access ...
I have the same problem, I solved it by changing the password to empty string. var mysql = require('mysql'); var connection = mysql....
Read more >
Node.js v19.3.0 Documentation
If asyncFn is a function and it throws an error synchronously, assert.doesNotReject() will return a rejected Promise with that error. If the function...
Read more >
How to resolve NPM proxy issue whilel running node JS ...
1. proxyname you need to check with your company network team. Enter that proxy URL in above two values. 2. If your password...
Read more >
Troubleshooting - SAP Capire
How Do I Resolve Installation Issues with Node.js and NPM? Check the registry settings of your npm configuration. Make sure that you don't...
Read more >
MAC Filtering in Computer Network - GeeksforGeeks
If the MAC address is on both the allowed and denied list then it will be denied the service.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found