0

I am using HUE-Emulator to view the changes.Emulator is running on port 80.

Currently I am only able to view the details using browser.(API calls)

Now I want to switch off and switch on the lights using my app.But my code doesn't detect the bridge. I am not using any physical device. I am running my app in simulator.

Code I am using to find Bridges

- (void)viewDidLoad {
[super viewDidLoad];

self.phHueSDK = [[PHHueSDK alloc] init];

[self.phHueSDK enableLogging:YES];

// Call startUpSDK which will initialize the SDK
[self.phHueSDK startUpSDK];

self.bridgeSearch = [[PHBridgeSearching alloc] initWithUpnpSearch:YES andPortalSearch:YES];

// Start search for bridges
[self.bridgeSearch startSearchWithCompletionHandler:^(NSDictionary *bridgesFound) {

    NSLog(@"sadsdsa %@",bridgesFound);   //Logs Null
}];

 }

Links to Screen shots of my emulator to show everything works fine.

Screenshot

Config I am getting:

http://pastebin.com/wzreYSng

dlamblin
  • 43,965
  • 20
  • 101
  • 140
Dalvik
  • 217
  • 1
  • 2
  • 12
  • Please update the question with the config you get after opening `http://localhost:8000/api/newdeveloper` – ZeMoon Apr 01 '15 at 10:53

1 Answers1

0

If you read the docs from the Hue Emulator, you will notice that BridgeSearch will work only when the bridge emulator is running on port 80.

The relevant part from the config you posted is as follows:

"config":{  
      "portalservices":false,
      "gateway":"192.168.2.1",
      "mac":"00:00:88:00:bb:ee",
      "swversion":1005215,
      "linkbutton":false,
      "ipaddress":"192.168.2.13:8000",
      "proxyport":0,
      "swupdate":{  
         "text":"",
         "notify":false,
         "updatestate":0,
         "url":""
      }

You can directly connect to the bridge emulator using the code:

[self.phHueSDK setBridgeToUseWithIpAddress:@"192.168.2.13:8000" macAddress:@"00:00:88:00:bb:ee"];

I would suggest you download the sample iOS application provided by PhilipsHue and try it out.

ZeMoon
  • 20,054
  • 5
  • 57
  • 98