Aeotec Gen5 USB z-wave stick showing as adb emulator under "adb devices"

Amazon recently unleashed the ban hammer on the FireStarter app, which I leveraged for the home double tap functionality via my harmony hub to start Kodi on the firetv with my amazon echo. That being said, I’ve been looking for alternatives. After some research I found I could use openhab to launch apps directly on the firetv using adb with the exec binding. This works freaking great… almost…

The Aeotec Gen5 USB z-wave stick shows up as an emulator under adb which wreaks havoc with my z-wave setup! Here is an example connecting to my firetv and you can see that the emulator is showing as well:

adb devices
List of devices attached
emulator-5554 offline
192.168.1.72:5555 device

If I pull the z-wave stick out the emulator disappears.

The problem I have is z-wave trips out and starts queuing events whenever I connect to my firetv via adb. For example:

016-05-16 17:33:45.774 [DEBUG] [o.b.z.i.protocol.SerialMessage:113 ]- NODE 2: Creating empty message of class = SendData (0x13), type = Request (0x00)
2016-05-16 17:33:45.774 [DEBUG] [b.z.i.protocol.ZWaveController:947 ]- Callback ID = 12
2016-05-16 17:33:45.774 [DEBUG] [b.z.i.protocol.ZWaveController:632 ]- Enqueueing message. Queue length = 4
2016-05-16 17:33:46.241 [DEBUG] [z.internal.ZWaveNetworkMonitor:323 ]- Network Monitor: Queue length is 4 - deferring network monitor functions.
2016-05-16 17:33:51.242 [DEBUG] [z.internal.ZWaveNetworkMonitor:323 ]- Network Monitor: Queue length is 4 - deferring network monitor functions.
2016-05-16 17:33:56.249 [DEBUG] [z.internal.ZWaveNetworkMonitor:323 ]- Network Monitor: Queue length is 4 - deferring network monitor functions.
2016-05-16 17:34:01.250 [DEBUG] [z.internal.ZWaveNetworkMonitor:323 ]- Network Monitor: Queue length is 4 - deferring network monitor functions.
2016-05-16 17:34:06.251 [DEBUG] [z.internal.ZWaveNetworkMonitor:323 ]- Network Monitor: Queue length is 4 - deferring network monitor functions.
2016-05-16 17:34:11.252 [DEBUG] [z.internal.ZWaveNetworkMonitor:323 ]- Network Monitor: Queue length is 4 - deferring network monitor functions.

If I kill the adb server the queued z-wave msgs go though and my lights turn on. I’m hoping someone might have some insight into how I can exclude the usb z-wave stick from the adb list. I’m running openhab on ubuntu 14.04 LTS with the android-tools-adb package. Any help would be appreciated.

Quick update in case this shows up in a search result for anyone having the same/similar issue. I gave up on trying to figure out why android adb and the aeotec usb stick hate each other and started looking for workarounds. My first attempt was to modify https://github.com/mattgyver83/adbee to run “adb kill-server” instead of “disconnect” after the command execution on the firetv. This solved the problem with adb wigging out z-wave when they were both running on the same box but having to start adb fresh before executing a command on the firetv takes for freaking ever so I gave up on that.

Where I’m at at the moment is I’ve fired up another ubuntu “adb” instance dedicated to run adb and stay connected to my firetv, I’ve configured the openhab firetv items with the exec binding to ssh to the “adb” system and run the adb command. So far this works really well without any noticeable latency. Quick rundown of steps taken.

  • Installed android-tools-adb package on dedicated system
  • setup ssh keys to allow openhab system user to ssh to “adb” system
  • configured openhab items to use the exec binding to call adb commands on “adb” system. Here are the items I have configured:
  • Switch FireTV_Netflix { exec=“ON:ssh user@adbhost adb connect firetv.ip.address && adb shell monkey -p com.netflix.ninja -c android.intent.category.LAUNCHER 1” }
    Switch FireTV_Plex { exec=“ON:ssh user@adbhost adb connect firetv.ip.address && adb shell monkey -p com.plexapp.android -c android.intent.category.LAUNCHER 1” }
    Switch FireTV_Pluto { exec=“ON:ssh user@adbhost adb connect firetv.ip.address && adb shell monkey -p tv.pluto.android -c android.intent.category.LAUNCHER 1” }
    Switch FireTV_Kodi { exec=“ON:ssh user@adbhost adb connect firetv.ip.address && adb shell monkey -p org.xbmc.kodi -c android.intent.category.LAUNCHER 1” }
    Switch FireTV_Sling { exec=“ON:ssh user@adbhost adb connect firetv.ip.address && adb shell monkey -p com.sling -c android.intent.category.LAUNCHER 1” }
    Switch FireTV_Uverse { exec=“ON:ssh user@adbhost adb connect firetv.ip.address && adb shell monkey -p com.att.labs.uversetv.android.tablet -c android.intent.category.LAUNCHER 1” }

There is a little latency if adb if firing up for the first time but after its started subsequent commands are good to go. Probably better ways to do it but it works for now.

1 Like