Screenlogicpy can also be used via the command line.
success = await gateway.async_set_scg_config(pool_output, spa_output) async_set_scg_config takes two int arguments, pool_output and spa_output. Setting chlorinator output levelsĬhlorinator output levels can be set with async_set_scg_config(). async_set_color_lights takes one required argument, light_command as an int representing the desired command/show/color success = await gateway.async_set_color_lights(light_command)Ĭhanged in v0.5.0: This method is now an async coroutine. Setting light colors or showsĬolors or color-shows can be set for compatible color-enable lighting with async_set_color_lights(). success = await gateway.async_set_heat_temp(body, temp)Ĭhanged in v0.5.0: This method is now an async coroutine. async_set_heat_temp takes two required arguments, body as an int representing the body of water, and temp as an int of the desired target temperature. The target heating temperature can be set per body of water (pool or spa) with async_set_heat_temp(). success = await gateway.async_set_heat_mode(body, mode)Ĭhanged in v0.5.0: This method is now an async coroutine. async_set_heat_mode takes two required arguments, body as an int representing the body of water, and mode as an int of the desired heating mode. The desired heating mode can be set per body of water (pool or spa) with async_set_heat_mode(). success = await gateway.async_set_circuit(circuitID, circuitState)Ĭhanged in v0.5.0: This method is now an async coroutine. async_set_circuit takes two required arguments, circuitID which is the id number of the circuit as an int, and circuitState which represents the desired new state of the circuit, as an int. Turning a circuit ON or OFFĪ circuit can be requested to be turned on or off with the async_set_circuit() method. Note: The methods do not confirm the requested action is now in effect on the pool controller. Select various color-enabled lighting optionsĮach method will return True if the operation reported no exceptions.Set a target heating temperature for a specific body of water (spa/pool).Set a heating mode for a specific body of water (spa/pool).The following actions can be performed with methods on the ScreenLogicGateway object: Example from screenlogicpy import ScreenLogicGateway, discovery hosts = await discovery.async_discover()Ĭhanged in v0.5.0: This method is now an async coroutine. Each protocol adapter is represented as a dict object that can then be directly used to instanciate a ScreenLogicGateway class. The discovery module's async_discover() function can be used to get a list of all discovered ScreenLogic protocol adapters on the local network. When done, use async_disconnect() to close the connection to the protocol adapter. The consuming application may get this data at anytime with the get_data() method. That data is cached as a dict object for continued reference by the consuming application. The ScreenLogicGateway class updates all data at once from the ScreenLogic protocol adapter. The calling application is responsible for maintaining reasonable intervals between updates.Ĭhanged in v0.5.0: This method is now an async coroutine and no longer disconnects from the protocol adapter after polling the data. Warning: This method is not rate-limited. Status and settings for any configured salt chlorine generators.
This update consists of sending requests for: Once connected, all available data can be polled with the async_update() coroutine. This method also performs the initial polling of the pool controller configuration. Once instanciated, use async_connect() to connect and logon to the ScreenLogic protocol adapter. Connecting to a ScreenLogic Protocol Adapter Gateway = ScreenLogicGateway(".x")Ĭhanged in v0.5.0: Instanciating the gateway no longer automatically connects to the protocol adapter or performs an initial update. from screenlogicpy import ScreenLogicGateway The ScreenLogicGateway class is the primary interface. Relevant methods now require the async/await syntax. New for v0.5.0: The screenlogicpy library has moved over to using asyncio for all network I/O. The screenlogicpy package can be installed from PyPI using pip. Screenlogicpy is an interface for Pentair ScreenLogic connected pool controllers over IP via python using asyncio.