Wake up SMB drives before KODI starts

To add to the above post of mine, let me clarify that the two hard disk drives I use as SMB shares are plugged via a powered USB hub on my router’s USB 2.0 port. Both disks are 2,5’’ (USB powered). One of them (the one with the TV Shows) has the issue with the sleep mode.

Also, here are some things I’ve done or tried to do. Thing is that I’m not sure at all these are really helping my case, because they have to do with the network being available / ready, and not with waking up the SMB shares / drives from sleep (at least the one which seems to be the problematic that gets to sleep mode)

  1. I have enabled “Wait for network before starting Kodi” within the CoreElec settings, and I have increased the maximum wait time to 20 seconds.

  2. I have installed the “Advance Wake On Lan” Kodi add-on. On the “Basic Settings” tab I have typed my router’s MAC address and the IP it has. On the “Autostart” tab I have enabled “Activate Wake on launch” and “Activate wake after standby”. The problem here is that at the IP field you cannot add the smb share(s) you have. So this also seems to work only for the router, a server or a NAS, etc, and not for specific SMB shares.

  3. Within the Kodi Settings → System → Power Saving, I have tried to enable “Try to wake up remote servers on access”, but when I do so, it searches for the router’s MAC address and it fails, so I’m getting an error saying: “MAC Discovery - Failed for Archercloud”. I tried to fix this, by creating a ‘wakeonlan.xml’ with this content and placing it within the userdata folder (taken from here https://kodi.wiki/index.php?title=Wake_on_lan ):

 <onaccesswakeup>
   <wakeup>
       <host>192.168.1.1</host>
       <mac>XX:XX:XX:XX:XX:XX</mac>
       <pingport>0</pingport>
       <pingmode>1</pingmode>
   </wakeup>
</onaccesswakeup>

where XX… is the Mac address of my router, but that did not help, and I was still getting the same error (“MAC Discovery - Failed for Archercloud”). Archercloud is the name my router assigns to the Network/Media Server it creates. Trying this on my Windows PC with Kodi 18.1 finds “Archecloud” and it does not “fail”. That’s weird. Both my TV box and my Windows PC are on the same network.

Now, as a newbie on these things, I have no idea if the above settings could help in my case.

Furthermore, I’ve searched the forums, and I have found some similar issues on this topic:

@vpeter has provided this code, that If I’m getting it right, delays starting kodi until a specific path exists.

So maybe using this code or something similar and replacing the path /var/media/USBHDD/recordings with something that refers to my problematic SMB share ( \ARCHERCLOUD\volume(sdb1)\Video\TV Series ) could work ?