lukasroegner / homebridge-philips-hue-sync-box

Homebridge plugin for the Philips Hue Sync Box.
MIT License
55 stars 12 forks source link

HTTP Server unreachable #2

Closed Garulf closed 4 years ago

Garulf commented 4 years ago

My get requests to the /state endpoint fail with no response from server. No errors reported in logs... Homebridge is running on a Synology NAS in a docker container with host networking.

Tested by using curl command from within the container:

curl 'http://127.0.0.1:51222/state' -H 'Authorization: EZTo9eauX6PquMbygDriqykxcNddL3puFvA4cWHrcAiRVsFWb6GFqNBjcyNwgiUr='

curl: (7) Failed to connect to 127.0.0.1 port 51222: Connection refused

config:


"platforms": [
        {
            "platform": "PhilipsHueSyncBoxPlatform",
            "syncBoxIpAddress": "10.0.0.XXX",
            "syncBoxApiAccessToken": "XXXXX",
            "defaultOnMode": "video",
            "defaultOffMode": "passthrough",
            "isApiEnabled": true,
            "apiPort": 51222,
            "apiToken": "EZTo9eauX6PquMbygDriqykxcNddL3puFvA4cWHrcAiRVsFWb6GFqNBjcyNwgiUr="
        }
]
lukasroegner commented 4 years ago

Can you provide the complete URL you are using for the request?

Garulf commented 4 years ago

http://127.0.0.1:51222/state

With header: Authorization: EZTo9eauX6PquMbygDriqykxcNddL3puFvA4cWHrcAiRVsFWb6GFqNBjcyNwgiUr=

lukasroegner commented 4 years ago

I cannot see an obvious issue. I testet the port and token that you use, works fine for me. Is there any issue with using 127.0.0.1 from within the container? Have you also tried localhost or 0.0.0.0?

Garulf commented 4 years ago

Couldn't tell you what fixed it, but after updating your package via NPM, my curl command posted above works!

Thanks for creating this wonderful plugin. Makes Using the Hue Sync box simple as asking Siri.