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

Discover does not find hub #92

Open dok18 opened 6 years ago

dok18 commented 6 years ago

harmony-api is running on 192.168.0.33 hub is on 192.168.0.33.35

harmony-api is running on Raspberry-PI with Raspbian:

pi@raspi:~/harmony-api $ script/server
warn:    --minUptime not set. Defaulting to: 1000ms
warn:    --spinSleepTime not set. Your script will exit if it does not stay up for at least 1000ms
Starting discovery.
'[2018-03-25T17:04:34.453Z] - ::ffff:127.0.0.1 - GET /hubs 500 2.764 ms - 32b
pi@raspi:~/harmony-api $ curl http://127.0.0.1:8282/hubs
{"message":"No hubs available."}

I can ping hub:

pi@raspi:~/harmony-api $ ping 192.168.0.35
PING 192.168.0.35 (192.168.0.35) 56(84) bytes of data.
64 bytes from 192.168.0.35: icmp_seq=1 ttl=64 time=3.26 ms
64 bytes from 192.168.0.35: icmp_seq=2 ttl=64 time=1.20 ms

There is no firewall.

This is my config.json:

pi@raspi:~/harmony-api $ cat config/config.json 
{
  "enableHTTPserver": true,
  "mqtt_host": "mqtt://127.0.0.1",
  "topic_namespace": "harmony-api",
  "hub_ip": "192.168.0.35",
  "mqtt_options": {
      "port": 1883,
      "username": "someuser",
      "password": "somepassword",
      "rejectUnauthorized": false,
      "hub_ip": "192.168.0.35"
  }
}

I tried adding hub_ip directly to config.json without any success.

How can I debug this? Do I have to enable something in my local network? Do I have to enable something in the hub?

Thanks.

dok18 commented 6 years ago

Anyone?

dldd17 commented 6 years ago

if you use docker - you must run with --net=host option

dok18 commented 6 years ago

no docker.

jonhanford commented 6 years ago

Have you tried flushing iptables? Looking through earlier issues, the network should support UPNP and Multicast.

Kevincoenen commented 5 years ago

Did you ever find a solution for this problem? As of today one of my two hubs isn't discovered by the Software. I restarted the harmony-api and the Harmony Hub, but unfortunately without success. I am able to ping the Hub, and trying the Software on a other PC gives the same result. Using "HarmonyHubControl" and using the IP of the Hub I'm able to give commands, so the Hub is function correctly.

bgnt44 commented 5 years ago

Same issue here, it shows up for a second if i restart the hub but disappear right after

Kevincoenen commented 5 years ago

Same issue here, it shows up for a second if i restart the hub but disappear right after

I resolved this issue by performing a full factory reset of the Hub, and re-adding it to my account. Until now the Hub seems te be working correct.

https://support.myharmony.com/en-us/how-to-factory-reset-your-harmony#resetHub

bgnt44 commented 5 years ago

Thanks i will try as soon as im home, in the meantime, whats the correct config syntax to explicitly set hub ip ?