Only perform action if my PC is on?

Hi, are there reliable ways to perform an action that first check if my PC is turned on using Macrodroid, if it is, run a macro. Else, do nothing? So far, I'm thinking of maybe check if my PC is connected to internet, if so, return variable as 1, else 0. And then use these variables to decide if the script should do nothing, or run a macro. But not sure if this is the best approach, because what if there is an internet outage in my area? If checking internet connection is the only approach, I'd also appreciate more details on how exactly I can do that with Macrodroid, thanks!
 

dhj49er

Well-known member
Hi, are there reliable ways to perform an action that first check if my PC is turned on using Macrodroid, if it is, run a macro. Else, do nothing? So far, I'm thinking of maybe check if my PC is connected to internet, if so, return variable as 1, else 0. And then use these variables to decide if the script should do nothing, or run a macro. But not sure if this is the best approach, because what if there is an internet outage in my area? If checking internet connection is the only approach, I'd also appreciate more details on how exactly I can do that with Macrodroid, thanks!
Is the PC connected to a LAN that provides internet connection?
Are you trying to check if the PC is on only when you have access to the LAN?
If the PC is on what is the macro doing?
 
Is the PC connected to a LAN that provides internet connection?
Are you trying to check if the PC is on only when you have access to the LAN?
If the PC is on what is the macro doing?
Sorry for not providing enough information!
1. I think connected to a LAN just means home network? If so, yes, I'm connected to my own internet wirelessly with a router and modem.
2. I'm not sure if I understand this question, but I think the answer is yes, I just want to check if my PC has internet access.
3. Below is how my macro is designed:
Trigger:
Geofence Entry

Action:
1. Check if my PC has internet access (if it does, then that means my PC is on, else, my pc is off)
2. If my PC is turned on, sends a https request that turns off a smart tuya device. Else, do nothing.

Let me know if that makes sense or I'm missing any details, thanks!
 

mapriex

Active member
if your smart devices using zigbee or directly wifi, you can buy a smart plug and turn on your pc via app. if you startet your pc, you can cascade it with shut down different devices connected to your smart hub.

another options: batch file->opens browser instantly with the right "macrodroid" webhook url to trigger mobile phone actions.
 
Top