-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
documentation of the dygma raise API #61
Comments
Hello! I started working on a Python API for Dygma. It's very work in progress, and it probably only supports my specific configuration, but hopefully, it's a start. The primary motivation was to configure my mapping in a YAML file and then use the Dygma CLI tool packaged with the API to sync it to the keyboard. Happy to get more eyes on this, and get anyone else to partner on this work |
Thanks @brandonchinn178! @massimiliano-della-rovere I paste here the questions that you emailed me related to this topic, so all the information it's in the same place: There will be APIs to program the keys or at least the protocol used with /dev/ttyACM0? it would be necessary having a description of both the protocol and the data structure ;) @algernon I don't have the tech knowledge to answer this question 😅 |
Hi!
Anything/part you need help with?
Bye,
Massimiliano
Il lun 16 mar 2020, 19:56 Brandon Chinn <notifications@github.com> ha
scritto:
… Hello! I started working on a Python API for Dygma. It's very work in
progress, and it probably only supports my specific configuration, but
hopefully, it's a start.
The primary motivation was to configure my mapping in a YAML file and then
use the Dygma CLI tool packaged with the API to sync it to the keyboard.
Happy to get more eyes on this, and get anyone else to partner on this work
https://github.com/brandonchinn178/dygma
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#61 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAHGPTJJGDI6DVHUGJ2NZ23RHZY47ANCNFSM4LGNCJ4Q>
.
|
Hi @massimiliano-della-rovere! It sounds like you basically want some function you can call that can change a specific key to a color, maybe
? If that's the case, implementing
The downside is that the key color would be erased when re-syncing the config file, but I think that's fine for now? |
Hi Brandon!
My idea is to use some underglow leds as notifiers for async events, such
as new unread emails, tweets, etc; using a mapping stored in a file, you
will be able to link each led to a specific event checker.
Event checker are plugins for the main program and they basically do only
thing: when asked by the main program loop, answer with a pair of vars
(status: activate/deactivate/no_change and ids: list of led IDs the status
must be applied to).
My current plan is making them pulse (like the caps lock key when it's
active), so that - no matter the current color - the notification will
always be noticeable (notification by pulsing).
Because the notification must be reset when the causing reason ends, there
should be a way to restore the correct the led color; this means that I
must be able to read both the *currently* active layer from the keyboard
and its configuration from an *official* location, but sadly *Bazecor* neither
does offer an command line option to read the configuration from a file nor
does use a file to store the layers.
Bazecor should have a mode to use a configuration file, resolving to read
data from the keyboard only when the configuration file is missing or its
content invalid; @luis are there plans to introduce such mode?
Let's see when I have some spare time to implement this.
Il giorno lun 16 mar 2020 alle ore 21:34 Brandon Chinn <
notifications@github.com> ha scritto:
… Hi @massimiliano-della-rovere
<https://github.com/massimiliano-della-rovere>!
It sounds like you basically want some function you can call that can
change a specific key to a color, maybe
conn = DygmaConnection(...)
config = read_config('dygma.yaml')
conn.set_key_color(Key.ESC, config.palette, 'blue')
?
If that's the case, implementing set_key_color shouldn't be too difficult:
1. Download the current color map
2. Update the given key
3. Re-upload the color map
The downside is that the key color would be erased when re-syncing the
config file, but I think that's fine for now?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#61 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAHGPTPKBB54Q4RERKL4Y7TRH2EOFANCNFSM4LGNCJ4Q>
.
|
I'm thinking that if the blinking were between black and the current key
color, reading the current color from the keyboard could be a solution that
allows the notification system to work without the need for an official
configuration file.
Tthe optimum would be receiving an async notification of "layer switch"
from the neuron...
Il giorno mar 17 mar 2020 alle ore 11:42 Massimiliano della Rovere <
massimiliano.dellarovere@gmail.com> ha scritto:
… Hi Brandon!
My idea is to use some underglow leds as notifiers for async events, such
as new unread emails, tweets, etc; using a mapping stored in a file, you
will be able to link each led to a specific event checker.
Event checker are plugins for the main program and they basically do only
thing: when asked by the main program loop, answer with a pair of vars
(status: activate/deactivate/no_change and ids: list of led IDs the status
must be applied to).
My current plan is making them pulse (like the caps lock key when it's
active), so that - no matter the current color - the notification will
always be noticeable (notification by pulsing).
Because the notification must be reset when the causing reason ends, there
should be a way to restore the correct the led color; this means that I
must be able to read both the *currently* active layer from the keyboard
and its configuration from an *official* location, but sadly *Bazecor* neither
does offer an command line option to read the configuration from a file nor
does use a file to store the layers.
Bazecor should have a mode to use a configuration file, resolving to read
data from the keyboard only when the configuration file is missing or its
content invalid; @luis are there plans to introduce such mode?
Let's see when I have some spare time to implement this.
Il giorno lun 16 mar 2020 alle ore 21:34 Brandon Chinn <
***@***.***> ha scritto:
> Hi @massimiliano-della-rovere
> <https://github.com/massimiliano-della-rovere>!
>
> It sounds like you basically want some function you can call that can
> change a specific key to a color, maybe
>
> conn = DygmaConnection(...)
> config = read_config('dygma.yaml')
> conn.set_key_color(Key.ESC, config.palette, 'blue')
>
> ?
>
> If that's the case, implementing set_key_color shouldn't be too
> difficult:
>
> 1. Download the current color map
> 2. Update the given key
> 3. Re-upload the color map
>
> The downside is that the key color would be erased when re-syncing the
> config file, but I think that's fine for now?
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#61 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AAHGPTPKBB54Q4RERKL4Y7TRH2EOFANCNFSM4LGNCJ4Q>
> .
>
|
Hi again Brandon,
just a question: where can I find a list of all the commands (and they
associated data) I can _send() to the keyboard?
Il giorno lun 16 mar 2020 alle ore 21:34 Brandon Chinn <
notifications@github.com> ha scritto:
… Hi @massimiliano-della-rovere
<https://github.com/massimiliano-della-rovere>!
It sounds like you basically want some function you can call that can
change a specific key to a color, maybe
conn = DygmaConnection(...)
config = read_config('dygma.yaml')
conn.set_key_color(Key.ESC, config.palette, 'blue')
?
If that's the case, implementing set_key_color shouldn't be too difficult:
1. Download the current color map
2. Update the given key
3. Re-upload the color map
The downside is that the key color would be erased when re-syncing the
config file, but I think that's fine for now?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#61 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAHGPTPKBB54Q4RERKL4Y7TRH2EOFANCNFSM4LGNCJ4Q>
.
|
✨ This is an old work account. Please reference @brandonchinn178 for all future communication ✨ look through the bazecor code for any mentions of but for what you need to do, the api i have right now should be sufficient |
is there a command to ask the keyboard for the current active layer?
Il giorno mar 17 mar 2020 alle ore 17:16 Brandon Chinn <
notifications@github.com> ha scritto:
… look through the bazecor code for any mentions of .focus() 😛 i just
reverse engineered it
but for what you need to do, the api i have right now should be sufficient
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#61 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAHGPTOQQFWIXVGHZ6KYLEDRH6O7VANCNFSM4LGNCJ4Q>
.
|
Not to my knowledge. The keyboard seems to track all of its state
internally; the API only lets you set up how it's configured, not a proper
API of its full state
…On Tue, Mar 17, 2020, 9:29 AM Massimiliano della Rovere < ***@***.***> wrote:
is there a command to ask the keyboard for the current active layer?
Il giorno mar 17 mar 2020 alle ore 17:16 Brandon Chinn <
***@***.***> ha scritto:
> look through the bazecor code for any mentions of .focus() 😛 i just
> reverse engineered it
>
> but for what you need to do, the api i have right now should be
sufficient
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#61 (comment)>,
> or unsubscribe
> <
https://github.com/notifications/unsubscribe-auth/AAHGPTOQQFWIXVGHZ6KYLEDRH6O7VANCNFSM4LGNCJ4Q
>
> .
>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#61 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABUC7EWZT6AXXV3GK47SIODRH6QNXANCNFSM4LGNCJ4Q>
.
|
We could ask Luis about this, may be they could add this possibility to the
Raise API...
Luis, what do you think?
Il mar 17 mar 2020, 17:37 Brandon Chinn <notifications@github.com> ha
scritto:
… Not to my knowledge. The keyboard seems to track all of its state
internally; the API only lets you set up how it's configured, not a proper
API of its full state
On Tue, Mar 17, 2020, 9:29 AM Massimiliano della Rovere <
***@***.***> wrote:
> is there a command to ask the keyboard for the current active layer?
>
> Il giorno mar 17 mar 2020 alle ore 17:16 Brandon Chinn <
> ***@***.***> ha scritto:
>
> > look through the bazecor code for any mentions of .focus() 😛 i just
> > reverse engineered it
> >
> > but for what you need to do, the api i have right now should be
> sufficient
> >
> > —
> > You are receiving this because you were mentioned.
> > Reply to this email directly, view it on GitHub
> > <#61 (comment)
>,
> > or unsubscribe
> > <
>
https://github.com/notifications/unsubscribe-auth/AAHGPTOQQFWIXVGHZ6KYLEDRH6O7VANCNFSM4LGNCJ4Q
> >
> > .
> >
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#61 (comment)>,
> or unsubscribe
> <
https://github.com/notifications/unsubscribe-auth/ABUC7EWZT6AXXV3GK47SIODRH6QNXANCNFSM4LGNCJ4Q
>
> .
>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#61 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAHGPTPXGBJ2ZFIPNR5OBXDRH6RLHANCNFSM4LGNCJ4Q>
.
|
@massimiliano-della-rovere I'm sorry, I'm not sure if I understand what you guys are talking about 😅. What I understand is that you want an API so the keyboard can receive information from outside and change it's LED state. Is that correct? @algernon could you answer their questions? |
it would be nice to have an additional functionality in the keyboard API:
The layer that is currently active on the keyboard
Il giorno mer 18 mar 2020 alle ore 21:14 LuisSevilla <
notifications@github.com> ha scritto:
… @massimiliano-della-rovere <https://github.com/massimiliano-della-rovere>
I'm sorry, I'm not sure if I understand what you guys are talking about 😅.
What I understand is that you want an API so the keyboard can receive
information from outside and change it's LED state. Is that correct?
If that's the case, I think it would be awesome.
@algernon <https://github.com/algernon> could you answer their questions?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#61 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAHGPTJJDUTDPBS4POQ2OQ3RIETQPANCNFSM4LGNCJ4Q>
.
|
Adding my voice to this - I'd love to be able to try and get Chroma / Hue sync working, which is going to be tricky enough even with docs for Raise's API :) |
It's not exactly documented, but you can always type 'help' into focus to
see all the commands available
…On Mon, 11 May 2020 at 00:23, Kieran ***@***.***> wrote:
Adding my voice to this - I'd love to be able to try and get Chroma / Hue
sync working, which is going to be tricky enough even with docs for Raise's
API :)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#61 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAE223GNCG6DPKY4ZOKMWYTRQ4SOBANCNFSM4LGNCJ4Q>
.
--
Matthew Venn
web mattvenn.net twitter @matthewvenn <https://twitter.com/matthewvenn>
|
Hello @massimiliano-della-rovere @kieranajp @brandonchinn178 ! i just updated all the documentation pertaining the Focus.API, so happy hacking! 😄 |
it would be very useful having the possibility to write event driven scripts (e.g. python's asyncio) that makes the neuron led or some of the underglow leds change color and/or blink.
this opens a world of possiiblity to use the dygma raise as a secondary event monitor for async/external events.
The text was updated successfully, but these errors were encountered: