maddox / harmony-api

🗼 A simple server allowing you to query/control multiple local Harmony Home Hubs over HTTP or MQTT
MIT License
393 stars 115 forks source link

Running the API on Windows 10 with/without docker #90

Open code-in-progress opened 6 years ago

code-in-progress commented 6 years ago

Hey gang,

So, over in the Smartthings community, we have a number of members that are trying to get this running using a straight node.js approach on Windows 10. We have one member that managed to get it running on a Win8.1 Pro machine, but no one on Win10 has been able to get it past the "Starting Discovery" phrase. Even with the firewall turned off, it still refuses to get past the initial discovery phase.

I'm wondering if anyone has been able to get this successfully running on a Windows 10 machine and if so, how?

pdlove commented 6 years ago

I had issues with the UDP broadcast not working properly. To resolve this I had to specify my broadcast address in the code. I'll see about a more elegant solution to this later. when harmonyHubDiscover is initialized, put your broadcast address in an object on the second parameter. In my case, my router is 192.168.1.1 with a subnet of 255.255.255.0 so my broadcast address is 192.168.1.255 https://github.com/maddox/harmony-api/blob/72fe0ecaba42e2480fa1a4b468e144df7df46845/app.js#L56

App.js Line 56 was changed to this: var discover = new harmonyHubDiscover(61991, {address: '192.168.1.255'})