Code Monkey home page Code Monkey logo

Comments (6)

gdavids57 avatar gdavids57 commented on September 26, 2024

This plugin relies on the noble utility to implement a BLE Central device. The bluetooth-hci-socket version relied upon by the noble package does not work with nodejs versions newer than v8. The abandonware version of bluetooth-hci-socket will build on my RPi using nodejs v14. (see https://www.npmjs.com/package/@abandonware/bluetooth-hci-socket). I'm still working to get noble to use the alternate bluetooth module.

from homebridge-bluetooth.

uswong avatar uswong commented on September 26, 2024

Any solution to this issue yet?

I have successfully installed home bridge-bluetooth but homebridge log shows the following error:

Screen Shot 2022-06-15 at 1 31 24 pm

Any help is much appreciated.

from homebridge-bluetooth.

uswong avatar uswong commented on September 26, 2024

The solution suggested by @gdavids57 actually works for me. Please do not forget to change all instances of require('bluetooth-hci-socket') to require('@abandonware/bluetooth-hci-socket').

Moreover, the chalk version 5 does not work for this plugin as the moment. So what you need to do is to downgrade chalk version to version 4. What I have done is as follow:

sudo npm uninstall chalk
sudo npm install [email protected]

from homebridge-bluetooth.

uswong avatar uswong commented on September 26, 2024

I have a Bluetooth version of Xiaomi Power Strip 2 (model: qmi.plug.pvs3). It connected ok, but no service discovered.

This is my config file:

 {
     "platform": "Bluetooth",
     "accessories": [
         {
             "name": "Xiaomi Outlet 2",
             "address": "68:AB:BC:07:50:AD",
             "services": [
                 {
                     "name": "JBL",
                     "type": "Outlet",
                     "UUID": "80c77a06-ec5c-11ec-8ea0-0242ac120002",
                     "characteristics": [
                         {
                             "type": "On",
                             "UUID": "80c77a06-ec5c-11ec-8ea0-0242ac120002"
                         }
                     ]
                 }
             ]
         }
     ]
 }

The log on Homebridge as follow:

[15/06/2022, 9:43:48 pm] [Bluetooth] [Xiaomi Outlet 2] Connected | Xiaomi Outlet 2 (68:AB:BC:07:50:AD)
[15/06/2022, 9:43:48 pm] [Bluetooth] [Xiaomi Outlet 2] No services discovered

What have I done wrong?

from homebridge-bluetooth.

kard8 avatar kard8 commented on September 26, 2024

The solution suggested by @gdavids57 actually works for me. Please do not forget to change all instances of require('bluetooth-hci-socket') to require('@abandonware/bluetooth-hci-socket').

Hi @uswong.

Can you please tell me how to find the instances as mentioned in your reply

from homebridge-bluetooth.

uswong avatar uswong commented on September 26, 2024

cd to your homebridge-bluetooth plugin directory and try using the following command:
grep -r bluetooth-hci-socket *|grep require

from homebridge-bluetooth.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.