Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when discovery is enabled #17

Open
BNWEIN opened this issue Jan 29, 2019 · 8 comments
Open

Error when discovery is enabled #17

BNWEIN opened this issue Jan 29, 2019 · 8 comments

Comments

@BNWEIN
Copy link

BNWEIN commented Jan 29, 2019

Hi.

With discovery enabled I am getting the below error. When I disable discovery the plugin works fine

2019-1-29 20:01:44] [MagicHome-Platform] Discovering Devices Error: spawn UNKNOWN at _errnoException (util.js:1022:11) at ChildProcess.spawn (internal/child_process.js:323:11) at exports.spawn (child_process.js:502:9) at LightAgent.getDevices (C:\Users\Administrator\AppData\Roaming\npm\node_modules\homebridge-magichome-platform\src\lib\lightAgent.js:143:17) at LightAgent.startDiscovery (C:\Users\Administrator\AppData\Roaming\npm\node_modules\homebridge-magichome-platform\src\lib\lightAgent.js:68:12) at new MagicHome (C:\Users\Administrator\AppData\Roaming\npm\node_modules\homebridge-magichome-platform\src\magichome.js:37:14) at Server._loadPlatforms (C:\Users\Administrator\AppData\Roaming\npm\node_modules\homebridge\lib\server.js:326:32) at Server.run (C:\Users\Administrator\AppData\Roaming\npm\node_modules\homebridge\lib\server.js:86:36) at module.exports (C:\Users\Administrator\AppData\Roaming\npm\node_modules\homebridge\lib\cli.js:45:10) at Object. (C:\Users\Administrator\AppData\Roaming\npm\node_modules\homebridge\bin\homebridge:17:22) �

Any advice would be appreciated

Thanks

@BNWEIN
Copy link
Author

BNWEIN commented Jan 30, 2019

Hi.

Sorry, i was typing the above on my mobile. I am now at a computer so have included my config file below

When i change "disableDiscovery" to false, this is when i have the error above.

{
"platform": "MagicHome-Platform",
"debug": true,
"disableDiscovery": true,
"lights": [
{
"name": "TV Unit LED Strip",
"ip": "192.168.0.15",
"setup": "RGB",
"purewhite": false,
"timeout": 0
}
],
"presetSwitches": [
{
"name": "TV Unit Flash (Party)",
"ips": {
"192.168.0.15": "255,255,255"
},
"preset": "seven_color_strobe_flash",
"speed": 60
}
]
},

@FeBe95
Copy link

FeBe95 commented Mar 5, 2019

Are you working on windows? I fixed it by changing

this.proc = spawn('python', [cmd, '-s'])

in the lightAgent.js file. I think its because windows doesn't know shebangs like linux does

@Jborn4christ
Copy link

I'm also on windows and changed the line in lightAgent.js but now am getting this error:
Error: spawn python ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19)
at onErrorNT (internal/child_process.js:456:16)
at processTicksAndRejections (internal/process/task_queues.js:84:9)

@Jborn4christ
Copy link

Nevermind, got it working. Great plugin

@muzzymate
Copy link

Thank you @FeBe95 .

I was able to edit the lightAgent.js file on my Windows 10 machine and Homebridge now launches without having to set the disableDiscovery to false.

@Khazanedar
Copy link

I'm also on windows and changed the line in lightAgent.js but now am getting this error:
Error: spawn python ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19)
at onErrorNT (internal/child_process.js:456:16)
at processTicksAndRejections (internal/process/task_queues.js:84:9)

Sorry, i know this is almost a year later, but what did you do to fix that error?

@canhtuongvinh
Copy link

I'm also on windows and changed the line in lightAgent.js but now am getting this error:
Error: spawn python ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19)
at onErrorNT (internal/child_process.js:456:16)
at processTicksAndRejections (internal/process/task_queues.js:84:9)

sorry for digging this but what did you do to solve that issue?

@abishek235
Copy link

I'm also on windows and changed the line in lightAgent.js but now am getting this error: Error: spawn python ENOENT at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19) at onErrorNT (internal/child_process.js:456:16) at processTicksAndRejections (internal/process/task_queues.js:84:9)

How did you fix this error, I am getting the same error

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

No branches or pull requests

7 participants