Run the Python script and just like that a Websocket Server on port 8765 will be running.
From here forward/open the port 8765, or reverse proxy it with Caddy or NGINX (I recommend Caddy).
The WebSocket server responds 0x00 byte if the user is currently active. It responds 0x01 byte if the user is currently AFK. You should also check if it fails to connect and mark yourself as Offline.
The xml file is a Windows Task Scheduler export. You need to change the Logon User to your own.
You should also update the path of the actions, i.e. where the script is, or the folder it's in.