homebridge: nodejs rejects my username/MAC address -- SOLVED!

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

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 37

Most upvoted comments

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!