GithubHelp home page GithubHelp logo

Comments (3)

andersonshatch avatar andersonshatch commented on September 27, 2024

I think this might be due to a noble restriction, but I already have a branch to try and address it, it's been waiting for other testers / complaints of the same symptom.
Can you try and let me know? Steps:

  1. clone the repo: git clone https://github.com/andersonshatch/soma-ctrl
  2. cd soma-ctrl
  3. Checkout the new branch: git checkout discover-all-then-connect
  4. Install the dependencies: npm install

from soma-ctrl.

ronvl avatar ronvl commented on September 27, 2024

this one is indeed working. Thanks!

I do see a lot of connects though and wonder if that is expected ... my screen is constantly scrolling with:
soma* scanning for 2 device(s) [ 'fdbdb47f4f7a', 'e2e48169e805' ] +0ms
soma* connected to fdbdb47f4f7a +916ms
soma* connected to fdbdb47f4f7a +28ms
soma* connected to fdbdb47f4f7a +7ms
soma* connected to e2e48169e805 +361ms
soma* all expected devices connected, stopping scan +0ms
soma* connected to e2e48169e805 +951ms
soma* connected to e2e48169e805 +13s
soma* connected to e2e48169e805 +5s
soma* connected to e2e48169e805 +300ms
soma* connected to e2e48169e805 +300ms
soma* connected to e2e48169e805 +300ms
soma* connected to e2e48169e805 +745ms
soma* connected to e2e48169e805 +8s
soma* connected to e2e48169e805 +4s
soma* connected to e2e48169e805 +5s
soma* connected to e2e48169e805 +188ms
soma* connected to e2e48169e805 +717ms
soma* connected to e2e48169e805 +16s
soma* connected to e2e48169e805 +25s
soma* connected to e2e48169e805 +4s
soma* connected to e2e48169e805 +8s
soma* connected to e2e48169e805 +2s
soma* connected to e2e48169e805 +200ms
soma* connected to e2e48169e805 +2s
soma* connected to e2e48169e805 +15s
soma* connected to e2e48169e805 +7s
soma* connected to e2e48169e805 +3s
soma* connected to e2e48169e805 +442ms

Also after some time I get multiple:
(node:6405) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 characteristicsDiscover listeners added. Use emitter.setMaxListeners() to increase limit

This doesn't seem to effect functionality though...

One other problem I got a few times is:
pi@soma-ctrl:~/soma-ctrl $ sudo node /home/pi/node_modules/soma-ctrl/index.js fdbdb47f4f7a e2e48169e805 --url mqtt:192.168.2.192:1883
soma* scanning for 2 device(s) [ 'fdbdb47f4f7a', 'e2e48169e805' ] +0ms
soma* connected to fdbdb47f4f7a +516ms
/home/pi/node_modules/soma-ctrl/src/SomaShade.js:147
this.positionCharacteristic.subscribe();
^

TypeError: Cannot read property 'subscribe' of undefined
at peripheral.discoverSomeServicesAndCharacteristics (/home/pi/node_modules/soma-ctrl/src/SomaShade.js:147:45)
at Peripheral. (/home/pi/node_modules/noble/lib/peripheral.js:101:13)
at Service. (/home/pi/node_modules/noble/lib/service.js:53:7)
at Object.onceWrapper (events.js:315:30)
at emitOne (events.js:116:13)
at Service.emit (events.js:211:7)
at Noble.onCharacteristicsDiscover (/home/pi/node_modules/noble/lib/noble.js:302:13)
at emitThree (events.js:136:13)
at NobleBindings.emit (events.js:217:7)
at NobleBindings.onCharacteristicsDiscovered (/home/pi/node_modules/noble/lib/hci-socket/bindings.js:339:8)

If you want me to open a new issue for one of the above let me know

Cheers
Ron

from soma-ctrl.

andersonshatch avatar andersonshatch commented on September 27, 2024

Connecting only to the first discovered device and the crash with Cannot read property 'subscribe' of undefined should both be addressed by v1.3.0 which I just released.
I've looked into those MaxListenersExceededWarnings before, and most of them I can't do anything about, but they don't seem to affect stability.

from soma-ctrl.

Related Issues (11)

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.