So I have been thinking and trying and messing about but I am stuck. I am missing something and I just don’t know what.
I have my PC behind a Shelly Plug S, so I can check the #Power variable to see if it’s actually on or not. I want to prevent any flow or manual interaction with the plug unless the PC is turned off, so if #Power is below X. BUT I do want to be able to trigger an off>on Flow to boot the PC when I want to boot it remotely. So turning it into an always-on device wouldn’t work either, unless I can toggle that state with a flow but I don’t think that is possible?
I have looked for a good two hours now online to find possible solutions but I haven’t found one so far, anyone has an idea on how to achieve this? Or how to do a flow on “PC turned off” and end a flow without a “then” action, would that prevent the PC from turning off?
Basically: prevent a Shelly plug from being turned off (either from a flow or from the dashboard) unless the PC that is attached to it is also turned off.
In “pseudo flow” form:
IF some action would turn off the Shelly
AND the current power draw of the Shelly is below X watt
Ah sorry, it was late in the evening so I get that it might not have been a clear description.
I have the Shelly plug to which my PC is connected as a favourite in my app. To see how much it uses and to easily trigger a power cycle and let it automatically boot when the power comes on. But since that also means I can easily hit that button when opening the app and accidentally turn off the PC I want to prevent that. In the practical sense:
I want to prevent the Shelly socket from turning off the power if the PC is on.
I am only struggling with the ELSE in that flow, I have set up an advanced flow but those are a bit new to me so I might just be missing an option. If leave the Logics Yellow/Cross option without anything connected to it would that end the flow without doing anything?
The “turned off” trigger (the “IF” part) executes when the socket is actually being turned off, so that can’t be used (because it would be too late).
I don’t think there’s a way of making this work with flows unless the Shelly device and/or its app has some specific mode that will prevent “off” signals from being sent to, or processed by, the device and a way of turning on/off that mode (in order to be able to turn off the device when the measured power is below a certain wattage).
Aii that sucks, I was hoping the “Turn off” is triggering at the time of turning off instead of once it turned off.
I’ll have a look through the Shelly settings if I can find something like that, maybe Shelly has an option to not turn off unless there is almost no power running through it.
I know Homey has a feature called “Always on” but I don’t think Flows can trigger that option right?
Thanks that’s a perfect inbetween option! I think that at least solves thick-finger/accidental hit problems. And I think I can prevent the accidental shutdown as well by using a flow to trigger the PC boot where I check for the right power or not.
Though now I am stuck on two, non-critical, points:
No need to say sorry, it happens to me as well, sometimes it’s just hard to describe what the issue is, or what you’d like to achieve.
That’s called Energy / meter_power and available in virtual device, also check the improved version, called “advanced virtual device”; it comes with the app Device Capabilities.
So,
Power (used now, W) = measure_power
Energy (power used during an hour, kWh) = meter_power
Maybe set the device in Homey to ‘allways on’ so it can’t be turned off with Homey.
Then use the Shelly App itself to restart the PC by turning on and off the power? (Or is this ‘Insulting a man in his place of worship’)
Thank you for the suggestion, unfortunately that would defeat my purpose of using Homey for all my automations. My idea is that it would do more with this way of the flow based on if my PC is on. For example on Wednesdays I tend to work at home, I could do a flow: IF my PC is on (not just the plug) AND it’s Wednesday THEN I want to turn on my DeskPhone plug.
In theory your idea would work but it would be a workaround and not exactly what I’m looking for
I’m not sure if i fully understood it but mistakes can be avoided with an advanced virtual device.
It can show power usage in the icon on your favorite list
If you do not define the first of the button options in the settings, then pressing the device accidentally won’t have any effect
You can define within the device multiple buttons including for example one button that is on when power>5W and when pressed starts a flow to restart your PC. To access that button you will have to long press the device, select the buttons tab and then press the button