All Projects → sebastianha → Um34c

sebastianha / Um34c

Licence: gpl-3.0
A small NodeJS tool to read out and control the UM34C (or UM24C / UM25C) USB analyzer via Bluetooth

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Um34c

Sonar Java
☕️ SonarSource Static Analyzer for Java Code Quality and Security
Stars: ✭ 745 (+1969.44%)
Mutual labels:  analyzer
Audioxtreamer
ASIO driver, Usb Driver, FX2LP Firmware, VHDL Fpga, Schematics & PCB Layout for the AudioXtreamer, a USB 2.0 32ch Audio/Midi interface for retrofitting into digital mixers/interfaces.
Stars: ✭ 22 (-38.89%)
Mutual labels:  usb
Xow
Linux driver for the Xbox One wireless dongle
Stars: ✭ 947 (+2530.56%)
Mutual labels:  usb
Libaums
Open source library to access USB Mass Storage devices on Android without rooting your device
Stars: ✭ 769 (+2036.11%)
Mutual labels:  usb
Hidsensor
USB HID Sensor implementation for PIC16F1454 and STM32F072
Stars: ✭ 19 (-47.22%)
Mutual labels:  usb
Hidpytoy
A GUI app for playing with HID devices, written in Python
Stars: ✭ 25 (-30.56%)
Mutual labels:  usb
Ns Usbloader
Awoo Installer/TinFoil/GoldLeaf NSPs (and other files) uploader and RCM tool. Also a tool for split files and merge them back.
Stars: ✭ 708 (+1866.67%)
Mutual labels:  usb
Usbip Windows
USB/IP for Windows
Stars: ✭ 36 (+0%)
Mutual labels:  usb
Lcd2usb
LCD2USB's Python Library
Stars: ✭ 19 (-47.22%)
Mutual labels:  usb
Lsusb
Most popular USB devices and lsusb reports
Stars: ✭ 19 (-47.22%)
Mutual labels:  usb
Circle
A C++ bare metal environment for Raspberry Pi with USB (32 and 64 bit)
Stars: ✭ 816 (+2166.67%)
Mutual labels:  usb
Pronto Fasterer
Pronto runner for Fasterer, speed improvements suggester
Stars: ✭ 18 (-50%)
Mutual labels:  analyzer
Rubber Ducky Library For Arduino
An Arduino library that allows you to use a cheap Arduino (Leonardo) as a Rubber Ducky
Stars: ✭ 25 (-30.56%)
Mutual labels:  usb
Node Escpos
🖨️ ESC/POS Printer driver for node
Stars: ✭ 752 (+1988.89%)
Mutual labels:  usb
Humorchecker
[Mirror] Port of Sentimental library into Go
Stars: ✭ 31 (-13.89%)
Mutual labels:  analyzer
Vigembus
Windows kernel-mode driver emulating well-known USB game controllers.
Stars: ✭ 721 (+1902.78%)
Mutual labels:  usb
Libwdi
Windows Driver Installer library for USB devices
Stars: ✭ 928 (+2477.78%)
Mutual labels:  usb
Sitrep
A source code analyzer for Swift projects.
Stars: ✭ 984 (+2633.33%)
Mutual labels:  analyzer
Social Analyzer
API, CLI & Web App for analyzing & finding a person's profile across +1000 social media \ websites (Detections are updated regularly by automated systems)
Stars: ✭ 8,449 (+23369.44%)
Mutual labels:  analyzer
Usbmuxd
A socket daemon to multiplex connections from and to iOS devices
Stars: ✭ 847 (+2252.78%)
Mutual labels:  usb

Description

UM34C is a small NodeJS tool to read out and control the UM34C (an probably also the UM24C / UM25C, untested!) USB analyzer via Bluetooth. Get the UM34C device here: Banggood

Install

Just run: npm install

Make sure that bluetooth dev libs are installed. Currently this tool is only tested on Linux.

On Ubuntu run: apt-get install -y libbluetooth-dev
On Opensuse run: zypper install bluez-devel

Usage

When started without command line options the tool will search for a device named "UM34C" and connect to it. The following command line arguments are available:

> ./app.js -h

  Usage: app [options]

  Options:

    -V, --version                      output the version number
    -a, --address [AB:90:78:56:36:95]  Connect to Bluetooth address
    -i, --interval [ms]                Data query interval (default 1000ms, min 500ms)
    -p, --print                        Print data on stdout as JSON
    -c, --csv                          Print data on stdout as CSV
    -r, --remote                       Show remote control help
    -s, --server [port]                Start HTTP / WebSockets server
    -h, --help                         output usage information

Address

When you know the Bluetooth address of your device you can connect to it directly. This will speed up the process of connecting and allows connecting to the device when it is not visible anymore.

Interval

The interval the program will query data from the UM34C in ms. Default interval is 1000ms.

Print

Add this command line argument to print the data values on stdout. Use JQ to pretty print or to filter the data:

Pretty print:

./app.js -a AB:90:78:56:36:95 -p | while read D; do echo $D | jq .; done

Show voltage only:

./app.js -a AB:90:78:56:36:95 -p | while read D; do echo $D | jq .voltage; done

CSV

Use this to output CSV style data on stdout. This will also print the headers as well.

Output to CSV: ./app.js -a AB:90:78:56:36:95 -c > sampleData.csv

Sample Data:

timestamp,voltage,current,power,temperature_celsius,temperature_fahrenheit,dataline_plus,dataline_minus,resistence,mode_name,mode_number,unknown0
1589300924385,5.19,0,0,21,70,0,0,9999.9,DCP1.5A,7,27395
1589300925378,5.19,0,0,21,70,0,0,9999.9,DCP1.5A,7,27395
1589300926367,5.19,0,0,21,70,0,0,9999.9,DCP1.5A,7,27395
1589300927352,5.19,0,0,21,70,0,0,9999.9,DCP1.5A,7,27395
1589300928361,5.19,0,0,21,70,0.01,0,9999.9,DCP1.5A,7,27394
1589300929355,5.19,0,0,21,70,0.01,0,9999.9,DCP1.5A,7,27394
1589300930340,5.19,0,0,21,70,0.01,0,9999.9,DCP1.5A,7,27394
1589300931343,5.19,0,0,21,70,0.01,0,9999.9,DCP1.5A,7,27394
1589300932338,5.19,0,0,21,70,0,0,9999.9,DCP1.5A,7,27395
1589300933327,5.19,0,0,21,70,0,0,9999.9,DCP1.5A,7,27395
1589300934486,5.19,0,0,21,70,0.01,0,9999.9,DCP1.5A,7,27394
1589300935322,5.19,0,0,21,70,0.01,0,9999.9,DCP1.5A,7,27394

Remote

When running commands can be send to the device to control it:

./app.js -r
Press the following keys while the device is connected:
<right>: Switch to next screen
 <left>: Switch to previous screen
    <r>: Rotate screen Clockwise
    <g>: Toggle through groups
    <C>: Reset current group (shift+c)
    <b>: Change brightness

Server

This will start a HTTP / WebSocket server which currently does not much but showing the data in the console of the browser. Optionally add the listening port, default is 8000.

Data

The following data can be received from the device:

{
        // Timestamp of the current data in ms
        "timestamp": 1532519945850,
        // Voltage in "V"
        "voltage": 5.03,
        // Current in "A"
        "current": 0,
        // Power in "W"
        "power": 0,
        // Temperature
        "temperature": {
                "celsius": 24,
                "fahrenheit": 75
        },
        // Selected group
        "group": 0,
        // Data of all groups, will be filled later, in "mAh" and "mWh"
        "groups": [
                {
                        "current": 0,
                        "power": 0
                },
                {
                        "current": 0,
                        "power": 0
                },
                {
                        "current": 0,
                        "power": 0
                },
                {
                        "current": 0,
                        "power": 0
                },
                {
                        "current": 0,
                        "power": 0
                },
                {
                        "current": 0,
                        "power": 0
                },
                {
                        "current": 0,
                        "power": 0
                },
                {
                        "current": 0,
                        "power": 0
                },
                {
                        "current": 0,
                        "power": 0
                },
                {
                        "current": 0,
                        "power": 0
                }
        ],
        // USB data line voltage in "V"
        "dataline": {
                "plus": 0.01,
                "minus": 0.01
        },
        // Charging mode, name is set if known
        "mode": {
                "name": "DCP1.5A",
                "number": 7
        },
        // Record page
        "record": {
                // Current in "mAh"
                "current": 0,
                // Power in "mWh"
                "power": 0,
                // Threshold to record data in "A"
                "threshold": 0.29,
                // Recorded time in seconds
                "time": 0
        },
        // Seems to be 1 if a device is connected
        "connected": false,
        "settings": {
                // Screen timeout in minutes
                "timeout": 1,
                // Brightness from 0 to 5
                "brightness": 5
        },
        // Resistence in "Ohm"
        "resistence": 9999.9,
        // Currently selected screen
        "screen": 0,
        // No idea what what this value could be, is higher when a load is present
        "unknown0": 26786
}

License

Copyright (c) 2019 Sebastian Hammerl

Licensed under the GPLV3 License

Manual from https://www.mediafire.com/folder/5c877rc21tp1p/UM34

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].