Merge from old Gitea

This commit is contained in:
Jon
2026-04-12 16:06:44 +01:00
commit aaefb2bb35
18 changed files with 492 additions and 0 deletions

26
examples/power.py Normal file
View File

@@ -0,0 +1,26 @@
import asyncio
import time
from esasdk import Machine
async def main():
# Connect to a machine
machine = Machine("ws://localhost:5424")
await machine.connect()
# Get machine power
power = await machine.power()
print(f"Machine Power (Volts): {power}")
# Get machine power source
powerSource = await machine.power_source()
print(f"Machine Power Source: {powerSource}")
# Set machine power timer - TODO: cpp response for this call.
powerTimer = await machine.poweroff_timer_enable(False)
print(f"Machine Power Timer: {powerTimer}")
# Close connection
await machine.close()
if __name__ == "__main__":
asyncio.run(main())