{"id":18515212,"url":"https://github.com/sebastianha/um34c","last_synced_at":"2025-04-09T06:34:52.409Z","repository":{"id":49033765,"uuid":"142290626","full_name":"sebastianha/um34c","owner":"sebastianha","description":"A small NodeJS tool to read out and control the UM34C (or UM24C / UM25C) USB analyzer via Bluetooth","archived":false,"fork":false,"pushed_at":"2022-12-10T16:22:38.000Z","size":1885,"stargazers_count":49,"open_issues_count":4,"forks_count":12,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-24T01:02:40.036Z","etag":null,"topics":["analyzer","nodejs","um24c","um25c","um34c","usb"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sebastianha.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-07-25T11:26:45.000Z","updated_at":"2024-02-01T15:56:37.000Z","dependencies_parsed_at":"2023-01-26T09:16:49.104Z","dependency_job_id":null,"html_url":"https://github.com/sebastianha/um34c","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebastianha%2Fum34c","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebastianha%2Fum34c/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebastianha%2Fum34c/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebastianha%2Fum34c/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sebastianha","download_url":"https://codeload.github.com/sebastianha/um34c/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247993658,"owners_count":21030043,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["analyzer","nodejs","um24c","um25c","um34c","usb"],"created_at":"2024-11-06T15:46:54.991Z","updated_at":"2025-04-09T06:34:47.389Z","avatar_url":"https://github.com/sebastianha.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Description\nUM34C 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](https://www.banggood.com/RUIDENG-UM34-UM34C-For-APP-USB-3_0-Type-C-DC-Voltmeter-Ammeter-Voltage-Current-Meter-Tester-p-1297185.html)\n\n![](/um34c_small.jpg?raw=true)\n\n# Install\nJust run: `npm install`\n\nMake sure that bluetooth dev libs are installed. Currently this tool is only tested on Linux.\n\n```\nOn Ubuntu run: apt-get install -y libbluetooth-dev\nOn Opensuse run: zypper install bluez-devel\n```\n# Usage\nWhen 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:\n```\n\u003e ./app.js -h\n\n  Usage: app [options]\n\n  Options:\n\n    -V, --version                      output the version number\n    -a, --address [AB:90:78:56:36:95]  Connect to Bluetooth address\n    -i, --interval [ms]                Data query interval (default 1000ms, min 500ms)\n    -p, --print                        Print data on stdout as JSON\n    -c, --csv                          Print data on stdout as CSV\n    -r, --remote                       Show remote control help\n    -s, --server [port]                Start HTTP / WebSockets server\n    -h, --help                         output usage information\n```\n\n## Address\nWhen 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.\n\n## Interval\nThe interval the program will query data from the UM34C in ms. Default interval is 1000ms.\n\n## Print\nAdd this command line argument to print the data values on stdout. Use [JQ](https://github.com/stedolan/jq) to pretty print or to filter the data:\n\nPretty print:\n\n`./app.js -a AB:90:78:56:36:95 -p | while read D; do echo $D | jq .; done`\n\nShow voltage only:\n\n`./app.js -a AB:90:78:56:36:95 -p | while read D; do echo $D | jq .voltage; done`\n\n## CSV\nUse this to output CSV style data on stdout. This will also print the headers as well.\n\nOutput to CSV:\n`./app.js -a AB:90:78:56:36:95 -c \u003e sampleData.csv`\n\nSample Data:\n\n```\ntimestamp,voltage,current,power,temperature_celsius,temperature_fahrenheit,dataline_plus,dataline_minus,resistence,mode_name,mode_number,unknown0\n1589300924385,5.19,0,0,21,70,0,0,9999.9,DCP1.5A,7,27395\n1589300925378,5.19,0,0,21,70,0,0,9999.9,DCP1.5A,7,27395\n1589300926367,5.19,0,0,21,70,0,0,9999.9,DCP1.5A,7,27395\n1589300927352,5.19,0,0,21,70,0,0,9999.9,DCP1.5A,7,27395\n1589300928361,5.19,0,0,21,70,0.01,0,9999.9,DCP1.5A,7,27394\n1589300929355,5.19,0,0,21,70,0.01,0,9999.9,DCP1.5A,7,27394\n1589300930340,5.19,0,0,21,70,0.01,0,9999.9,DCP1.5A,7,27394\n1589300931343,5.19,0,0,21,70,0.01,0,9999.9,DCP1.5A,7,27394\n1589300932338,5.19,0,0,21,70,0,0,9999.9,DCP1.5A,7,27395\n1589300933327,5.19,0,0,21,70,0,0,9999.9,DCP1.5A,7,27395\n1589300934486,5.19,0,0,21,70,0.01,0,9999.9,DCP1.5A,7,27394\n1589300935322,5.19,0,0,21,70,0.01,0,9999.9,DCP1.5A,7,27394\n```\n\n## Remote\nWhen running commands can be send to the device to control it:\n```\n./app.js -r\nPress the following keys while the device is connected:\n\u003cright\u003e: Switch to next screen\n \u003cleft\u003e: Switch to previous screen\n    \u003cr\u003e: Rotate screen Clockwise\n    \u003cg\u003e: Toggle through groups\n    \u003cC\u003e: Reset current group (shift+c)\n    \u003cb\u003e: Change brightness\n```\n\n## Server\nThis 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.\n\n# Data\nThe following data can be received from the device:\n```\n{\n        // Timestamp of the current data in ms\n        \"timestamp\": 1532519945850,\n        // Voltage in \"V\"\n        \"voltage\": 5.03,\n        // Current in \"A\"\n        \"current\": 0,\n        // Power in \"W\"\n        \"power\": 0,\n        // Temperature\n        \"temperature\": {\n                \"celsius\": 24,\n                \"fahrenheit\": 75\n        },\n        // Selected group\n        \"group\": 0,\n        // Data of all groups, will be filled later, in \"mAh\" and \"mWh\"\n        \"groups\": [\n                {\n                        \"current\": 0,\n                        \"power\": 0\n                },\n                {\n                        \"current\": 0,\n                        \"power\": 0\n                },\n                {\n                        \"current\": 0,\n                        \"power\": 0\n                },\n                {\n                        \"current\": 0,\n                        \"power\": 0\n                },\n                {\n                        \"current\": 0,\n                        \"power\": 0\n                },\n                {\n                        \"current\": 0,\n                        \"power\": 0\n                },\n                {\n                        \"current\": 0,\n                        \"power\": 0\n                },\n                {\n                        \"current\": 0,\n                        \"power\": 0\n                },\n                {\n                        \"current\": 0,\n                        \"power\": 0\n                },\n                {\n                        \"current\": 0,\n                        \"power\": 0\n                }\n        ],\n        // USB data line voltage in \"V\"\n        \"dataline\": {\n                \"plus\": 0.01,\n                \"minus\": 0.01\n        },\n        // Charging mode, name is set if known\n        \"mode\": {\n                \"name\": \"DCP1.5A\",\n                \"number\": 7\n        },\n        // Record page\n        \"record\": {\n                // Current in \"mAh\"\n                \"current\": 0,\n                // Power in \"mWh\"\n                \"power\": 0,\n                // Threshold to record data in \"A\"\n                \"threshold\": 0.29,\n                // Recorded time in seconds\n                \"time\": 0\n        },\n        // Seems to be 1 if a device is connected\n        \"connected\": false,\n        \"settings\": {\n                // Screen timeout in minutes\n                \"timeout\": 1,\n                // Brightness from 0 to 5\n                \"brightness\": 5\n        },\n        // Resistence in \"Ohm\"\n        \"resistence\": 9999.9,\n        // Currently selected screen\n        \"screen\": 0,\n        // No idea what what this value could be, is higher when a load is present\n        \"unknown0\": 26786\n}\n```\n\n# License\nCopyright (c) 2019 Sebastian Hammerl\n\nLicensed under the GPLV3 License\n\nManual from https://www.mediafire.com/folder/5c877rc21tp1p/UM34\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsebastianha%2Fum34c","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsebastianha%2Fum34c","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsebastianha%2Fum34c/lists"}