[PORT] AXIS Gear Driver

Just updated my Github with V5, seems to work pretty good.

  • adjusted driver to work with Hubitat
  • added logging toggle
  • added importURL

Be sure your device is also up to date.

4 Likes

This is great bptworld! I'm actually using a slightly modified version of the 5.1 driver (I basically commented out a capability line and one of the metadata lines - no idea if this is messing anything up but everything seems to work... I'm no programmer)

I had a couple questions:

  1. Overall these drivers work well but I've found that they aren't compatible with the "Shades" dashboard template (slider doesn't work) - do you know if this is an issue with the driver or the template itself? If you use a "dimmer" template it works as expected.

  2. There is a pretty significant firmware update for AXIS that supports ZigBee 3.0 and firmware updates in smarthome mode - do you know if this will need updated drivers to support? I apologize if this is obvious, I am still very new to Hubitat and home automation in general.

Again thanks for what you've done already - the Hubitat community is great!

BTW First post after a year of lurking so let me know if any - love Hubitat!

After updating I couldn't get the shade to work again. Tried to do the zigbee re-pairing with the logs open (didn't delete device) and it found it again but still couldn't move the shade.

Woke up this morning and the shade was in the 'morning' position! Sent a command to it and it now works again. Don't know why but I'll take it!

Good to know - I'll try the update on the 8 gears I have and report back.

bptworld - How exactly do you do a re-pair without removing and re-adding the gears (which I REALLY don't want to do due to all the automations associated with the shades)? Is it the same thing as a ZigBee heal (turn off hub for 15 minutes and turn back on)?

I updated yesterday and am having the same issues you did. Tried everything (turn devices off and on, hub off and on (not 15 minutes), etc.) short of re-pair/Zigbee Heal/remove and re-add.

Thanks in advance,

Felipe

The instructions are the forum somewhere but this is a summary... This works for any Zigbee device

  • Open the Zigbee log in one browser tab ('Settings', 'Zigbee Details', 'Zigbee Logging')
  • Go to 'Devices, 'Discover Devices', in another browser tab
  • Be sure to be next to your Zigbee device at this point
  • Click on 'Zigbee', starting the timer
  • Press the 'pair' button on the device (every brand device is a little different on this part)
  • Watch the screen, you will see device found and if you jump over to the zigbee log tab, you will see the zigbee device sending data again.

Hope this helps.

1 Like

Gotcha - simple enough (and will try and search the forums more thoroughly in the future before asking). Will give it a shot.

Thanks for the quick response!

No problem, hopefully you get it going again. I did the process above but it didn't start working until sometime over the night. Zigbee is funny like that, sometimes it takes a while.

Hey, just wanted to say that it worked (and immediately for me)!

Thanks again for saving me from having to remove and re-add (and showing me a new trick)

EDIT: Also, shameless plug - I posted in the feature request section (Driver Support for AXIS Gear) for official driver support for the AXIS Gear - anyone who stumbles upon this thread should go over and vote for support!

1 Like

In case there are others using this.

There was an updated driver released in Nov. I have updated the ported code to use the new release, and I put in a few fixes that had been bugging me.

  • the level attribute is the attribute required to adjust the window shade position. However, the Window Shade capability uses the position attribute. I created a function call setPosition and had it call the setLevel function.
  • Removed "Switch Level" capability. To expose level attributes, the "Switch Level" capability was used. This caused 2 devices to be created in apps like Homebridge. One device was a light with dimmer and the other was a window shade. The light entity was functional but the window shade was not. You should now only see the correct entity in Homekit.

I have updated the code and submitted a pull request to merge the updates. If you want to update now, you can check out the code here:

Thanks, pull request has been merged.

Thanks again, @cofin

1 Like

@cofin, may be I misunderstood your first bullet point about Level versus Position.

I have a rule that references the sun's position to determine whether to open or close my blinds. I noticed two odd behaviors:

  1. The windowShade state stays on Opening or Closing even after the blind is fully opened or closed, until I do a Refresh of the device. Not a biggie, but just seems odd. Didn't think Zigbee had state reporting issues like old Z-wave does. Is this a device driver issue?

  2. In RM, when I check current Level or current Position in a conditional statement, the device doesn't report either value. Which is weird -- because when I go into the device details page, the Level state also shows up correctly.

Any ideas?

Hi @bptworld,

I've been using your v5 driver for several months now, and it mostly works, but I was getting some weird behaviour on some functions (stop, version, didn't work), and I think I've figured it out.

I'm guessing that Hubitat changed their map parsing at some point, but I tracked the problem down to the Parsing function of the version.

I seem to have fixed the version parsing function and I added parse for the OnOff status as well, because ignoring attribute was bothering me.

else if (descMap.clusterInt == CLUSTER_BASIC && descMap.attrInt == BASIC_ATTR_SWBUILDID) {
	// Hubitat now seems to be converting the software version to a proper character string:  ex: 102-5.3.5.1122
	resultMap.name = "version"
	def versionString = descMap.value
	
	StringBuilder output = new StringBuilder("")
	//StringBuilder output2 = new StringBuilder("")

	if(logEnable) log.debug "parseReportAttributeMessage() --- SWBuildID: $versionString"		
	
	String output2 = versionString.substring(versionString.length() - 4)
	
	//for (int i = 0; i < versionString.length(); i += 2) {
	//	String str = versionString.substring(i, i + 2)
	//	if(logEnable) log.debug "parseReportAttributeMessage() --- SWBuildID (Substring): $str"
	//	output.append((char) (Integer.parseInt(str, 16)))   
	//	if (i > 19) {
	//		output2.append((char) (Integer.parseInt(str, 16)))
	//	}
	//} 
	
	//def current = Integer.parseInt(output2.toString())
	def current = Integer.parseInt(output2)
	state.currentVersion = current
	//resultMap.value = output.toString()   
	resultMap.value = versionString   
}
else if (descMap.clusterInt == CLUSTER_ONOFF && descMap.attrInt == ONOFF_ATTR_ONOFFSTATE) {
	resultMap.name = "onoff"
	def onOff = Integer.parseInt(descMap.value, 16)
	resultMap.value = onOff
	//if(logEnable) log.debug "parseReportAttributeMessage() --- Power OnOFF: $descMap.attrInt $descMap.attrInt"
}

Now I'm trying to figure out why one of my Axis units keeps reporting a battery fluctuation which is clogging my logs. (from 29-32)

@bptworld hey Bryan, I've used this app for awhile now. It works the vast majority of the time, but I noticed a gear will fail to trigger and the app will throw off errors in the log sometimes when I am opening and closing blinds from RM. Can you or anyone help me interpret these errors? I've pasted a couple examples from the logs below.

Here's a curtain that didn't like something a few minutes ago:
dev:1832020-05-07 04:19:43.427 pm errorjava.lang.NumberFormatException: For input string: "0-" on line 364 (parse)

dev:1832020-05-07 04:19:43.400 pm debugparse() --- description: read attr - raw: F826010000260040420E3130302D352E332E352E31313232, dni: F826, endpoint: 01, cluster: 0000, size: 26, attrId: 4000, encoding: 42, command: 01, value: 0E3130302D352E332E352E31313232

dev:1832020-05-07 04:19:43.206 pm debugparse() --- returned: [name:battery, value:33]

dev:1832020-05-07 04:19:43.205 pm debugparseDescriptionAsMap() --- Battery: 33

dev:1832020-05-07 04:19:43.199 pm debugparse() --- description: read attr - raw: F8260100010A21002042, dni: F826, endpoint: 01, cluster: 0001, size: 0A, attrId: 0021, encoding: 20, command: 01, value: 42

dev:1832020-05-07 04:19:37.567 pm debugparse() --- returned: [name:level, value:100]

dev:1832020-05-07 04:19:37.557 pm debugparse() --- description: read attr - raw: F8260100080A000020FE, dni: F826, endpoint: 01, cluster: 0008, size: 0A, attrId: 0000, encoding: 20, command: 01, value: FE

dev:1832020-05-07 04:19:37.473 pm errorjava.lang.NumberFormatException: For input string: "0-" on line 364 (parse)

dev:1832020-05-07 04:19:37.423 pm debugparse() --- description: read attr - raw: F826010000260040420E3130302D352E332E352E31313232, dni: F826, endpoint: 01, cluster: 0000, size: 26, attrId: 4000, encoding: 42, command: 01, value: 0E3130302D352E332E352E31313232

dev:1832020-05-07 04:19:27.508 pm errorjava.lang.NullPointerException: Cannot invoke method toJson() on null object on line 272 (configure)

dev:1832020-05-07 04:19:24.013 pm errorjava.lang.NullPointerException: Cannot invoke method toJson() on null object on line 272 (configure)

--- Loading Past Logs... ---

Here's one blind from the last half hour this afternoon:
dev:82020-05-07 04:31:12.261 pm errorjava.lang.NumberFormatException: For input string: "0-" on line 364 (parse)

dev:82020-05-07 04:31:12.251 pm errorjava.lang.NumberFormatException: For input string: "0-" on line 364 (parse)

dev:82020-05-07 04:31:12.242 pm debugparse() --- description: read attr - raw: 52FB010000260040420E3130302D352E332E352E31313232, dni: 52FB, endpoint: 01, cluster: 0000, size: 26, attrId: 4000, encoding: 42, command: 01, value: 0E3130302D352E332E352E31313232

dev:82020-05-07 04:31:12.221 pm debugparse() --- description: read attr - raw: 52FB010000260040420E3130302D352E332E352E31313232, dni: 52FB, endpoint: 01, cluster: 0000, size: 26, attrId: 4000, encoding: 42, command: 01, value: 0E3130302D352E332E352E31313232

dev:82020-05-07 04:31:12.197 pm errorjava.lang.NumberFormatException: For input string: "0-" on line 364 (parse)

dev:82020-05-07 04:31:12.171 pm debugparse() --- description: read attr - raw: 52FB010000260040420E3130302D352E332E352E31313232, dni: 52FB, endpoint: 01, cluster: 0000, size: 26, attrId: 4000, encoding: 42, command: 01, value: 0E3130302D352E332E352E31313232

dev:82020-05-07 04:31:07.002 pm debugparse() --- returned: [name:battery, value:33]

dev:82020-05-07 04:31:07.000 pm debugparseDescriptionAsMap() --- Battery: 33

dev:82020-05-07 04:31:06.993 pm debugparse() --- description: read attr - raw: 52FB0100010A21002042, dni: 52FB, endpoint: 01, cluster: 0001, size: 0A, attrId: 0021, encoding: 20, command: 01, value: 42

dev:82020-05-07 04:31:06.973 pm debugparse() --- returned: [name:level, value:100]

dev:82020-05-07 04:31:06.966 pm debugparse() --- returned: [name:level, value:100]

dev:82020-05-07 04:31:06.963 pm debugparse() --- description: read attr - raw: 52FB0100080A000020FE, dni: 52FB, endpoint: 01, cluster: 0008, size: 0A, attrId: 0000, encoding: 20, command: 01, value: FE

dev:82020-05-07 04:31:06.955 pm debugparse() --- description: read attr - raw: 52FB0100080A000020FE, dni: 52FB, endpoint: 01, cluster: 0008, size: 0A, attrId: 0000, encoding: 20, command: 01, value: FE

dev:82020-05-07 04:31:03.970 pm debugrefresh() --- cmds: [he raw 0x52FB 1 0x01 0x0008 {10 00 00 00 00}, delay 2000, he raw 0x52FB 1 0x01 0x0001 {10 00 00 21 00}, delay 2000, he raw 0x52FB 1 0x01 0x0000 {10 00 00 00 40}, delay 2000]

dev:82020-05-07 04:31:03.958 pm debugparse() refresh

dev:82020-05-07 04:16:21.691 pm errorjava.lang.NumberFormatException: For input string: "0-" on line 364 (parse)

dev:82020-05-07 04:16:21.672 pm debugparse() --- description: read attr - raw: 52FB010000260040420E3130302D352E332E352E31313232, dni: 52FB, endpoint: 01, cluster: 0000, size: 26, attrId: 4000, encoding: 42, command: 01, value: 0E3130302D352E332E352E31313232

dev:82020-05-07 04:16:16.455 pm debugparse() --- returned: [name:level, value:100]

dev:82020-05-07 04:16:16.446 pm debugparse() --- description: read attr - raw: 52FB0100080A000020FE, dni: 52FB, endpoint: 01, cluster: 0008, size: 0A, attrId: 0000, encoding: 20, command: 01, value: FE

dev:82020-05-07 04:16:14.822 pm errorjava.lang.NumberFormatException: For input string: "0-" on line 364 (parse)

dev:82020-05-07 04:16:14.796 pm debugparse() --- description: read attr - raw: 52FB010000260040420E3130302D352E332E352E31313232, dni: 52FB, endpoint: 01, cluster: 0000, size: 26, attrId: 4000, encoding: 42, command: 01, value: 0E3130302D352E332E352E31313232

dev:82020-05-07 04:16:12.505 pm errorjava.lang.NumberFormatException: For input string: "0-" on line 364 (parse)

dev:82020-05-07 04:16:12.503 pm debugparse() --- returned: [name:battery, value:33]

dev:82020-05-07 04:16:12.501 pm debugparseDescriptionAsMap() --- Battery: 33

dev:82020-05-07 04:16:12.497 pm debugparse() --- description: read attr - raw: 52FB0100010A21002042, dni: 52FB, endpoint: 01, cluster: 0001, size: 0A, attrId: 0021, encoding: 20, command: 01, value: 42

dev:82020-05-07 04:16:12.474 pm debugparse() --- description: read attr - raw: 52FB010000260040420E3130302D352E332E352E31313232, dni: 52FB, endpoint: 01, cluster: 0000, size: 26, attrId: 4000, encoding: 42, command: 01, value: 0E3130302D352E332E352E31313232

dev:82020-05-07 04:16:12.441 pm debugparse() --- returned: [name:level, value:100]

dev:82020-05-07 04:16:12.432 pm debugparse() --- description: read attr - raw: 52FB0100080A000020FE, dni: 52FB, endpoint: 01, cluster: 0008, size: 0A, attrId: 0000, encoding: 20, command: 01, value: FE

dev:82020-05-07 04:16:12.409 pm debugparse() --- returned: [name:battery, value:33]

dev:82020-05-07 04:16:12.408 pm debugparseDescriptionAsMap() --- Battery: 33

dev:82020-05-07 04:16:12.403 pm debugparse() --- description: read attr - raw: 52FB0100010A21002042, dni: 52FB, endpoint: 01, cluster: 0001, size: 0A, attrId: 0021, encoding: 20, command: 01, value: 42

dev:82020-05-07 04:16:12.382 pm debugparse() --- returned: [name:level, value:100]

dev:82020-05-07 04:16:12.373 pm debugparse() --- description: read attr - raw: 52FB0100080A000020FE, dni: 52FB, endpoint: 01, cluster: 0008, size: 0A, attrId: 0000, encoding: 20, command: 01, value: FE

dev:82020-05-07 04:16:12.258 pm debugparse() --- returned: [name:battery, value:33]

dev:82020-05-07 04:16:12.257 pm debugparseDescriptionAsMap() --- Battery: 33

dev:82020-05-07 04:16:12.252 pm debugparse() --- description: read attr - raw: 52FB0100010A21002042, dni: 52FB, endpoint: 01, cluster: 0001, size: 0A, attrId: 0021, encoding: 20, command: 01, value: 42

dev:82020-05-07 04:16:12.224 pm debugparse() --- returned: [name:level, value:100]

dev:82020-05-07 04:16:12.216 pm debugparse() --- description: read attr - raw: 52FB0100080A000020FE, dni: 52FB, endpoint: 01, cluster: 0008, size: 0A, attrId: 0000, encoding: 20, command: 01, value: FE

dev:82020-05-07 04:16:12.173 pm errorjava.lang.NumberFormatException: For input string: "0-" on line 364 (parse)

dev:82020-05-07 04:16:12.147 pm debugparse() --- description: read attr - raw: 52FB010000260040420E3130302D352E332E352E31313232, dni: 52FB, endpoint: 01, cluster: 0000, size: 26, attrId: 4000, encoding: 42, command: 01, value: 0E3130302D352E332E352E31313232

dev:82020-05-07 04:16:12.003 pm debugparse() --- returned: [name:level, value:100]

dev:82020-05-07 04:16:11.995 pm debugparse() --- description: read attr - raw: 52FB0100080A000020FE, dni: 52FB, endpoint: 01, cluster: 0008, size: 0A, attrId: 0000, encoding: 20, command: 01, value: FE

dev:82020-05-07 04:16:11.979 pm errorjava.lang.NumberFormatException: For input string: "0-" on line 364 (parse)

dev:82020-05-07 04:16:11.958 pm debugparse() --- description: read attr - raw: 52FB010000260040420E3130302D352E332E352E31313232, dni: 52FB, endpoint: 01, cluster: 0000, size: 26, attrId: 4000, encoding: 42, command: 01, value: 0E3130302D352E332E352E31313232

dev:82020-05-07 04:16:10.149 pm debugrefresh() --- cmds: [he raw 0x52FB 1 0x01 0x0008 {10 00 00 00 00}, delay 2000, he raw 0x52FB 1 0x01 0x0001 {10 00 00 21 00}, delay 2000, he raw 0x52FB 1 0x01 0x0000 {10 00 00 00 40}, delay 2000]

dev:82020-05-07 04:16:10.136 pm debugparse() refresh

dev:82020-05-07 04:16:10.134 pm debugPing()

dev:82020-05-07 04:16:07.988 pm debugrefresh() --- cmds: [he raw 0x52FB 1 0x01 0x0008 {10 00 00 00 00}, delay 2000, he raw 0x52FB 1 0x01 0x0001 {10 00 00 21 00}, delay 2000, he raw 0x52FB 1 0x01 0x0000 {10 00 00 00 40}, delay 2000]

dev:82020-05-07 04:16:07.978 pm debugparse() refresh

dev:82020-05-07 04:16:06.832 pm debugparse() --- returned: [name:battery, value:33]

dev:82020-05-07 04:16:06.816 pm debugparse() --- returned: [name:level, value:100]

dev:82020-05-07 04:16:06.811 pm debugparseDescriptionAsMap() --- Battery: 33

dev:82020-05-07 04:16:06.806 pm debugparse() --- description: read attr - raw: 52FB0100010A21002042, dni: 52FB, endpoint: 01, cluster: 0001, size: 0A, attrId: 0021, encoding: 20, command: 01, value: 42

dev:82020-05-07 04:16:06.783 pm debugparse() --- description: read attr - raw: 52FB0100080A000020FE, dni: 52FB, endpoint: 01, cluster: 0008, size: 0A, attrId: 0000, encoding: 20, command: 01, value: FE

dev:82020-05-07 04:16:06.671 pm debugparse() --- returned: [name:level, value:100]

dev:82020-05-07 04:16:06.647 pm debugparse() --- description: read attr - raw: 52FB0100080A000020FE, dni: 52FB, endpoint: 01, cluster: 0008, size: 0A, attrId: 0000, encoding: 20, command: 01, value: FE

dev:82020-05-07 04:16:06.184 pm errorjava.lang.NullPointerException: Cannot invoke method toJson() on null object on line 272 (configure)

dev:82020-05-07 04:16:06.157 pm debugConfiguring Reporting and Bindings.

dev:82020-05-07 04:16:03.749 pm debugrefresh() --- cmds: [he raw 0x52FB 1 0x01 0x0008 {10 00 00 00 00}, delay 2000, he raw 0x52FB 1 0x01 0x0001 {10 00 00 21 00}, delay 2000, he raw 0x52FB 1 0x01 0x0000 {10 00 00 00 40}, delay 2000]

dev:82020-05-07 04:16:03.739 pm debugparse() refresh

dev:82020-05-07 04:01:12.242 pm errorjava.lang.NumberFormatException: For input string: "0-" on line 357 (parse)

dev:82020-05-07 04:01:12.226 pm debugparse() --- description: read attr - raw: 52FB010000260040420E3130302D352E332E352E31313232, dni: 52FB, endpoint: 01, cluster: 0000, size: 26, attrId: 4000, encoding: 42, command: 01, value: 0E3130302D352E332E352E31313232

dev:82020-05-07 04:01:12.155 pm errorjava.lang.NumberFormatException: For input string: "0-" on line 357 (parse)

dev:82020-05-07 04:01:12.137 pm debugparse() --- description: read attr - raw: 52FB010000260040420E3130302D352E332E352E31313232, dni: 52FB, endpoint: 01, cluster: 0000, size: 26, attrId: 4000, encoding: 42, command: 01, value: 0E3130302D352E332E352E31313232

dev:82020-05-07 04:01:12.115 pm errorjava.lang.NumberFormatException: For input string: "0-" on line 357 (parse)

dev:82020-05-07 04:01:12.096 pm debugparse() --- description: read attr - raw: 52FB010000260040420E3130302D352E332E352E31313232, dni: 52FB, endpoint: 01, cluster: 0000, size: 26, attrId: 4000, encoding: 42, command: 01, value: 0E3130302D352E332E352E31313232

dev:82020-05-07 04:01:06.984 pm debugparse() --- returned: [name:battery, value:33]

dev:82020-05-07 04:01:06.983 pm debugparseDescriptionAsMap() --- Battery: 33

dev:82020-05-07 04:01:06.976 pm debugparse() --- description: read attr - raw: 52FB0100010A21002042, dni: 52FB, endpoint: 01, cluster: 0001, size: 0A, attrId: 0021, encoding: 20, command: 01, value: 42

dev:82020-05-07 04:01:06.940 pm debugparse() --- returned: [name:level, value:100]

dev:82020-05-07 04:01:06.934 pm debugparse() --- returned: [name:level, value:100]

dev:82020-05-07 04:01:06.913 pm debugparse() --- description: read attr - raw: 52FB0100080A000020FE, dni: 52FB, endpoint: 01, cluster: 0008, size: 0A, attrId: 0000, encoding: 20, command: 01, value: FE

dev:82020-05-07 04:01:06.899 pm debugparse() --- description: read attr - raw: 52FB0100080A000020FE, dni: 52FB, endpoint: 01, cluster: 0008, size: 0A, attrId: 0000, encoding: 20, command: 01, value: FE

dev:82020-05-07 04:01:04.432 pm debugrefresh() --- cmds: [he raw 0x52FB 1 0x01 0x0008 {10 00 00 00 00}, delay 2000, he raw 0x52FB 1 0x01 0x0001 {10 00 00 21 00}, delay 2000, he raw 0x52FB 1 0x01 0x0000 {10 00 00 00 40}, delay 2000]

dev:82020-05-07 04:01:04.412 pm debugparse() refresh

dev:82020-05-07 04:00:16.143 pm debugparse() --- returned: null

dev:82020-05-07 04:00:16.142 pm debugparseReportAttributeMessage() --- ignoring attribute

dev:82020-05-07 04:00:16.136 pm debugparse() --- description: read attr - raw: 52FB0100060800001001, dni: 52FB, endpoint: 01, cluster: 0006, size: 08, attrId: 0000, encoding: 10, command: 0A, value: 01

I did the original port but sadly I'm not a driver guy. Maybe @cofin could give it a quick look and see whats up.

Thanks

Okay understand. Thanks for responding just the same Bryan.