Skip to content
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

Closed
massimiliano-della-rovere opened this issue Mar 12, 2020 · 16 comments · Fixed by #131
Closed

documentation of the dygma raise API #61

massimiliano-della-rovere opened this issue Mar 12, 2020 · 16 comments · Fixed by #131
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@massimiliano-della-rovere

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.

@massimiliano-della-rovere massimiliano-della-rovere added the enhancement New feature or request label Mar 12, 2020
@brandonchinn178
Copy link

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

@LuisSevilla
Copy link

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?
I'd like to use the Neuron led and some underglow LEDs to monitor external events, like disk/cpu/ram/network usage, or some info coming from IoT devices or a fancy thing like "you have new email" blinking LEDs (I'd love to use python asyncio technology for doing this).

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 😅

@massimiliano-della-rovere
Copy link
Author

@brandonchinn178
Copy link

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

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?

@massimiliano-della-rovere
Copy link
Author

@massimiliano-della-rovere
Copy link
Author

@massimiliano-della-rovere
Copy link
Author

@brandon-leapyear
Copy link

brandon-leapyear commented Mar 17, 2020

This is an old work account. Please reference @brandonchinn178 for all future communication


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

@massimiliano-della-rovere
Copy link
Author

@brandonchinn178
Copy link

brandonchinn178 commented Mar 17, 2020 via email

@massimiliano-della-rovere
Copy link
Author

@LuisSevilla
Copy link

@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 could you answer their questions?

@massimiliano-della-rovere
Copy link
Author

@kieranajp
Copy link

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 :)

@mattvenn
Copy link

mattvenn commented May 11, 2020 via email

@AlexDygma AlexDygma self-assigned this Nov 20, 2020
@AlexDygma AlexDygma added this to the 0.2.5 milestone Nov 20, 2020
@AlexDygma AlexDygma linked a pull request Nov 20, 2020 that will close this issue
@AlexDygma
Copy link
Member

Hello @massimiliano-della-rovere @kieranajp @brandonchinn178 !

i just updated all the documentation pertaining the Focus.API, so happy hacking! 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants