Commands

aioguardian supports all of the commands provided by the official Guardian API.

Supported Commands

Note: Not all commands are supported on all firmwares. If a particular command is not working on your valve controller, please ensure you have the latest device firmware before filing an aioguardian bug.

You can learn more about the response payloads of these commands by looking at the fixtures folder in the GitHub repo.

Executing Raw Commands

If you should ever need to quickly test commands via their integer command code, the Client object’s execute_raw_command() can be used:

import asyncio

  from aioguardian import Client


  async def main():
      async with Client("<IP ADDRESS>") as client:
          # Get sensor status, which is command 80:
          status = await client.execute_raw_command(80)


  asyncio.run(main())

You can see the command-code-to-command mapping by examining the Command helper.

Dealing with “Beeps”

Under normal operation, the device will emit a series of “beep” tones alongside certain actions. As this can be a bit much, by default, aioguardian suppresses these tones for commands that don’t affect the valve’s status. Should this behavior not be desirable, many command methods accept a silent argument.

For example, to execute client.system.ping() and allow these tones to play:

import asyncio

  from aioguardian import Client


  async def main():
      async with Client("<IP ADDRESS>") as client:
          await client.system.ping(silent=False)


  asyncio.run(main())