SteveyO / Hue-Emulator

A Bridge API Emulator for the Philips Hue (Personal Wireless System)
165 stars 41 forks source link

How to control from Android app #39

Open Slasherss1 opened 6 years ago

Slasherss1 commented 6 years ago

I have android, local network, port 80 (start clicked already)

Phone says "Can't find new hue bridge"

rkkoszewski commented 5 years ago

Same here. I get a message in the console "/api/nouser/config" whenever I'm searching in the android app for the Hue Bridge. They probably upped the minimum required version of the API that can be used with the application.

EDIT: So I mapped "/api/nouser/config" to "/api/config" and now the android app is able to find the Hue Emulator Bridge, altough after discovery the app inmediately crashes, probably due to an unexpected state, or missing information in the "config" response, as no other responses are made before the crash.

lefds commented 5 years ago

Dear all,

after spending some hours over the same issue I find out the solution:

  1. Get the default json config: http://localhost/api/newdeveloper/config_
  2. Add the "nouser" to the whitelist (the config.json file is attached to this post)
  3. Launch the emulator with the config.json as its single command line argument: java -jar HueEmulator-v0.8.jar config.json Now the Philips Hue app on my physical Android find out the bridge (after clicking over it on the emulator), enabling me to control the lamps from the smartphone. Remarks:
    • run the command with root/administrator privileges so that it can use TCP port 80
    • if running the emulator inside a virtual machine (as I did) remember to setup a bridged network interface

config.zip