Menu

Rapid Shutdown and DLNA problems

Help
Daniel
2017-09-09
2017-09-09
  • Daniel

    Daniel - 2017-09-09

    First of all: Many thanks for your great tool and sharing it with us. I was exactly looking for a tool like that.

    In a nutshell, what I want to achieve: My NAS is woken up by a WOL command, then it shall stay alive while it is in use, and automatically shutdown when it is idle again. So I don't have static schedules, I rather want to do it dynamically. I expect that I can achieve this behaviour with the "Rapid Shutdown" option in APM, combined with "Hosts", "Connections" and "Traffic" settings.

    But I have difficulties to make that working for two reasons:

    1. When I do DLNA audio streaming to a mobile phone, neither the phone itself (by MAC address or host name) nor the used ports (1900, 50001, 50002) are recognized by APM. What's wrong? I understand that a "Hosts" entry will never work for an Android phone, since Android disallows "ping". But the port settings should work, shouldn't they?
    2. The "Rapid Shutdown" option behaves a bit unexpected. APM first waits the configured delay time (let's say 10 minutes), and then it checks the conditions (Hosts, Connections etc). If all conditions are fulfilled, it shuts down immediately. If my client does a short break, the NAS might shutdown just during this break.

    Why not change the order? I'd suggest:
    1. Check the conditions continuously with the configured measurement interval (e.g. 1 minute)
    2. If all conditions are fulfilled, start the delay timer (e.g. 10 minutes), but still continuously checking the conditions. If conditions are not fulfilled, reset the delay timer.
    3. After the delay time (and if the delay timer hasn't been reset by step 2), the NAS is shut down.

    From an end user perspective, I think such a behaviour would make more sense: The NAS is shutdown after a configured idle time. It's the way any similar function like screen locking usually works.

    Many thanks!

     
  • Renaud Métrich

    Renaud Métrich - 2017-09-09

    Hi,

    Regarding the DLNA audio streaming, I believe the issue is that the connection is likely UDP, hence cannot be tracked by the Connections module (which works for TCP only).
    The Hosts module can still be used to check for Android phone, if you specify the MAC address instead (assuming you have a local LAN): it is less reliable but if some traffic exists, the arp cache should maintain the MAC address of the device.

    In order to achieve your requirement, i.e. stop only after NAS is really idle, you need in fact to modify the Interval option and Checks per Interval of the modules:
    If you configure Interval to 10 minutes and Checks per Interval to 10, a check will happen every minute (10 / 10 = 1 min) and will guarantee that the NAS will not shutdown if the module detected activity in that interval. If you plan to have a 30 minutes break, then change the Interval to 30 minutes. The NAS will shut down after 30 minutes of being idle for all configured modules.

    Please tell me if this works

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.