npm Community Forum (Archive)

The npm community forum has been discontinued.

To discuss usage of npm, visit the GitHub Support Community.

Homebridge PS4 Config - help!

For my first ever post, apologies but a programming Noob…

I know I am close as I can get individual aspects working (i.e one accessory/platform) at a time.

Expected Behaviour -

Installed Homebridge on RPi 3B+. Connected HB to my LG TV and have multiple switches to jump between TV Sources and power device on and on… this works great.

Issue is when I am trying to add a second device. In this case my PS4 Pro. I have tried multiple versions of config.json that have appeared good on JSONLint, but the behaviours within Homebridge outputs vary.

I suspect showing the code I have it will be immediately obvious to anyone with a modicum of experience over myself. I thank you for your time.

In summary - I want to keep my LG TV Switches in Home and I want a switch for my PS4. (I have installed all packages requried (CmdSwitch / Waker etc…)

“bridge”: {
“name”: “Homebridge”,
“username”: “CXXXXXXXXXXXX”,
“port”: “XXXXX”,
“pin”: “031-45-XXX”

"description": "This is an example own configuration file containing devices you actually own.",

"platforms": [{
		"platform": "cmdSwitch2",
		"name": "CMD Switch",
		"switches": [{
				"name": "Playstation 4",
				"on_cmd": "ps4-waker -d",
				"off_cmd": "ps4-waker -d standby",
				"state_cmd": "ps4-waker -d search | grep -i '200 Ok'",
				"polling": true,
				"interval": 5,
				"timeout": 2000,
				"manufacturer": "Sony Corporation",
				"model": "CUH-7016B",
				"serial": "XXXXXXXXXXXX"

			"accessories": [{
				"accessory": "webostv",
				"name": "lgtv",
				"ip": "",
				"mac": "DXXXXXXXXXXXXX",
				"keyFile": "/home/pi/.homebridge/lgtvKeyFile",
				"pollingEnabled": true,
				"appSwitch": [

This board is for npm-related support issues. I’m moving this somewhere more relevant.