Setting up a Hue Tap Switch

Update 2019-12-08: While the bridge until now has ignored all attempts from me to pair the Tap Switch, it suddenly changed its opinion after it was restarted recently.

After the restart, the bridge paired with the Tap Switch immediately (empty POST to /sensors, press button on Tap Switch according to Zigbee-channel for 10+ seconds while monitoring pairing via GETs to /sensors/new)

The bridge detected the Tap

{
 "8": {
 "name": "Hue tap switch 1"
 },
 "lastscan": "2019-12-08T12:01:29"
}

and added this config to /sensors

{
 "state": {
 "buttonevent": null,
 "lastupdated": "none"
 },
 "config": {
 "on": true
 },
 "name": "Hue tap switch 1",
 "type": "ZGPSwitch",
 "modelid": "ZGPSWITCH",
 "manufacturername": "Philips",
 "uniqueid": "00:00:00:00:00:45:xx:xx-xx"
}

After it was added, it detected the first buttonpress without issues (event 34), but since then absolutely NO buttonpresses on the Tap switch have been registered on the bridge. No idea why.

I have tried pressing hard and softer (always click’ing), long and doubled – all to no effect.


Original pairing instructions

I tried to follow instructions from here

Reddit

Following instructions, holding button down for 10+ seconds, then click again to “verify the switch works” and nothing happens.

On this video, it works

Which button to hold depends on your ZigBee channel:

  • ZigBee channel: 11 = button 1
  • ZigBee channel: 15 = button 2
  • ZigBee channel: 20 = button 3
  • ZigBee channel: 25 = button 4

Any device has to initially be within 1 metre of the bridge to first pair it.

and from here

Reddit
Button 3 depressed for 10 seconds puts them in pairing mode.
The TAP switch doesn’t need to be reset, it is using Zigbee Green Power protocol and to reconnect it with another Hue bridge you just have to follow the commision instuctions in the Hue app to pair it with another Hue bridge……

It cannot connect directly to Smart Things Hub, because that one doesn’t support Zigbee Green Power protocol (yet?).


9to5mac
Cnet
huetips


Dissecting the Hue Tap Switch


No constant connection and some Zigbee discussions


https://huetips.com/tutorials/how-to-add-a-hue-tap/#b57845a1eb852f4b2

Press and hold for 10 seconds the button it tells you to on the screen. The button will be different every time you connect a new Hue Tap. Make sure you press down hard enough to where the Tap makes a click sound.

The hue tap uses a zigbee transmitter like your bulbs, make sure you are within a few feet of your bridge and are pressing down the button all the way until it clicks and hold it for 10 or 12 seconds.


New SFTP adapter in Biztalk 2016

WCF WinSCP-based SFTP Adapter

Since Microsoft now supplies a SFTP Adapter with Biztalk Server 2016, we thought we might as well try it out instead of using the Blogical one (which we have had several problems with).

It is relatively straightforward to use it in static sendports and receivelocations – the only thing we miss, is a possibility to use temporary filenames during transmission, which it does not support – only temporary folders.

However, it does not seem to be documented how to use the adapter in a dynamic sendport (at least, we have been unable to find it)

As documented, the SFTP Adapter uses the WinSCP program to do its actual work and specifically, it requires the WinSCPnet.dll to do its work.

Microsoft have implemented the WCF adapter in this DLL which wraps the calls to WinSCP.

C:\Program Files (x86)\Microsoft BizTalk Server 2016\Microsoft.BizTalk.Adapter.Sftp.dll – Assembly version 3.0.1.0

The Adapter loads the WinSCPnet DLL in the class SftpHelper.

The dynamic properties can be found in the class SftpOutputChannel Method AddPropertiesFromMessageContext.

Context Property Description
http://schemas.microsoft.com/BizTalk/2012/Adapter/sftp-properties#ClientAuthenticationMode this.sendPropertyBag.ClientAuthenticationMode = (ClientAuthenticationMode) Enum.Parse(typeof (ClientAuthenticationMode), property.Value.ToString());

enum Password, PublicKeyAuthentication, MultiFactorAuthentication

http://schemas.microsoft.com/BizTalk/2012/Adapter/sftp-properties#UserName Either specify UserName and Password, or specify a keyfile in PrivateKeyFile
http://schemas.microsoft.com/BizTalk/2012/Adapter/sftp-properties#Password Password
http://schemas.microsoft.com/BizTalk/2012/Adapter/sftp-properties#PrivateKeyFile Full path to Private Key
http://schemas.microsoft.com/BizTalk/2012/Adapter/sftp-properties#PrivateKeyPassword Password to the private key, if it is password protected
http://schemas.microsoft.com/BizTalk/2012/Adapter/sftp-properties#AccessAnyServerHostKey If False, host fingerprint must be specified. If True, all hosts will be accepted
http://schemas.microsoft.com/BizTalk/2012/Adapter/sftp-properties#SSHServerHostKeyFingerPrint Specify the fingerprint of SSH servers HostKey, if “AccessAnyServerHostKey” is False
http://schemas.microsoft.com/BizTalk/2012/Adapter/sftp-properties#AppendIfExists If False, transfer will fail if a file with the filename already exists. If True, the contents will be appended to the existing file

We have not been able to make the “AppendIfExists” work. If this property is true, the adapter issues a get command for the filename, and if the file does not exist yet (first transfer), then the transmission fails.

http://schemas.microsoft.com/BizTalk/2012/Adapter/sftp-properties#TargetFileName The name of the file created on the SFTP server. You can use the macros specified below
http://schemas.microsoft.com/BizTalk/2012/Adapter/sftp-properties#TemporaryFolder this.sendPropertyBag.TemporaryFolder = property.Value.ToString();
http://schemas.microsoft.com/BizTalk/2012/Adapter/sftp-properties#ProxyAddress Address of a proxy-server, if you need to use one, or blank.
http://schemas.microsoft.com/BizTalk/2012/Adapter/sftp-properties#ProxyUserName Username and password for the proxy-server, or blank if they are not needed
http://schemas.microsoft.com/BizTalk/2012/Adapter/sftp-properties#ProxyPassword
http://schemas.microsoft.com/BizTalk/2012/Adapter/sftp-properties#ProxyPort Port for the proxy-server
http://schemas.microsoft.com/BizTalk/2012/Adapter/sftp-properties#ProxyType this.sendPropertyBag.ProxyType = (Microsoft.BizTalk.Adapter.Sftp.ProxyType) Enum.Parse(typeof (Microsoft.BizTalk.Adapter.Sftp.ProxyType), property.Value.ToString());

enum None, SOCKS4, SOCKS5, HTTP

http://schemas.microsoft.com/BizTalk/2012/Adapter/sftp-properties#EncryptionCipher this.sendPropertyBag.EncryptionCipher = (EncryptionCipher) Enum.Parse(typeof (EncryptionCipher), property.Value.ToString());

enum Auto, AES, Arcfour, BlowFish, TripleDES, DES

http://schemas.microsoft.com/BizTalk/2012/Adapter/sftp-properties#Log this.sendPropertyBag.Log = property.Value.ToString();
http://schemas.microsoft.com/BizTalk/2003/system-properties#OutboundTransportLocation Contains the full EndPointAddress of the server – on the form sftp://servername:port

this.ParseSftpUrl(property.Value.ToString());

OutboundTransportLocation needs to be ‘sftp’ (case insensitive compare)

Supported macros

Macro Value
Use fixed context-property
%MessageID% http://schemas.microsoft.com/BizTalk/2003/system-properties#BizTalkMessageID
%SourceFileName% http://schemas.microsoft.com/BizTalk/2003/file-properties#ReceivedFileName
Use the macro as the name of a context-property
Use the contextproperty with the namespace namespace http://schemas.microsoft.com/BizTalk/2003/system-properties# with the macroname (nix the percent-signs) appended
%DestinationParty%
%DestinationPartyQualifier%
%SourceParty%
%SourcePartyQualifier
These macros formats either DateTime.Now or DateTime.UtcNow in the specified format
%datetime% yyyy-MM-ddThhmmss
%datetime_bts2000% yyyyMMddhhmmssf
%datetime.tz% yyyy-MM-ddThhmmsszzz
%time% hhmmss
%time.tz% hhmmsszzz