-
Notifications
You must be signed in to change notification settings - Fork 1
Conversation
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) |
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. |
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) |
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. |
Going to have Java be in a separate branch from the master, which will contain the new code base. |
Migrated to rowak's new Nanoleaf API, which seemed to have fixed everything.
Things that are broken:
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)