You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Is it possible to action and control the rumble of the joycon? #16
The "HD Rumble" feature is somewhatcomplicated.
Its been a while since i last worked on this, but from what I glanced it seems to support both sequencing and layering of multiple rumble frequencies.
Thanks for the link. Do you know how to activate the rumble, is there a boolean flag or is it done via the encoded amplitude only ?
Also, do you know how to send the commands to the joycon via the python api?
We use this function to send the commands to the joycon.
Note that every command includes rumble data which we've simply hardcoded to do nothing at the moment.
Use this command and this subcommand to send rumble data whenever.
For the benefit of future viewers of this issue, I was able to get this working by pulling the values (look at simple_rumble) from this pull request: #27
I'm also quiet interested by this however I still don't get how to handle the rumbling duration. I see in @ericries code a mention to self.time but this is never used. Furthermore in the [https.github.com/dekuNukem/Nintendo_Switch_Reverse_Engineering/blob/master/bluetooth_hid_notes.md] info it states that there is
A timing byte, then 4 bytes of rumble data for left Joy-Con, followed by 4 bytes for right Joy-Con.
If I'm not mistaken I only count eight bytes in all the above examples, isn't there something missing ?
PS: with random testing I found that sending b"\x05\x10\x10\x05\x05\x10\x10\x05" sends a short (<100ms) and soft rumble to my joycon
I don't understand how the bytes relate to time. What I used as a workaround is simply to turn the vibration off using enable_vibration(False) after x amount of time. The basic rumble seems to last for 1500 milliseconds or so, which is longer than I need. So I just trigger it and then turn it off to create various kinds of pulsing effects. Surely there is a better way, but I haven't seen it in any of the libraries around
I’m running into the following error with ericries’ script:
Traceback (most recent call last): File "/home/romang/ocr_proj/Test/OCR_test/joycon-python.py", line 105, in <module> joyconL = RumbleJoyCon(*joycon_id_left) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/romang/ocr_proj/Test/OCR_test/joycon-python.py", line 15, in __init__ JoyCon.__init__(self, *args, **kwargs) File "/home/romang/ocr_proj/venv/lib/python3.11/site-packages/pyjoycon/joycon.py", line 25, in __init__ raise ValueError(f'vendor_id is invalid: {vendor_id!r}') ValueError: vendor_id is invalid: None
Activity
Tetsujinfr commentedon Sep 18, 2020
Anyone? Pointing me to some documentation? Thanks in advance
pbsds commentedon Jan 29, 2021
The "HD Rumble" feature is somewhat complicated.
Its been a while since i last worked on this, but from what I glanced it seems to support both sequencing and layering of multiple rumble frequencies.
Tetsujinfr commentedon Jan 29, 2021
Thanks for the link. Do you know how to activate the rumble, is there a boolean flag or is it done via the encoded amplitude only ?
Also, do you know how to send the commands to the joycon via the python api?
pbsds commentedon Jan 30, 2021
We use this function to send the commands to the joycon.
Note that every command includes rumble data which we've simply hardcoded to do nothing at the moment.
Use this command and this subcommand to send rumble data whenever.
ericries commentedon Sep 1, 2022
I'm interested in this as well. I have tried following your suggestions above with something like:
but I am not sure how to permute the argument data to get actual rumble activity. Am I on the right track? is it simply a matter of converting the math at https://github.com/dekuNukem/Nintendo_Switch_Reverse_Engineering/blob/master/rumble_data_table.md into a pythonic equivalent? would that be a helpful patch for this library, if I could get it to work?
ericries commentedon Sep 1, 2022
For the benefit of future viewers of this issue, I was able to get this working by pulling the values (look at simple_rumble) from this pull request:
#27
ericries commentedon Sep 3, 2022
Again for future reference, here is how to control the rumble effect in the joycon
LucasJoseph commentedon Sep 3, 2022
I'm also quiet interested by this however I still don't get how to handle the rumbling duration. I see in @ericries code a mention to
self.timebut this is never used. Furthermore in the [https.github.com/dekuNukem/Nintendo_Switch_Reverse_Engineering/blob/master/bluetooth_hid_notes.md] info it states that there isIf I'm not mistaken I only count eight bytes in all the above examples, isn't there something missing ?
PS: with random testing I found that sending
b"\x05\x10\x10\x05\x05\x10\x10\x05"sends a short (<100ms) and soft rumble to my joyconericries commentedon Sep 4, 2022
I don't understand how the bytes relate to time. What I used as a workaround is simply to turn the vibration off using enable_vibration(False) after x amount of time. The basic rumble seems to last for 1500 milliseconds or so, which is longer than I need. So I just trigger it and then turn it off to create various kinds of pulsing effects. Surely there is a better way, but I haven't seen it in any of the libraries around
rgitelman commentedon Jan 27, 2025
I’m running into the following error with ericries’ script:
Traceback (most recent call last): File "/home/romang/ocr_proj/Test/OCR_test/joycon-python.py", line 105, in <module> joyconL = RumbleJoyCon(*joycon_id_left) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/romang/ocr_proj/Test/OCR_test/joycon-python.py", line 15, in __init__ JoyCon.__init__(self, *args, **kwargs) File "/home/romang/ocr_proj/venv/lib/python3.11/site-packages/pyjoycon/joycon.py", line 25, in __init__ raise ValueError(f'vendor_id is invalid: {vendor_id!r}') ValueError: vendor_id is invalid: NoneIt seems related to this issue: #15
Am I missing something? Any help would be appreciated!