Remix.run Logo
t_mahmood 2 days ago

Ha ha, I tried something similar when I had to go to Thailand for my wife's treatment. And failed spectacularly. Fortunately, my laptop had all the files. I didn't have Tailscale at that time.

My Desktop, WoL on, tested to be working Android Phone, always on

All have SyncThing installed. Mobile had Tasker installed.

So, the idea was to have Tasker monitor a folder inside SyncThing, When I need my computer, I put a file inside that folder, when Tasker finds that folder, it sends WoL to my desktop, and deletes the file, Computer wakes up. When I see the file deleted I know, the beast is now awakens ....

When I actually did try that from Thailand, the file did not got deleted, nor the beast woke up.

What happened? Turns out, my mobile restarts automatically after some time of inactivity. Which, locks Tasker out, and the whole process fails.

So, operation wake the beast was busted.

M95D 2 days ago | parent | next [-]

Why don't you send WOL directly over the internet? (You'll need to set up a permanent ARP record on the router.)

Or login into the router and send WoL from there?

Or have Raspberry always on with ssh?

Or set a power-on timer in BIOS/UEFI once a day and a shutdown/sleep in cron? (This is also a good failsafe if WoL doesn't work.)

t_mahmood 2 days ago | parent [-]

> Why don't you send WOL directly over the internet? (You'll need to set up a permanent ARP record on the router.)

Hm, so never tried something like that before actually, I think for OpenWrt I need to install arp packages. I do not have public IP any more though, was getting hammered by bot network and found Tailscale to do what I need.

> Or login into the router and send WoL from there?

Restricted outside access to the router management panel, only port forwarded to the desktop.

> Or have Raspberry always on with ssh? I do not have one, which is why used a mobile, thought to be next best thing. As, power outages happen regularly, I need something that would be able to keep on running.

> Or set a power-on timer in BIOS/UEFI once a day and a shutdown/sleep in cron? (This is also a good failsafe if WoL doesn't work.)

That's easily workable for my setup, actually!

Thank you for giving me the ideas!

M95D 2 days ago | parent | next [-]

>> Why don't you send WOL directly over the internet? (You'll need to set up a permanent ARP record on the router.)

> Hm, so never tried something like that before actually, I think for OpenWrt I need to install arp packages.

No, you don't. Put this in /etc/firewall.user or /etc/rc.local (you can do it from UI) and forward a UDP port to 192.168.0.254 or whaterver subnet you're using:

  ip neigh add 192.168.0.254 lladdr ff:ff:ff:ff:ff:ff nud permanent dev br-lan extern_learn
The incoming packet will be broadcasted (ff:ff...) on the br-lan interface. 192.168.0.254 doesn't need to exist - the sleeping computer doesn't care.
M95D 2 days ago | parent | next [-]

PS:

Correction! /etc/rc.local isn't OK. The ARP record needs to be reloaded if br-lan interface is restarted, such as when changing other network settings in WebUI. So only /etc/firewall.user will do.

t_mahmood 2 days ago | parent | prev [-]

Thank you for the explanation!

The version in the OpenWrt didn't support the full command. Had to update to `ip-full`.

After the command was successful, I can see the entry in the `ip neigh` table.

Now digging around

synergy20 2 days ago | parent | prev [-]

I don't think BIOS/UEFI can do power-on timer unless it's server-class hardware? Have not looked into PC BIOS/UEFI for a while.

For failsafe, KVM might be the ultimate solution in case boot got stuck.

M95D a day ago | parent [-]

I don't know about UEFI - I don't have any UEFI system - but my Gigabyte 880GA motherboard can certainly do RTC power-on from BIOS settings and it's far from being a server motherboard.

benplumley 2 days ago | parent | prev | next [-]

Since you're already using Tasker, you could use it to launch Tailscale on the phone at boot - I've got mine set to do this so my phone reconnects to tailscale after a reboot.

t_mahmood 2 days ago | parent [-]

Now I have another mobile with more control, so restart is not a problem anymore, and as I can SSH in to it using Termux. This basically handles all of my needs.

Now I just need to get enough momentum to set up the process of waking up my desktop as needed and set up radical caldav server in the mobile.

teekert 2 days ago | parent | prev [-]

You worked with what you had and understood, it was beautiful.

I for one just leave the beast on, I understand that spin-ups and downs are the main thing that wreck harddrives (and my beast has a lot.)

t_mahmood 16 hours ago | parent [-]

Thank you!

For me, power outages were/are a big issue, lost one of the HDD recently then, did not want to risk the new one.