Sorry Jeffrey, forgot to return to the forum… Thanks for your advice, I’m now in touch with Camille Leclerc, who’s providing much help on the topic! A future use case for your website…
Thanks again to all for your kind help!
Sorry Jeffrey, forgot to return to the forum… Thanks for your advice, I’m now in touch with Camille Leclerc, who’s providing much help on the topic! A future use case for your website…
Thanks again to all for your kind help!
This comment pertains to v1.x reelyActive from reelyActive.github.io:
(I posted it on this thread because I couldn’t get through the install steps in the OP and was hoping I could get something to work Frankenstein style, then troubleshoot, get a working solution, and post my update.)
I finally got the ReelyActive webpage to load [Raspberry Pi IP]:3001 via the pi-suite & the bluetooth feature (sudo npm run start-hci).
I did have a heck of a time getting this to install, but I don’t know a lot about Linux so maybe that’s why. (It kept getting stuck on the npm install command, and that was taking hours to complete & my session kept dying, but ultimately my issue was the missing dependencies indicated below in my steps.)
What worked for me: (Raspberry Pi 4 running OpenHABian)
cd (This takes me to: /home/openhabian)
npm i bufferutil
npm install utf-8-validate
cd
mkdir reelyActive
cd reelyActive
git clone https://github.com/reelyactive/pi-suite.git
cd pi-suite
npm install --verbose (Use verbose so you can see output; mine sat here otherwise for 30+minutes & my SSH session kept dying)
sudo npm run start-hci (CTRL+C to exit)
Open in browser: [PiIP]:3001
Run a web app-> Hello Tracking (To see devices transmitting)
I tried the reelyApp on my Android phone and “Advertised” but that didn’t show up in the web app. I did see my Chromecasts and my LG tv so I know “some” of it is working. I also tried a bunch of advertising & beacon apps on my phone (my phone’s bluetooth mac does NOT change like i phones do), but couldn’t get it to show up in the web apps either. Is this expected?
Side note: I went down this install path instead of the OP’s node & reelyActive part of the install because I couldn’t get this step to install: “npm install bluetooth-hci-socket”, in step 3.
UPDATE: (For any that might come across this post and want a latest update on what works and what doesn’t) I was able to get my phone to show up with the “reelyActive” phone app “Advertise Me” function, as a Google Eddystone beacon, inside the hello-tracking & hello-sniffypedia web apps (via my Testing/Usage step above). However, when I disable Advertising in the phone app, then turn it back on, the MAC changes (new random MAC). So this must be what others have been referring to (?) - where an Android app perhaps can’t use the real bluetooth device MAC due to “security concerns”. I tried several other Android apps as well and all have the same behavior, such as: “Beacon Simulator” Android phone app: beacons show up as well in the hello-tracking & hello-sniffypedia web apps, with random MACs. What mislead me (and PLEASE correct me if I’m wrong) was that in openhab’s PaperUI I was able to add my phone as a thing via the REAL mac, therefore I figured apps would behave the same. Im thinking though that pairing your phone uses your physical bluetooth MAC, and is entirely different than transmitting a beacon via an app (which uses a random MAC). This is certainly frustrating. I’ve developed several bluetooth Android apps in the past so I could certainly look into developing an app that might overcome this, but for $19 I found an ibeacon on Amazon. My time developing the app will be at least 10-fold that, and for my purpose I just want to track general work hours for myself and my wife, so putting this beacon on our keyring or in our truck should fit the bill. (If anyone did want to create such an app perhaps I think you could overcome this random mac limitation via using a hardcoded, or user generated UUID that you would use to reference the phone, and have it run as a service on the phone. You would still then have to integrate it into openhab, but as I mentioned in my other post, I couldn’t get Richs OP install to work, so I’m not sure how then to integrate a phone via this custom app into MQTT or openhab directly.)
My issue here, and certainly no different than any other functionality from openhab I experienced in the past (its addicting to see how much you can make it do!!), was I read a ton of old information (indicating people used their phone as a beacon), and never even heard of Presence Detection or a Becon until a few days ago!
This comment pertains to v0.x reelyActive from OP:
npm install bluetooth-hci-socket
wouldn’t install for me, likely due to this issue . But it installs this way:
npm install "https://github.com/abandonware/node-bluetooth-hci-socket"
However, once I start it with “sudo node server.js” I get this error:
reelyActive barnowl instance is listening for an open IoT
reelyActive Chickadee instance is curious to associate metadata in an open IoT
/opt/reelyActiveRich/server.js:18
app.bind( { protocol: 'hci', path: 'null' } );
^
TypeError: app.bind is not a function
at Object.<anonymous> (/opt/reelyActiveRich/server.js:18:5)
at Module._compile (internal/modules/cjs/loader.js:701:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
at Module.load (internal/modules/cjs/loader.js:600:32)
at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
at Function.Module._load (internal/modules/cjs/loader.js:531:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:754:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
Perhaps because my workaround won’t work with this, or I botched something else up.
Thanks @Kevin71246 for giving this a go and for sharing key debug output which makes it easy to identify the underlying issues.
Important Note: There are two versions of pi-suite, one based on the v0.x reelyActive open source software which @rlkoshak describes in his posts and another based on the v1.x reelyActive open source software which is what currently recommend.
Most of the issues in the above two posts stem from mixing the two in ways which will break things.
If you’d like to replicate what’s described earlier in this thread (based on v0.x), I suggest following the original pi-suite tutorial/code where the dependencies should still work with Node.js versions 8 and below. The challenge is that the hci-bluetooth-socket package has stopped being maintained by its original author, and Node.js has “outgrown” it in recent versions. It needs to be swapped out for abandonware/hci-bluetooth-socket as you’ve (painfully) discovered, likely because you’re on a recent version of Node.js.
If a member of the OpenHAB community would like to extend the integration to the current (v1.x) version, it might be easiest to simply integrate the barnowl-hci code which will provide the real-time data stream of BLE decodings: https://github.com/reelyactive/barnowl-hci
Let us know and we’ll do our best to support!
@Jeffrey_Dungen I appreciate the feedback! I updated my above post to reflect the fact that I got a lot of your demo working with various Android apps. (Once I got your newer version installed, I’m not sure if my issue with “getting my phone & transmitter apps not showing up” was that it was getting late, or that I still had my phone configured -but NOT paired- with openhab as a thing. I removed it and tested again today and got it to show up.) I wanted people to know that if they have ideas or direction with openhab-integration, they will at least get this far!
While I’m thinking a stand-alone $19 ibeacon will resolve my desire to try and get bluetooth presence working with a cell phone (and I wanted this to work with a phone for obvious reasons such as you won’t need to ducttape a beacon on your chest, but we DO voluntarily do that with our cell phones )… much time is freed up these days due to the virus. Sigh. So I may tinker with it more. I never heard of node until recently, so there’s much of a learning curve. Sigh again!
Questions:
Thanks again!
Obviously it has been a couple of years since I’ve revisited reelyActive. I don’t use it at home because I can only tell that an iPhone is present, not which specific iPhone is present because of MAC address spoofing. That’s great for privacy, not so great in trying to see who is home. Is there a way around that now?
It will probably take a good deal of time but if someone doesn’t beat me to it, I’ll give it another go and try to get the 1.x software working with MQTT. Once you have that, integration with openHAB, Home Assistant, and a host of other systems is basically done.
Hello,
Anyone knows how to connect to mosquitto now? It seems part:
app.addNotificationService( {
service: “barnaclesmqtt”,
hostname: HOSTNAME,
topic: TOPIC,
clientOptions: CLIENT_OPTIONS
});
is not working. I’m getting: TypeError: app.addNotificationService is not a function
For now, to start server I use:
const HLCServer = require(‘hlc-server’);
const BarnowlHci = require(‘barnowl-hci’);
const options = {
barnowl: { enableMixing: true },
barnacles: { acceptStaleRaddecs: true }
};
let app = new HLCServer(options);
app.addListener(BarnowlHci, {}, BarnowlHci.SocketListener, {});
Log response:
reelyActive barnowl instance is listening for an open IoT
reelyActive Chickadee instance is curious to associate metadata in an open IoT
barnowl-reel: UDP listening on 0.0.0.0:50000
reelyActive hlc-server is listening on port 3001
@reelyActive - do you have any propositions?
Glad to see there’s still interest in this thread! @orzechszek, there have been several iterations of our open source software since the thread began. For the MQTT feature to work with OpenHAB, you’ll want to install hlc-server 0.x, as the code no longer applies to 1.x.
The documentation for the MQTT service is in barnacles v0.4: GitHub - reelyactive/barnacles at release-0.4
If we were to revive integration today, we would recommend using Pareto Anywhere (the current evolution of hlc-server) and we would create a separate barnacles-mqtt module to forward the data, unless OpenHAB can ingest socket.io data, in which case it could grab the real-time data feed from Pareto Anywhere on port 3001.
Let us know if there’s interest to revive and improve, or if the legacy code does the job fine? Thanks!
Hi @reelyActive ,
Thanks for info!! I would be grateful if you provide how to cover cooperation with openhab in a new way.
I’m in the beggining of configuration so I can try a pareto approach.
I run pareto-anywhere. What’s next? When I use barnowl-hci-forwarder I’m able to read BT notifications in pareto.
Can I set up pareto configuration to start forwarder automatically?
Should I push messages to mosquitto somehow or get directly from pareto ?
Can you provide some needed configuration examples?