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

Decouple GUI from bluetooth code #7

Open
michaelaye opened this issue May 31, 2021 · 5 comments
Open

Decouple GUI from bluetooth code #7

michaelaye opened this issue May 31, 2021 · 5 comments
Labels
help wanted Extra attention is needed

Comments

@michaelaye
Copy link

michaelaye commented May 31, 2021

Hi!
Thx for your work on this.
I'm facing quite a struggle with Qt on my side, so I was thinking that in general it would be really nice if the BT comms could be decoupled from the Qt GUI, so that for example, it would be easy to either get a simple command-line tool running or even a nice Jupyter notebook dashboard instead of an extra GUI.
What do you think?
It would however change a lot of this code, so maybe we should just fork first, get the BT comms running on their own, and later Qt users could rewrite using the BT comms repo.

@pledi
Copy link
Owner

pledi commented Jun 1, 2021

Sounds good to me. You are right, it would change a lot of this code but that's a good thing. I also don't like the entanglement of the GUI and Comms Code.

@pledi pledi added the help wanted Extra attention is needed label Jun 1, 2021
@ethanholz
Copy link

I might dig into this, this week to see what I can come up with.

@ethanholz
Copy link

I have started to work on this and get the code decoupled. I have created a Mug class that should hold all of the values for the mug and holds all the values to control it. In the current state, I am able to control the mug and get values from the mug all via CLI using a test script. Currently, I am in the progress of rewriting the UI to work better with asyncio and my rewritten class. Please feel free to take a look at my fork for current progress: https://github.com/ethanholz/EmberControl.

Please keep in mind this is code is still very messy for me and I will be cleaning it up in the coming weeks.

@pledi
Copy link
Owner

pledi commented Oct 22, 2021

hey @ethanholz thanks for sharing. Will take a look at it for sure.
I also worked a bit on splitting the code up and creating a library for the communication between the computer and the mug. Maybe we can open another project for the library and work together on it.

@ethanholz
Copy link

Sounds good to me! I did find a great price of code we might want to dig into. Someone wrote a backend for this into a home assistant project, another great start for sure: https://github.com/sopelj/hass-ember-mug-component/blob/main/custom_components/ember_mug/mug.py .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants