Hub version 1.1.0 changes for developers

capability updates:

/*
pressureMeasurement
driver def:
capability "PressureMeasurement"

commands:
none

attributes:
NUMBER pressure //sendEvent(name:"pressure", value:pressureValue)

app device list input type:
capability.pressureMeasurement

subscription:
subscribe(deviceList, "pressure", handlerMethod)
*/

/*
filterStatus
driver def:
capability "FilterStatus"

commands:
none

attributes:
ENUM filterStatus //sendEvent(name:"filterStatus", value: "normal" | "replace")

app device list input type:
capability.filterStatus

subscription:
subscribe(deviceList, "filterStatus", handlerMethod)
*/

/*
colorMode
driver def:
capability "ColorMode"

commands:
none

attributes:
ENUM colorMode //sendEvent(name:"colorMode", value: "CT" | "RGB")

app device list input type:
capability.colorMode

subscription:
subscribe(deviceList, "colorMode", handlerMethod)

Notes:
This capability is used within RGBW drivers to broadcast the devices current operating mode, CT: color temperature , or RGB
Devices that are RGBW capable should send the appropriate event when changing between modes.

*/

/*
securityKeypad
driver def:
capability "SecurityKeypad"

commands:
setCodeLength(maximumPinCodeLength)
setCode(codeNumber,pinCode,codeName)
deleteCode(codeNumber)
disarm()
armAway()
armHome()
setEntryDelay(delaySeconds)
setExitDelay(delaySeconds)

attributes:

ENUM		securityKeypad	//sendEvent(name:"securityKeypad", value: "disarmed" | "armed home" | "armed away" | "unknown")
JSON_OBJECT	lockCodes		//sendEvent(name:"lockCodes", value:'{"<codeNumber>":{"name":"<name>","code":"<pin code>"},"<codeNumber>":{"name":"<name>","code":"<pin code>"}}', isStateChange: true)
ENUM		codeChanged		//sendEvent(name:"codeChanged",value: "set" | "changed" | "deleted" | "failed",data:['"<codeNumber>":{"name":"<name>","code":"<pin code>"}'], isStateChange: true)
NUMBER		maxCodes		//maximum number of codes supported by device
NUMBER		codeLength		//pin code lentgh	

app device list input type:
capability.securityKeypad

subscription:
subscribe(deviceList, , handlerMethod)

Notes:
-pin codes can be encrypted/decrypted using the encrypt() and decrypt() methods
-codeChanged events are sent for every device codeChanged event
-lockCodes consists of all the device configured lock code settings, this event is sent in addition to codeChanged.
*/

/*
changeLevel
driver def:
capability "ChangeLevel"

commands:
startLevelChange("up" | "down") //initiates a level change request from the devies current level given the provided direction
stopLevelChange() //terminates an in progress level change

attributes:
none

app device list input type:
capability.changeLevel

subscription:
none, no events are generated with this capability

Notes:
this capability is designed to be used in addition to setLevel for hold to dim release to stop implementations.
currently all HE provided dimeable drivers have been updated to include this capability.

*/

ReleasableButton : Hubitat's button implementation

updated / new methods

Application and Driver method encrypt/decrypt

String encrypt(String textToEncrypt)
String decrypt(String textToDecrypt)

Returns:
encrypted or decrypted text

Returns null if textToDecrypt cannot be decrypted

Examples:

//encrypt
def encryptedText = encrypt("encrypt this")
//decrypt
def decryptedText = decrypt(encryptedText)

Application method clearSetting

Void app.clearSetting("<inputName>")

Returns:
NA

Parameters:
input element name

Examples:

app.clearSetting("myInput")

Notes:
clearSetting essentially re sets the given input, allowing any defaultValue to be re-applied upon the next application page rendering.

Application method extension for updateSetting

Void app.updateSetting("<deviceInputName>",[type:"capability",value:[<list of device Ids>]])

Returns:
NA

Parameters:
input element name, must be of type: "capability.xxxx"
type: "capability" //fixed
value: List of Integers, or an empty list.

Examples:

app.updateSetting("myDeviceList",[type:"capability",value:[1,2,3]])  //selects devices in myDeviceList with device Id's 1, 2, 3
app.updateSetting("myDeviceList",[type:"capability",value:[]])  //de-selects any previously selected devices
6 Likes

Mike,

Thanks for the documentation. That helps a lot. I just need my recent order of Pico remotes to show up so I can start messing around with the new 'ReleasableButton' and start/stop dimming commands.

Thanks,
Dan

@mike.maxwell I'm trying to incorporate the changelevel into my BC app but when set the input to capability.changeLevel it doesn't find any devices. I have Lutron Caseta dimmers, hue bulbs and A GE zwave plus dimmer ..all using the HE drivers. Am I missing the obvious?

Caseta wasn't tested, so this driver didn't get updated, nor the hue bridge devices (might not be possible)
All the remaining drivers should have them.

Understood...thanks for the clarification. My GE zwave wasn't using the Generic dimmer. I switched to that and it showed up. I did a startLevelChange(up) and a down and it worked. Seemed pretty fast though...like the full cycle was 2 seconds max. Any way to change the ramp rates to be more gradual?

depends on the device, many zwave devices have the default rate non adjustable.
So vs getting all device specific ect, I just let it be for round one.
Depending on demand and adoption it is something that could be investigated.

It's much easier to operate using a button controller, then even with a default 2 second ramp it's workable.

The video I had for these was using an app I wrote that used pushed for on/off, held for start level up/down, and released for stop level change.
This was then wired to a 2 button pico.

1 Like

@mike.maxwell

I see the color mode method has been updated. Does this mean the Fibaro RGBW device is coming soon?

Thanks

John

1 Like

Love the filterStatus capability! :grinning:

How would this capability be used with a thermostat? I have a separate app for filter status, which allows you to enter the fan run hours when the filter should be changed plus a button to reset the filter status, but having that part of the thermostat device would be much better.

Can't really put it there since not all hvac systems are forced air. I see this as being usefull within a differential pressure gage device implementation that monitors the pressure drop across the filter.

1 Like

Thanks so much for the documentation, @mike.maxwell!

For the pressure capability, is that meant to be used for atmospheric pressure, overpressure ("gauge" pressure, used for checking HVAC systems), sound pressure, or whatever the user sees fit to use it for?

I ask mainly because I'm trying to decide whether it's appropriate to add the capability the Xiaomi Aqara Temp/Humidity sensor device driver.

this one would be for anything except soundPressure (SPL) that would be a separate capability.
So yeah, air pressure, absolute, atmospheric, gauge, differential whatever.
Units were not specified, so they should be included within the event, ie KPa, PSI, In ect...

2 Likes

Sorry if I'm being obtuse, but like this?

sendEvent(name:"pressureMeasurement", value:pressureValue, units:"KPa")

yup, exactly, except it's unit, not units.

1 Like

How can you encrypt() a setting input.
I see that I can encrypt("plainText") and decrypt("encryptedText").

I would like to encrypt the following:
input "password", "string", title: "Password", required: true

So that ${settings} doesn't disclose a password when used with logging, etc.

@mike.maxwell

We don't have an input that will do that, I would encrypt it to a state var than clear the input after that using app.clearSetting("input name")

1 Like

Ok. Thank you for the response and recommendation.

on ST the format seems to be:
capability "Temperature Measurement"

so use "PressureMeasurement" or "Pressure Measurement" on HE?

thank you.

spaces are removed, either will work, in the end if you don't get the name right the editor will complain...

1 Like

for this snippet:

    ifDebug("$k, [type: $t, value: $v]")
    app.updateSetting(k, [type: "$t", value: "$v"])

this is the debug output:

    roomButton2, [type: capability, value: [30B1]]

but the update setting doesnt seem to be setting that input. what am i doing wrong? :slight_smile:

thank you.

30b1 is not a device id