npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

haritorax-interpreter

v3.2.0

Published

Communicate with the HaritoraX trackers

Downloads

117

Readme

HaritoraX Interpreter

Showcase of the package output with debug logs on, showing the data such as tracker settings, info, and interpreted IMU data via the GX6 dongle

A node.js package that enables communication with the HaritoraX FBT trackers to read/write data to the trackers. No HaritoraConfigurator software needed (mostly)!

Check out the Haritora-GX(6/2) proof-of-concept repository here: https://github.com/JovannMC/haritora-gx-poc

  • A new proof-of-concept repo will be made soon, including all the information I've found about the trackers while developing this package!

Installation

npm install haritorax-interpreter

Documentation

Will write actual documentation at some point, for now refer to the source code, examples, and JSDoc comments. You may also see how it's used in SlimeTora!

Linux-specific instructions

For Linux users, you (or your users) need to do some setup depending on the connection mode so the package can communicate with the trackers:

Bluetooth Classic (SPP)/COM/Serial port

  • Run the following commands in your terminal:
    • sudo usermod -a -G dialout $USER
    • sudo usermod -a -G tty $USER
    • sudo usermod -a -G uucp $USER (for Arch-based distros)
  • Restart your computer

Bluetooth (LE)

See https://github.com/chrvadala/node-ble/tree/main?tab=readme-ov-file#provide-permissions for more info

  • Create a new dbus rule (e.g. /etc/dbus-1/system.d/node-ble.conf)
  • Insert the following as the contents, changing %userid% with your user
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
  "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
  <policy user="%userid%">
   <allow own="org.bluez"/>
    <allow send_destination="org.bluez"/>
    <allow send_interface="org.bluez.GattCharacteristic1"/>
    <allow send_interface="org.bluez.GattDescriptor1"/>
    <allow send_interface="org.freedesktop.DBus.ObjectManager"/>
    <allow send_interface="org.freedesktop.DBus.Properties"/>
  </policy>
</busconfig>
  • Restart your computer

Supported devices

| Device | Supported | Elbow/Hip support | |--------------------|-----------|-------------------| | HaritoraX Wireless | Y | Y | | HaritoraX 1.1B | Y | Y | | HaritoraX 1.1 | Y | Y | | HaritoraX 1.0 | Y | Y | | Haritora | ? | ? |

| Communication mode | Supported | |---------------------------|-----------| | Bluetooth (Low Energy) | Y | | Bluetooth Classic (COM) | Y | | GX6 Communication Dongle | Y | | GX2 Communication Dongle | Y |

Example

import { HaritoraX } from "haritorax-interpreter";

// connect to haritorax wireless, enable debug logs, allow printing of processIMUData() logs (lots of spam), print raw unprocessed data (more spam!)
let device = new HaritoraX("wireless", true, true, true);
// start connecting to dongles via GX dongles (COM connection), with the ports COM4, COM5, COM6, and COM7
device.startConnection("com", ["COM4", "COM5", "COM6", "COM7"]);

device.on("imu", (trackerName, rotation, gravity, ankle) => {
    // IMU data received, do stuff
});

setTimeout(() => {
    // apply the following settings to the rightAnkle tracker:
    // sensor mode: 1 (magnetometer enabled)
    // posture data transfer rate: 100FPS
    // sensor auto correction mode: accelerometer and gyroscope
    // ankle motion detection: enabled
    device.setTrackerSettings("rightAnkle", 1, 100, ['accel', 'gyro'], true);
}, 2000)

setTimeout(() => {
    device.stopConnection("com");
}, 10000)

Projects using package

  • SlimeTora - A program that connects any of the HaritoraX trackers to the SlimeVR server, supporting Bluetooth (classic), Bluetooth (low energy), and the GX(6/2) communication dongles for all the HaritoraX tracker models!

Let me know if you want to be featured here, if you are using this package in any project!

License

This package is licensed under the MIT License - see the LICENSE file for details.

Acknowledgements

  • SlimeTora - BracketProto - original inspiration for project, code for turning gravity into acceleration values
  • SlimeVR - SlimeVR contributors - the inspiration for SlimeTora, which then inspired this project
  • haritorax-slimevr-bridge - sim1222 - math for decoding the IMU packet data
  • Shiftall Discord - community - helping with testing the package (via SlimeTora)