Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to connect to Mi Kettle-TypeError: Cannot read property 'StartNotify' of undefined #20

Open
isaaccs opened this issue May 25, 2021 · 6 comments

Comments

@isaaccs
Copy link

isaaccs commented May 25, 2021

Hi everyone,

I follow the readme to install the package.
I've cloned the repo, done npm install, configured cybele as follows

{
  "mqtt": {
    "url": "MQTT"
  },
  "dongles": [
    {
      "hciDevice": "hci0",
      "mode": "le",
      "services": [],
      "devices": [{
  "type": "MiKettleDevice",
  "friendlyName": "Mi Kettle",
  "mac": "MAC",
  "productId":1116
}

      ]
    }
  ]
}
Connected to MQTT Broker
Startup complete
/home/pi/Cybele/lib/devices/MiKettle/MiKettleDevice.js:166
        this.characteristicsByUUID[MiKettleDevice.CHARACTERISTICS.auth].StartNotify([], err => {
                                                                        ^

TypeError: Cannot read property 'StartNotify' of undefined
    at /home/pi/Cybele/lib/devices/MiKettle/MiKettleDevice.js:166:73
    at Object.item.task (/home/pi/Cybele/node_modules/semaphore/lib/semaphore.js:40:29)
    at Object.take (/home/pi/Cybele/node_modules/semaphore/lib/semaphore.js:51:9)
    at MiKettleDevice.doAuthStageTwo (/home/pi/Cybele/lib/devices/MiKettle/MiKettleDevice.js:165:20)
    at Object.<anonymous> (/home/pi/Cybele/lib/devices/MiKettle/MiKettleDevice.js:156:22)
    at EventEmitter.<anonymous> (/home/pi/Cybele/node_modules/dbus-native/lib/bus.js:138:19)
    at EventEmitter.emit (events.js:388:22)
    at /home/pi/Cybele/node_modules/dbus-native/index.js:106:14
    at Socket.<anonymous> (/home/pi/Cybele/node_modules/dbus-native/lib/message.js:55:9)
    at Socket.emit (events.js:376:20)

Any ideas what's wrong?

@isaaccs
Copy link
Author

isaaccs commented May 25, 2021

I add the Token in the config file, now I have a new error.

Connected to MQTT Broker
Startup complete
Disconnected from Mi Kettle
Mi Kettle {
  message: 'Failed to connect to Mi Kettle',
  error: 'Timeout exceeded'
} while connecting


/home/pi/Cybele/lib/devices/MiKettle/MiKettleDevice.js:166
        this.characteristicsByUUID[MiKettleDevice.CHARACTERISTICS.auth].StartNotify([], err => {
                                                                        ^

TypeError: Cannot read property 'StartNotify' of undefined
    at /home/pi/Cybele/lib/devices/MiKettle/MiKettleDevice.js:166:73
    at Object.item.task (/home/pi/Cybele/node_modules/semaphore/lib/semaphore.js:40:29)
    at Object.take (/home/pi/Cybele/node_modules/semaphore/lib/semaphore.js:51:9)
    at MiKettleDevice.doAuthStageTwo (/home/pi/Cybele/lib/devices/MiKettle/MiKettleDevice.js:165:20)
    at Object.<anonymous> (/home/pi/Cybele/lib/devices/MiKettle/MiKettleDevice.js:156:22)
    at EventEmitter.<anonymous> (/home/pi/Cybele/node_modules/dbus-native/lib/bus.js:138:19)
    at EventEmitter.emit (events.js:388:22)
    at /home/pi/Cybele/node_modules/dbus-native/index.js:106:14
    at Socket.<anonymous> (/home/pi/Cybele/node_modules/dbus-native/lib/message.js:55:9)
    at Socket.emit (events.js:376:20)
```

@RestOp
Copy link

RestOp commented Jun 28, 2021

The same with new Xiaomi Kettle Pro it make beep and give the error like this
MAC: A4:C1:38:81:FE:58
Token: e3e28761a205cc475e1aa1ac
Model: yunmi.kettle.v12

@Hypfer
Copy link
Owner

Hypfer commented Jun 28, 2021

If there is no auth characteristic with that model, it might run a different firmware which works.. differently and therefore requires additional reverse engineering

@RestOp
Copy link

RestOp commented Jun 28, 2021

How could we help to make it work (if we could)?

@Marcusg562
Copy link

@Hypfer can we anyhow assist you? Providing logs or smthg else?

@Hypfer
Copy link
Owner

Hypfer commented Dec 26, 2021

I'm not working on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants