Giter Site home page Giter Site logo

reelyactive / pi-suite Goto Github PK

View Code? Open in Web Editor NEW
21.0 7.0 5.0 20 KB

Enable context-aware physical spaces with a Raspberry Pi and Pareto Anywhere open source software. We believe in an open Internet of Things.

Home Page: https://reelyactive.github.io/diy/pi-suite/

License: MIT License

JavaScript 54.06% Shell 45.94%
raspberry-pi bluetooth-low-energy hackaday tutorial ble-scanner pareto-anywhere rtls context-awareness

pi-suite's Introduction

pi-suite

Conveniently install and run the reelyActive open source software suite on a Raspberry Pi. The advent of BLE (Bluetooth Low Energy) on the Raspberry Pi 3B made it possible to run our software to detect and identify all advertising devices in proximity, which was featured in Hackaday in 2016.

pi-relay

Then and Now

Our open source software has evolved since the Hackaday article:

  • Version 1.x is featured here and is the recommended option
  • Version 0.x which was featured in the article can be found in the release-0.2 branch and is considered legacy

Install and Run

Follow our step-by-step tutorials to prepare a Pi from scratch and install pi-suite:

Alternatively, if all prerequisites are indeed in place, getting up and running for the first time should be as easy as:

git clone https://github.com/reelyactive/pi-suite.git
cd pi-suite
npm install
npm start

License

MIT License

Copyright (c) 2016-2020 reelyActive

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

pi-suite's People

Contributors

jeffyactive avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

pi-suite's Issues

Raspberry Pi 2 with USB Bluetooth and WiFi help

I think npm install went off without a hitch after installing a dependency, but npm start gives me this:

reelyActive barnowl instance is listening for an open IoT
/home/pi/reelyActive/pi-suite/node_modules/@elastic/elasticsearch/api/api/ping.js:47
return this.transport.request(request, options, callback)
^

TypeError: Cannot read property 'transport' of undefined
at pingApi (/home/pi/reelyActive/pi-suite/node_modules/@elastic/elasticsearch/api/api/ping.js:47:15)
at retryUntilSuccess (/home/pi/reelyActive/pi-suite/node_modules/hlc-server/lib/elasticmanager.js:122:3)
at ElasticManager.notifyOnElasticsearchRunning (/home/pi/reelyActive/pi-suite/node_modules/hlc-server/lib/elasticmanager.js:43:5)
at new HLCServer (/home/pi/reelyActive/pi-suite/node_modules/hlc-server/lib/hlcserver.js:99:18)
at Object. (/home/pi/reelyActive/pi-suite/bin/pi-suite:10:11)
at Module._compile (internal/modules/cjs/loader.js:1138:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
at Module.load (internal/modules/cjs/loader.js:986:32)
at Function.Module._load (internal/modules/cjs/loader.js:879:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: node bin/pi-suite
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/pi/.npm/_logs/2020-10-24T01_18_17_230Z-debug.log

Any ideas!

Got this after installation / at start pi-suite

Hi,

got this error after start pi suite. What am i doing wrong?

pi@schwabopi:~/reelyActive/pi-suite $ sudo node pi-suite
reelyActive BarnOwl instance is listening for an open IoT
reelyActive Barnacles instance is notifying an open IoT
reelyActive Barterer instance is exchanging data in an open IoT
reelyActive Chickadee instance is curious to associate metadata in an open IoT
events.js:183
throw er; // Unhandled 'error' event
^

Error: File descriptor in bad state
at setScanEnable (/home/pi/reelyActive/pi-suite/node_modules/barnowl/lib/core/listenerservice/hcilistener.js:215: 10)
at openHciSocket (/home/pi/reelyActive/pi-suite/node_modules/barnowl/lib/core/listenerservice/hcilistener.js:87:3 )
at new HCIListener (/home/pi/reelyActive/pi-suite/node_modules/barnowl/lib/core/listenerservice/hcilistener.js:53 :3)
at createListener (/home/pi/reelyActive/pi-suite/node_modules/barnowl/lib/core/listenerservice/decodemanager.js:1 16:14)
at new DecodeManager (/home/pi/reelyActive/pi-suite/node_modules/barnowl/lib/core/listenerservice/decodemanager.j s:38:19)
at ListenerService.bind (/home/pi/reelyActive/pi-suite/node_modules/barnowl/lib/core/listenerservice/listenerserv ice.js:36:21)
at HardwareInterface.bind (/home/pi/reelyActive/pi-suite/node_modules/barnowl/lib/hardwareinterface.js:41:32)
at BarnOwl.bind (/home/pi/reelyActive/pi-suite/node_modules/barnowl/lib/barnowl.js:46:34)
at HLCServer.bind (/home/pi/reelyActive/pi-suite/node_modules/hlc-server/lib/server.js:205:21)
at Object. (/home/pi/reelyActive/pi-suite/pi-suite.js:17:5)

Can't play video in google slide

Loading google slide presentation with single slide with a video. The presentation and video are shared properly. From my workstation using chrome in incognito mode it plays fine. But using the pi-suite kiosk script. I get "Unable to play video. Error 5" If I change it to static slides it works fine. Not even sure where to begin troubleshooting this. Here's what I'm using to run chromium.
chromium-browser --display=:0 --kiosk --incognito --window-position=0,0 --autoplay-policy=no-user-gesture-required --enable-logging=stderr --v=1 > chromium_log.txt 2>&1 "url_for_presentation"

pi-suite failing on pi zero w

Followed the tutorial, getting the following error starting pi-suite.

i@raspberrypi:~/reelyActive/pi-suite $ sudo node pi-suite
/home/pi/reelyActive/pi-suite/node_modules/hlc-server/node_modules/barnacles/node_modules/socket.io/node_modules/debug/src/node.js:132
let val = process.env[key];
^^^

SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:373:25)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object. (/home/pi/reelyActive/pi-suite/node_modules/hlc-server/node_modules/barnacles/node_modules/socket.io/node_modules/debug/src/index.js:9:19)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)

$ node --version
v4.8.2

$ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
NAME="Raspbian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

Error start pi-suite-hci.service

Environment Raspberry Pi 4B
Fresh install of Raspberry OS Lite

Clone and ran pi-suite from the command-line: sudo npm run start-hci
It works fine.

However once I add the service to systemd, it fails to start:
image

Assume it is something with permissions?

HCI Bluetooth sniffing throwing error

Error in terminal:

reelyActive barnowl instance is listening for an open IoT
reelyActive Chickadee instance is curious to associate metadata in an open IoT
node:events:353
      throw er; // Unhandled 'error' event
      ^

Error: EPERM, Operation not permitted
    at setScanEnable (/home/pi/reelyActive/pi-suite/node_modules/barnowl-hci/lib/socketlistener.js:166:10)
    at openHciSocket (/home/pi/reelyActive/pi-suite/node_modules/barnowl-hci/lib/socketlistener.js:86:3)
    at new SocketListener (/home/pi/reelyActive/pi-suite/node_modules/barnowl-hci/lib/socketlistener.js:39:5)
    at BarnowlHci.addListener (/home/pi/reelyActive/pi-suite/node_modules/barnowl-hci/lib/barnowlhci.js:45:20)
    at prepareInterface (/home/pi/reelyActive/pi-suite/node_modules/barnowl/lib/barnowl.js:107:21)
    at Barnowl.addListener (/home/pi/reelyActive/pi-suite/node_modules/barnowl/lib/barnowl.js:55:27)
    at HLCServer.addListener (/home/pi/reelyActive/pi-suite/node_modules/hlc-server/lib/hlcserver.js:164:18)
    at Object.<anonymous> (/home/pi/reelyActive/pi-suite/bin/pi-suite-hci:13:5)
    at Module._compile (node:internal/modules/cjs/loader:1108:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)
Emitted 'error' event on BluetoothHciSocket instance at:
    at setScanEnable (/home/pi/reelyActive/pi-suite/node_modules/barnowl-hci/lib/socketlistener.js:166:10)
    [... lines matching original stack trace ...]
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10) {
  errno: 1,
  code: 'EPERM',
  syscall: 'write'
}
npm ERR! code 1
npm ERR! path /home/pi/reelyActive/pi-suite
npm ERR! command failed
npm ERR! command sh -c node bin/pi-suite-hci

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-12-30T15_46_07_696Z-debug.log

Cannot get Log file as i do not have Root permissions.

Cannot see any bluetooth devices

Hi!

I've installed the software on a RPI 3 b+ succesfully, but when I launch with "npm run start-reel" I get the following error:
barnowl-reel: error opening serial port Error Resource temporarily unavailable Cannot lock port

And no devices are shown under Tracking :( not sure how to solve this problem. Thanks for any help!

Setup of pi-suite on pi zero w with Raspbian Jessie

I'm trying to setup pi-suite on my pi zero w as described here. At first installation failed on bluetooth-hci-socket which bailed out with some permission problems during installation. It seemed --unsafe-perm fixed the problem, but in the end something seems missing. When starting pi-suite it fails with this error:

root@pizero:~/reelyActive/pi-suite# node ra-mqtt.js
reelyActive Barnacles instance is notifying an open IoT
reelyActive BarnOwl instance is listening for an open IoT
module.js:472
    throw err;
    ^

Error: Cannot find module '../build/Release/binding.node'
    at Function.Module._resolveFilename (module.js:470:15)
    at Function.Module._load (module.js:418:25)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/root/reelyActive/pi-suite/node_modules/bluetooth-hci-socket/lib/native.js:3:15)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)

Can you please help me debug this issue?

Cant install pi-suite

Tried to follow this guide:
https://reelyactive.github.io/make-a-pi-hub.html
But it fails at this:

mkdir ~/reelyActive
cd ~/reelyActive
git clone https://github.com/reelyactive/pi-suite.git
cd pi-suite
npm install

I get these errors at the 'npm install' part

pi@raspberrypi:~/reelyActive/pi-suite $ npm install

> [email protected] install /home/pi/reelyActive/pi-suite/node_modules/usb
> node-pre-gyp install --fallback-to-build

node-pre-gyp ERR! Tried to download: https://github.com/tessel/node-usb/releases/download/1.2.0/usb_bindings-v1.2.0-node-v48-linux-arm.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v48 ABI) (falling back to source compile with node-gyp)
make: Entering directory '/home/pi/reelyActive/pi-suite/node_modules/usb/build'
  CC(target) Release/obj.target/libusb/libusb/libusb/core.o
  CC(target) Release/obj.target/libusb/libusb/libusb/descriptor.o
  CC(target) Release/obj.target/libusb/libusb/libusb/hotplug.o
  CC(target) Release/obj.target/libusb/libusb/libusb/io.o
  CC(target) Release/obj.target/libusb/libusb/libusb/strerror.o
  CC(target) Release/obj.target/libusb/libusb/libusb/sync.o
  CC(target) Release/obj.target/libusb/libusb/libusb/os/poll_posix.o
  CC(target) Release/obj.target/libusb/libusb/libusb/os/threads_posix.o
  CC(target) Release/obj.target/libusb/libusb/libusb/os/linux_usbfs.o
  CC(target) Release/obj.target/libusb/libusb/libusb/os/linux_udev.o
../libusb/libusb/os/linux_udev.c:40:21: fatal error: libudev.h: No such file or directory
 #include <libudev.h>
                     ^
compilation terminated.
libusb.target.mk:131: recipe for target 'Release/obj.target/libusb/libusb/libusb/os/linux_udev.o' failed
make: *** [Release/obj.target/libusb/libusb/libusb/os/linux_udev.o] Error 1
make: Leaving directory '/home/pi/reelyActive/pi-suite/node_modules/usb/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/node/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Linux 4.9.35-v7+
gyp ERR! command "/usr/local/node/bin/node" "/usr/local/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/home/pi/reelyActive/pi-suite/node_modules/usb/src/binding/usb_bindings.node" "--module_name=usb_bindings" "--module_path=/home/pi/reelyActive/pi-suite/node_modules/usb/src/binding"
gyp ERR! cwd /home/pi/reelyActive/pi-suite/node_modules/usb
gyp ERR! node -v v6.11.2
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/node/bin/node /usr/local/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/pi/reelyActive/pi-suite/node_modules/usb/src/binding/usb_bindings.node --module_name=usb_bindings --module_path=/home/pi/reelyActive/pi-suite/node_modules/usb/src/binding' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/home/pi/reelyActive/pi-suite/node_modules/usb/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at emitTwo (events.js:106:13)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:891:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
node-pre-gyp ERR! System Linux 4.9.35-v7+
node-pre-gyp ERR! command "/usr/local/node/bin/node" "/home/pi/reelyActive/pi-suite/node_modules/usb/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /home/pi/reelyActive/pi-suite/node_modules/usb
node-pre-gyp ERR! node -v v6.11.2
node-pre-gyp ERR! node-pre-gyp -v v0.6.30
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/node/bin/node /usr/local/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/pi/reelyActive/pi-suite/node_modules/usb/src/binding/usb_bindings.node --module_name=usb_bindings --module_path=/home/pi/reelyActive/pi-suite/node_modules/usb/src/binding' (1)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/usb):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: `node-pre-gyp install --fallback-to-build`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
pi@raspberrypi:~/reelyActive/pi-suite $

Please help, i would love to use this software :)

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.