atagulalan / arctis-battery-percentage Goto Github PK
View Code? Open in Web Editor NEW๐ Shows SteelSeries Arctis wireless device's battery percentages as a notification.
License: MIT License
๐ Shows SteelSeries Arctis wireless device's battery percentages as a notification.
License: MIT License
Hi man,
Great project! Cool to see people volunteer their time to adding features SteelSeries neglect.
Do you think it would be possible to expand on the functionality your project to also include wireless mice?
I have a Rival 650 Wireless, and apparently SteelSeries think using the scroll wheel as the only battery indicator was sufficient.
I would love to be able to display the battery level on the display of my Apex Pro keyboard.
im new to nodejs
i keep on getting this line in my code
prebuild-install WARN install No prebuilt binaries found (target=14.15.4 runtime=node arch=x64 libc= platform=win32)
then followed by this
warning c4290 c++ exception specification ignored
is there anyway to fix ?
could it be the reason that i have do not have the system in English ?
thank you.
Expected: script shows battery percentage for Arctis 9
Actual: script shows nothing, more info below after brief debugging
More context:
Hi,
I found this repo and it looks like a way to get missing feature for Arctis 9 of checking the battery state in some reasonable way.
(I don't consider gg app reasonable, way to bloated with unnecessary stuff :/)
I found issue:
#10
But it seems change didn't work. At lest for me script still fails to find the proper device.
(Win 10, PC variant of Arctis 9)
I'm more than happy to get script working on my device with some guidance on how this should work and how to debug it.
If there is a good fix I could contribute a PR.
Listing Devices I found:
7 copies of Razer Taipan, that seems to be my mouse, not sure why it appears 7 times...
5 copies of unnamed "{vendorId: 4617, productId: 8705,}" that seems to be my Rise Keyboard as it disappeared when i switched keyboards
4 copies of Arctis 9: https://pastebin.com/jwcaSsyv
Vendor is 4952 as expected, but productId are 3x 4802 and 4804 (in hex 0x12C2 and 0x12C4 )
0x12C2 would match the script spec, but usage is set to 1 whatever that means, so it gets filtered out.
PS I think I'll contribute a PR with "No matching Arctis device detected." as current lack of any message when all devices are not matching is confusing.
This is incredibly helpful - it took me 60 seconds from finding this result on Google to finally finding out what the battery percentage on my headset is. And the desktop notification is a great touch too. Thank you, that is all ๐
There are a number of issues with running this on Node 14/16.
Are there any packages that break with that node version?
Open to contributing a PR if necessary
I tried adding [4152, 0x2212], // Arctis 7P+
to the series list but none of the d.usage !== 1
conditions pass, getting rid of that condition and trying all of them still doesn't work
Hi, I'm looking to make a quick script to turn off the setting "blink LED when headset is off".
How did you know what data to write to the device in order to get back the battery percentage? Is there a way to output features that the headset has?
I just downloaded the cource code but I want to add my Steelseries Rival 650 mouse, where did you get all the device info that you have in the code?
Hey,
i might say, quite a good job with this! one thing i though might be useful - a taskbar icon, e.g just like cpu/gpu temperature. I hope it's not hard to implement, some other people could find it useful as well ;)
Headset plugged and working but still getting "Your SteelSeries Arctis 7 device's battery percentage is 0" on cmd and "Please connect your SteelSeries Wireless Device first" on notifications panel.
First of all, thanks for spending your free time to make up for Steelseries missing basic features. I was facing some issues while trying to use your project. My setup is the following:
It's super convenient to have a npm package. Unfortunately it is not working for me. I installed it globally using npm i -g arctis-battery-percentage
but when I call arctis-battery
no output is shown on the command line.
C:\>arctis-battery
C:\>
In issue #10 @ateee0907 was facing the same issue. You were asking him to execute the script locally, so I decided to do the same. When executing node ./percentage.js
in the main directory, I get an error message, complaining that path module isn't defined.
C:\arctis-battery-percentage-master>node ./percentage.js
Initializing...
Your Arctis 1 Wireless device's battery percentage is 3
C:\arctis-battery-percentage-master\percentage.js:48
arctis-battery-percentage-master\percentage.js:48
icon: path.join(__dirname, `./images/${percentage}.png`),
^
ReferenceError: path is not defined
So I went ahead and required the path module in the beginning of your script by adding const path = require('path')
.
After that the error vanishes. Is this error and behaviour expected?
After I was able to get the script going, the desired cli output and notification showed up. Unfortunately the returned value is wrong (see screenshot). I just fully loaded the headset which you can clearly see in SteelSeries Engine in the background.
When executing the script nothing happens until I click on the SteelSeries Engine window. I guess the arctis-usb-finder
module is only able to find the headset when SteelSeries Engine is active. Is this expected?
Sorry for reporting multiple issues within one GitHub issue, but I'm not sure if they are somehow connected, so I decided to put them all in one issue. And once again, I'm grateful for your efforts on this topic, I just can't quite get it to work. If you need further information on investigating this issue, just let me know ๐
device.readSync()
is waiting for response and when i open sse3 windowed (or focused) is working but i need this data immediately. My headphone is Actris 1 Wireless
Code :
// Act 1 w serie arr = [4152, 4787]
devices
.filter((d) => {
return series.some((s) => {
return d.vendorId === s[0] && d.productId === s[1] && d.usage !== 1
})
})
.forEach((deviceInfo) => {
var device = new HID.HID(deviceInfo.path)
//device.setNonBlocking(true)
if (!device) {
console.log('Could not find device :(')
process.exit(1)
}
try {
device.write([0x06, 0x18])
device.resume()
var report = device.readSync()
console.log(report);
callback(deviceInfo, report[3]) // i think my verisons percentage is 4th elem.
} catch (error) {
console.log(error)
console.log('Error: Cannot write to Arctis Wireless device. Please replug the device.')
}
device.close()
})
https://github.com/atagulalan/arctis-battery-percentage/blob/master/percentage.js#L32
Should read "Arctis", not "Actris".
I am kinda beginner with all this node stuff and while i took a while to research answers to install those modules right way i didnt get it to work. I would be really happy to learn how to do this with more depth on install tutorial and it would be good for other beginners that are trying to get this awesomeness to work.
npm ERR! code ENOENT
npm ERR! syscall spawn git
npm ERR! path git
npm ERR! errno -4058
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t git://github.com/atagulalan/arctis-battery-percentage.git
npm ERR! enoent
npm ERR! enoent
npm ERR! enoent spawn git ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\lenovo\AppData\Roaming\npm-cache_logs\2021-10-22T11_07_24_403Z-debug.log
Would be super convenient if this all got wrapped up into something that was distributable to end users without having to install a full node dev environment.
hi there, so i am pretty new to this programs and i really have no idea on how to install it, can someone please guide me through the process step by step, i already installed node.js thanks
Hey!
First of all thanks for this script.
I have brand new Arctis 9 headset.
Does this script support it ? Or only the older version of this headsets?
Thank you in advance.
I have no idea how to install this, please help :(
Hi,
I would like to install your software on my Linux Manjaro distribution.
However, I run into an issue when I have tried to install it.
Look my terminal output.
npm WARN checkPermissions Missing write access to /usr/lib/node_modules
npm ERR! code EACCES
npm ERR! syscall access
npm ERR! path /usr/lib/node_modules
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, access '/usr/lib/node_modules'
npm ERR! [Error: EACCES: permission denied, access '/usr/lib/node_modules'] {
npm ERR! stack: "Error: EACCES: permission denied, access '/usr/lib/node_modules'",
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/lib/node_modules'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/olivier/.npm/_logs/2019-10-30T16_41_10_091Z-debug.log
$ sudo npm i -g arctis-battery-percentage
/usr/bin/arctis-battery -> /usr/lib/node_modules/arctis-battery-percentage/percentage.js
> [email protected] install /usr/lib/node_modules/arctis-battery-percentage/node_modules/node-hid
> prebuild-install || node-gyp rebuild
prebuild-install WARN install EACCES: permission denied, access '/root/.npm'
gyp WARN EACCES current user ("nobody") does not have permission to access the dev dir "/root/.cache/node-gyp/12.13.0"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/lib/node_modules/arctis-battery-percentage/node_modules/node-hid/.node-gyp"
gyp WARN install got an error, rolling back install
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/arctis-battery-percentage/node_modules/node-hid/.node-gyp'
gyp ERR! System Linux 5.3.7-2-MANJARO
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/lib/node_modules/arctis-battery-percentage/node_modules/node-hid
gyp ERR! node -v v12.13.0
gyp ERR! node-gyp -v v6.0.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `prebuild-install || node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install 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! /root/.npm/_logs/2019-10-30T16_41_40_858Z-debug.log
I don't think that your sofware is only for Windows but for Linux too.
Could you help me for resolving this issue.
You should make a PKBUILD and done an ask for getting it in AUR Package.
BTW. I have a Steelseries Artic Silver 7 Edition 2019.
By advance, thanks a lot.
gyp ERR! find Python You need to install the latest version of Python.
gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
gyp ERR! find Python you can try one of the following options:
Is it possible that python is needed? Or what am i doing wrong?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.