@JonB said:
Have you checked out Synology python API?
https://github.com/N4S4/synology-api
No i don‘t checked Synology-API, but now i did....
Unfortunately, this is not what I'm looking for, since every time I query it, the sleep mode is interrupted.
I'm not sure if you can check hybernation status, but this might kick start things (say, try to run a file station download).
I guess that's true...
I could now go here and after opening the app simply create a loop where every x minutes a query would be created so that the DS would not go into sleep mode for now or ?
Also, if I understand your issue is long timeout on MySQL connect -- _mysql.connect() let's you specify a connect_timeout value, which you could set to something short to see if server is responding.
This was a good idea, but unfortunately the DS is first brought out of sleep mode and this takes longer than my set time of 1 second so that it unfortunately does not work.
You can also execute ssh commands via paramiko -- I'm not sure if there is a shell command that let's you turn off hibernation. Frankly, on my DSM, it doesn't take that long to come out of hibernation, but I might be using things differently.
SSH I would have to look first again with my Key's etc....
And yes, as I said with me it takes up to 1 minute until he creates the query when the DS goes out.