NAS wakeups when connecting phone to WiFi


#1

Issue description:

I am using a NAS as music source for my Kodi player. When the playback is paused, the NAS spins down its drives after a few minutes. I can interact with the Kodi json-rpc without waking up the NAS. I can even un-pause playback. Only if the song is over, the NAS spins up its drives again.

In the morning, when I connect my phone to the WiFi network, the disk of the NAS instantly starts spinning, even if I don’t open any apps. This does not happen if I force-stop Yatse the evening before. Sometimes, the disk also starts spinning if I open Yatse without pressing anything (but not always). The attached debug log clearly shows that Yatse detects the network state change and then does something. This seems to trigger the wakeup of the disks.

My expected behavior is that Yatse does not do network requests if the app has not been used for many hours. Is there some setting that I have overlooked which might cause such background requests? I do not use the widget and I do not use the playback control notification.

Logs:

debug.log (29.1 KB)

PS: You might want to change the debug log so that it does not write image urls containing passwords. The log contained something like this, which I have replaced before uploading: image://[email protected]%3a%2f%2fUSERNAME%3aPASSWORD

Thank you very much for the great app and for your support.


#2
  1. You might want to change how you create your sources for the password in logs.

That url will be used everywhere in webinterface or when Yatse query Kodi. This is a security issue on Kodi side, for Yatse this is just an arbitrary value that should not contain sensitive informations.
When creating sources, you should not use login/pasword in the url field but use Kodi password manager.

  1. Yatse just query Kodi status, no idea why it would spin the NAS but it’s Kodi doing that. I guess because you have an active player on Kodi so Kodi refresh the images every 24h don’t ask why!,

Still there should not be a query in your case with no widgets and notification.
Do you use lockscreen option? Tasker plugin? Any other stuff? I unfortunately do not log the millions cases :frowning:


#3

Hi, thanks for your quick reply.

I tried to do that but the password manager somehow only worked with smb. When using an sftp share, I had to use the url field :frowning:. Whatever, that’s not my main issue and was just a suggestion.

Yes, I know that the actual disk read is triggered by Kodi. Nevertheless, Yatse does something that makes Kodi read the disk. If this would only happen when opening Yatse, that would be completely understandable (image refresh etc, as you said). But it happens without having used Yatse for hours.

The Lock screen controls and Show notification settings are both turned off. I do not use Tasker. I have also checked No automatic database synchronization. The setting Refresh interval is set to 1 Second but I think this setting only applies when the app is opened, right?


#4

The password issue should be reported to Kodi so they fix it :slight_smile: It is a security issue as they expose some internal password to everyone.

No auto db sync is just when you browse inside Yatse and the refresh interval is only when using widgets so unrelated.

I’ll have to check if there’s case on wake up if there’s a case where a query can be sent, but I can’t see the reason if you have none of those options checked.

Can you export your settings to sdcard (and just the settings, uncheck all the rest) then send the yas file and associated password? So I can try to reproduce?


#5

Interesting. I thought this value is used by the slider for the current playback position. That’s why I put it to the smallest possible value.

Sure, the password is yatse. I renamed the file to .yas.txt because the forum did not allow to upload the file otherwise.
yatse-settings.yas.txt (4.0 KB)

It does not wake up the NAS every time I change the network state. I only noticed that in the morning after the phone was in airplane mode for a few hours.


#6

Ok was able to reproduce, will be fixed for next release.


#7

Awesome! Thank you so much! Just donated :slight_smile: