8 posts / 0 new
Last post
wvuyk
How to use the touchplink procedure with the new API?

normally I am using the touchlink procedure to move lights during tests of my app by using serial numbers. Comes in handy when using a 'clean' bridge.

With the new touchlink process I do not see the possibility anymore to add the serial number through my own program. I know it is still possible with the Philips hue app, but how can I do this myself, so I can use my text file instead of typing all the serial numbers by hand?

 

Wim

Developers Support
How to use the touchplink procedure with the new API?

Hi Wim,

The new touchlink attribute just replaces the old [Link, Touchlink] telnet command (which adds the lights to the ZigBee network).  For using the Serial Numbers this hasn't changed,  it is part of the Search For new Lights, 1.3.2  http://www.developers.meethue.com/documentation/lights-api#13_search_for_new_lights . This is what the Philips Hue App would use. I don't think there is any relation between the Touchlink process and Serial Numbers as far as I know.

Hue Support - Steve

wvuyk
Getting old

Steve,

You are right. I did use the same in the past with a simple script to be able to quickly load a few lights on a bridge. I got triggered by the touchlink chnges and this mind of me did not remind me that I did different in the past indecision

Thanks for pointing me in the right direction again!

 

Wim

peter.detzner
Touchlink Key-Value in /api/<username>/config

Hello,

 

when I am receiving the configuration by calling the "/api/<username>/config", there is no parameter "touchlink". Am I doing something wrong?!

Regards,

P.

Developers Support
Touchlink Key-Value in /api/<username>/config

Hello Peter,

Good point,  no you are not doing something wrong, I was sorry, so my apologies for this.  The touchlink parameter is Write Only so it is not visible when you perform a get on the /config.  It is only writable (for Bridges 1.9 or higher).  I have just seen that in the Config API I had mentioned this was available in the Get Config (in 7.2.2), this is wrong!.  I have removed this, and modified the description (in 7.3.2 Modify Configuration) to make this clearer.

Hue Support - Steve

peter.detzner
Touchlink Key-Value in /api/<username>/config

Hey Steve,

 

thanks for your fast reply! The current Philips Hue Java SDK doesnt support to set the touchlink parameter directly, right? Is there a way to create a custom HTTP Put request through the SDK or would you recommend to do it another way?!

 

Peter

Developers Support
Touchlink Key-Value in /api/<username>/config

Hey Peter,

No problem.   yes currently the public Java SDK does not support touchlink as it is currently up to API level 1.8, and in the SDK there is no way to create custom HTTP requests (which would be a nice feature of course).  The Java SDK was not updated as there are not too many changes which are usefull for 3rd party developers in 1.9 and 1.10  (See: http://www.developers.meethue.com/documentation/changelog   - Login Required).   However, saying that if there is a need to touchlink in the Java SDK then I can push for that.  I will discuss with my colleagues and see if I can get approval for releasing a new Java SDK soon, maybe later in the week.   I will let you know within a day or so.  

The only other alternative is for you do do it using HTTP,  but of course mixing the Java SDK and HTTP Rest requests kinda defaults the purpose of using the Java SDK.

Hue Support - Steve

edit Have had approval for Java SDK release.  I will try and get this done in the next few days.  Update: I have written the code for the 1.9 and 1.10 API features in the Java SDK.  Needs some testing but should be good for a release next Monday or Tueday.

Developers Support
How to use the touchplink procedure with the new API?

FYI - Today I released the 1.10 Java SDK.

Touchlink is now supported.  To do this in the Java SDK you would do the following.

PHBridgeConfiguration config = new PHBridgeConfiguration();
config.setTouchlink(true);
            
bridge.updateBridgeConfigurations( config, new PHBridgeConfigurationListener() { . . . . 

It's worth pointing out that this should be used with some caution and some user-friendly instructions if you use this in an app.  The touchlink process steals the nearest light (I think within around up to 1m to the bridge but not 100% on this) so of course if you have multiple bridges with lights paired on each, you may accidently find yourself stealing lights from other bridges.

Hue Support - Steve

 

 

Log in or register to post comments