node-poweredup: Unable to connect multiple Hubs on Raspberry Pi 3 B v2
I am trying to connect multiple hubs on a Raspberry Pi 3 B v2. I’m using a cut down sample script to debug with no success:
const PoweredUP = require("node-poweredup");
const poweredUP = new PoweredUP.PoweredUP();
poweredUP.on("discover", async (hub) => {
console.log(`Discovered ${hub.name}!`);
await hub.connect();
console.log(`Connected to ${hub.name}`);
});
poweredUP.scan();
console.log("Scanning for Hubs...");
The first device connects, but no more are detected:
root@rasp1:/home/pi/stash/lego-layout/apps/state# node ./dist/test.js
Scanning for Hubs...
Discovered Storage!
Connected to Storage
If I run the same thing on my Macbook I can connect to multiple devices:
$ node ./dist/test.js
Scanning for Hubs...
Discovered Storage!
Discovered Tunnel Approac!
Connected to Storage
Connected to Tunnel Approac
Discovered Station Depart!
Discovered Station Approa!
Connected to Station Depart
Discovered Station!
Connected to Station Approa
Connected to Station
I have double checked that I have installed the correct dependencies on the Raspberry Pi.
I’m guessing this is a problem more with noble
rather than node-poweredup
- any suggestions?
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 15 (13 by maintainers)
I think it is similar to https://github.com/nathankellenicki/node-poweredup/issues/59#issuecomment-561423756
Noble seems to handle things differently between mac and unix systems.
Yes:
My code turns the Hub LEDs to green when it’s connected to them.