Skip to content
This repository has been archived by the owner on Feb 9, 2024. It is now read-only.

Made the application work again #21

Merged
merged 7 commits into from
May 16, 2022
Merged

Made the application work again #21

merged 7 commits into from
May 16, 2022

Conversation

Ry-DS
Copy link

@Ry-DS Ry-DS commented Apr 28, 2022

Migrated to rowak's new Nanoleaf API, which seemed to have fixed everything.

Things that are broken:

  • Token for the shapes isn't saved, always prompted to save again
  • Spotify login should've been saved
  • Audio is quite delayed from the effect

The latter is likely fixable by reworking how the spotify api is used.
You also can't add devices via IP (I hard coded mine in, gotta remove later)

@jaxcksn
Copy link
Owner

jaxcksn commented Apr 29, 2022

So the issue was the nanoleaf API or the spotify API (I was suspecting the Nanoleaf API)

@Ry-DS
Copy link
Author

Ry-DS commented Apr 30, 2022

So the issue was the nanoleaf API or the spotify API (I was suspecting the Nanoleaf API)

After looking into it more, the main issue is using effects to try update panels in real time, as they aren't really designed for that use case.

This should be used instead: https://github.com/rowak/nanoleaf-api#external-streaming

It uses a pure stream of UDP packets which will be a lot faster than using json effects (what's being used currently)

@jaxcksn
Copy link
Owner

jaxcksn commented May 1, 2022

Ah, see that was my plan for the new program. I disliked using Java for the UDP packets.

This is a good foundation for the new code base (in which I'm basically gonna skip using a third party nanaleaf api, try to reduce overhead)

@Ry-DS
Copy link
Author

Ry-DS commented May 1, 2022

Ah, see that was my plan for the new program. I disliked using Java for the UDP packets.

This is a good foundation for the new code base (in which I'm basically gonna skip using a third party nanaleaf api, try to reduce overhead)

Are you planning on not using Java/third party apis purely for speed/functionality? Or for a learning experience? If for the former I highly recommend just sticking with what you have now (and using the UDP implementation linked) since switching to C++/raw processing won't give a significant enough speedup to justify losing this nice UI you built. The task isn't computationally expensive (more of a network problem) which Java can handle just fine if done correctly.

@jaxcksn
Copy link
Owner

jaxcksn commented May 1, 2022

The UI is actually one of the reasons I want to switch. Working with JavaFX is a pain, also I think that importing a whole third party library for the API is overkill if I'm only using 4 endpoints for the entire thing.

I haven't decided on C++, I might do C# instead but we'll have to see.

@Ry-DS
Copy link
Author

Ry-DS commented May 5, 2022

The UI is actually one of the reasons I want to switch. Working with JavaFX is a pain, also I think that importing a whole third party library for the API is overkill if I'm only using 4 endpoints for the entire thing.

I haven't decided on C++, I might do C# instead but we'll have to see.

Yup that sounds fair. Hope this PR is of some help as it makes the current app work with the modern Nanoleaf devices (shapes, elements etc)

@Ry-DS Ry-DS mentioned this pull request May 5, 2022
@jaxcksn
Copy link
Owner

jaxcksn commented May 16, 2022

This PR is very helpful. I'm not gonna merge it quite yet, as I'm starting the new code base in a few days but I appreciate the help.

@jaxcksn jaxcksn mentioned this pull request May 16, 2022
3 tasks
@jaxcksn jaxcksn changed the base branch from master to java May 16, 2022 18:26
@jaxcksn jaxcksn merged commit 231f7f1 into jaxcksn:java May 16, 2022
@jaxcksn
Copy link
Owner

jaxcksn commented May 16, 2022

Going to have Java be in a separate branch from the master, which will contain the new code base.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants