Using PC log off to trigger rule

Well just starting with Hubitat Elevation and so far I like it.
Well I know its a bit run before you can walk but could someone give a few pointers on how to implement a task for me.
simply put I wish to switch a wall sock off then on again a few minutes later but only after aI have logged off from my computer how would I make Hubitat sense that its occurred.

Thanks in advance
Stewart

What type of computer? (Windows, Mac, Linux, something else?)

Is the computer on the same network as the Hubitat hub?

What type of socket? (WiFi control, Z-Wave, something else?)

1 Like

Eventghost might be something to look at [PORT] - Send Events to EventGhost

1 Like

Scripted call to Maker API exposed virtual switch? ... as a scheduled task, if you can identify a way for logging out to trigger it (eg, Windows EventID associated with the act of logging out, never tried it, don't know if possible for sure)

1 Like

hi
Yes its a windows 10 machine on the same network as the Hubitat There is also a sinology Nas drive on that network, the socket is a simple Zigbee one
cheers

You should be able to set a log off script to run on the computer which somehow calls a MakerAPI URL for a virtual switch, like @martybird suggested above.

EventID 7002 - haven't tried it myself as I've only ever needed a script to run on Log On. Never had a need for Log Off.

2 Likes

Kind of intrigued now. Might have to give it a shot just to see :slight_smile:

1 Like

I know there is also somewhere in local group policy where you can run logon/off scripts.

Edit:
Yup..there it is

2 Likes

good recall! so comfy with domain GPP Scheduled Tasks I never even though of this.

thanks for all the info. I think it will point me in the right direction over the next few days
cheers

2 Likes

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.