rowak / nanoleaf-desktop

A modern desktop application for the Nanoleaf Aurora and Canvas
MIT License
166 stars 13 forks source link

have to pair evertime it loads/not saving any settings #13

Open sT0n3r opened 4 years ago

sT0n3r commented 4 years ago

great app working to up to this version but everytime i load it now i have to re-pair my nanoleafs

rowak commented 4 years ago

I've been working on solving this issue with a few other people, and I actually thought it had been fixed in the latest release. Not saving any settings at all is a new issue however. You're using v0.8.3, right? Also are you using the aurora or canvas lights?

Try navigating to the "preferences.txt" file located at "C:\Users\\AppData\Roaming\Nanoleaf for Desktop" or paste "%AppData%\Nanoleaf for Desktop" in the windows explorer URL bar. This file contains all of the pairing information and settings stored by the app. Once you open the file, look for the keyword "lastSession". This key is added to the file as soon as you set up your Nanoleaf device. If the file is empty then try running the app as an administrator, set up your device, then see if there is anything in the file. Let me know what you find in the file. Thanks.

sT0n3r commented 4 years ago

yes sir, using version v0.8.3 with win10, 1903 and aurora panels running as admin does not seem to make a difference, my prefs file is included, keep up the great work and i am here to test anything if you need. preferences.txt

rowak commented 4 years ago

Thanks! It looks like your device paring info is being saved correctly at least, but you're right I don't see any other saved data. Unfortunately I'm not quite sure what might be causing this problem just yet.

It would help to know however, at what point in time you uploaded the preferences.txt file. For reference: when the app first loads, it checks if the "lastSession" key is saved in the preferences file. If it is there, then it tries to connect to the device. If it is not there, then it tries to set up a new device. The problem here is that the "lastSession" key is in your preferences file, yet the app still prompts you to set up a new device. So the question is, did you upload the preferences file just after setting up your device while the app is still open, did you interact with the app in any way after pairing the device before uploading the file, or did you pair then close the app before uploading the file?

Also, could you upload the stack trace/ log of when you set up your device? You can do this by running the app using the command prompt. In the command prompt enter: "java -jar " (leave a space at the end) then drag the app into the command prompt and press enter. When the app loads, pair your device normally but check the command prompt to see if any errors are shown. If there are any errors, copy and paste them here.