grover / homebridge-ranger

A HomeKit range extender for Bluetooth Low Energy (BLE) accessories.
MIT License
73 stars 15 forks source link

Eve Aqua doesn't seem to work #24

Closed Bluebie closed 5 years ago

Bluebie commented 5 years ago

I've setup homebridge-ranger on a Raspberry Pi Zero W, hoping to be able to bridge the device on to WiFi so i could automate it with the Apple TV automations system. I've had only partial success.

The plugin does seem to pair, and logs out like this: (pairing codes removed)

pi@raspberrypi:~ $ /opt/node/bin/homebridge -D -U /var/lib/homebridge
[2019-5-31 13:39:54] Loaded config.json with 0 accessories and 1 platforms.
[2019-5-31 13:39:54] ---
[2019-5-31 13:39:57] Loaded plugin: homebridge-ranger
[2019-5-31 13:39:57] Registering platform 'homebridge-ranger.Ranger'
[2019-5-31 13:39:57] ---
[2019-5-31 13:39:57] Loading 1 platforms...
[2019-5-31 13:39:57] [Ranger] Initializing Ranger platform...
[2019-5-31 13:39:57] [Ranger] Ranger Platform Plugin Loaded
[2019-5-31 13:39:57] [Ranger] Found device in config: "Eve"
[2019-5-31 13:39:57] [Ranger] Waiting for accessory: Eve
[2019-5-31 13:39:57] [Ranger] Not all accessories have their devices. Not publishing yet.
[2019-5-31 13:39:57] [Ranger] DidFinishLaunching
[2019-5-31 13:39:58] [Ranger] Found paired accessory Eve Aqua 3270 address=e9:a5:65:4f:16:9c rssi=-75dB
[2019-5-31 13:39:58] [Ranger] Accessory 'Eve' found.
[2019-5-31 13:39:58] [Ranger] Connecting to Eve
[2019-5-31 13:40:00] [Ranger] Discovered services.
[2019-5-31 13:40:00] [Ranger] Discovered GATT services and characteristics of Eve
[2019-5-31 13:40:00] [Ranger] Connected to Eve
[2019-5-31 13:40:00] [Ranger] Connected to Eve
[2019-5-31 13:40:00] [Ranger] Failed to retrieve characteristic Manufacturer for accessory information.
[2019-5-31 13:40:00] [Ranger] Failed to retrieve characteristic Model for accessory information.
[2019-5-31 13:40:00] [Ranger] Failed to retrieve characteristic Name for accessory information.
[2019-5-31 13:40:01] [Ranger] Failed to retrieve characteristic Serial Number for accessory information.
[2019-5-31 13:40:01] [Ranger] Failed to retrieve characteristic Firmware Revision for accessory information.
[2019-5-31 13:40:01] [Ranger] Failed to retrieve characteristic Hardware Revision for accessory information.
[2019-5-31 13:40:01] [Ranger] Publishing BLE service 000000D0-0000-1000-8000-0026BB765291 via proxy
[2019-5-31 13:40:01] [Ranger] Publishing BLE service 00000096-0000-1000-8000-0026BB765291 via proxy
[2019-5-31 13:40:01] [Ranger] Publishing BLE service E863F007-079E-48FF-8F27-9C2605A29F52 via proxy
[2019-5-31 13:40:01] [Ranger] Initializing platform accessory 'Eve'...
Setup Payload:
Scan this code with your HomeKit app on your iOS device to pair with Homebridge:
Or enter this code with your HomeKit app on your iOS device to pair with Homebridge:
[2019-5-31 13:40:02] Homebridge is running on port 51826.
[2019-5-31 13:40:42] [Ranger] Eve: First advertisement after 43601ms.
[2019-5-31 13:40:42] [Ranger] Disconnected from Eve
[2019-5-31 13:40:52] [Ranger] Reported reachability for Eve: true
[2019-5-31 13:40:52] [Ranger] Connecting to Eve
[2019-5-31 13:40:54] [Ranger] Discovered services.
[2019-5-31 13:40:54] [Ranger] Discovered GATT services and characteristics of Eve
[2019-5-31 13:40:54] [Ranger] Connected to Eve
[2019-5-31 13:40:54] [Ranger] Connected to Eve
[2019-5-31 13:41:22] [Ranger] Reported reachability for Eve: false
[2019-5-31 13:41:25] [Ranger] Disconnected from Eve
[2019-5-31 13:41:26] [Ranger] Eve: First advertisement after 34090ms.
[2019-5-31 13:41:42] [Ranger] Reported reachability for Eve: true
[2019-5-31 13:41:42] [Ranger] Connecting to Eve
[2019-5-31 13:41:45] [Ranger] Discovered services.
[2019-5-31 13:41:45] [Ranger] Discovered GATT services and characteristics of Eve
[2019-5-31 13:41:45] [Ranger] Connected to Eve
[2019-5-31 13:41:45] [Ranger] Connected to Eve
[2019-5-31 13:42:12] [Ranger] Reported reachability for Eve: false
[2019-5-31 13:42:16] [Ranger] Eve: First advertisement after 34080ms.
[2019-5-31 13:42:16] [Ranger] Disconnected from Eve
[2019-5-31 13:42:30] [Ranger] Reported reachability for Eve: true
[2019-5-31 13:42:30] [Ranger] Connecting to Eve
[2019-5-31 13:42:33] [Ranger] Discovered services.
[2019-5-31 13:42:33] [Ranger] Discovered GATT services and characteristics of Eve
[2019-5-31 13:42:33] [Ranger] Connected to Eve
[2019-5-31 13:42:33] [Ranger] Connected to Eve

It continues casually logging out discovery, advertisements, connected, and service discovery stuff over time. The device also appears in my Home app, and appears as the correct type of device, but it's unresponsive to any attempt to activate any of it's features, and Home and the Eve app appear unable to read any current state information too. The Eve app also seems to think the battery is empty, but i'm guessing it's getting back a null or something equivalent and interpreting that as 0% charge. Feeling lost as to what else I can do to debug this issue.

Bluebie commented 5 years ago

My config file looks like this: (private details changed)

{
  "bridge": {
    "name": "Homebridge Ranger",
    "username": "CC:22:31:E1:CD:22",
    "port": 51117,
    "pin": "012-22-444"
  },
  "platforms": [
    {
      "platform": "Ranger",
      "devices": [
        {
          "name": "Eve",
          "address": "d9:d9:d9:ac:ac:ac",
          "pin": "012-34-567"
        }
      ]
    }
  ]
}

I didn't do anything to unpair the Eve from my home before trying to start up the ranger plugin, and i'm wondering if maybe i should have, since after ranger started up, a second device appeared in my home, under the ranger/homekit bridge, with the name specified in the config file. Homekit did not seem to recognise it as the same device. The mac address of the device is the one i saw advertised when i first started up homekit, and the pin came from the sticker in the Eve Aqua's box, with hyphens inserted to fit the format used here.

Bluebie commented 5 years ago

My mistake, I misunderstood the pairing situation!