Public Member Functions | |
| None | __init__ (self) |
| None | check_device_id (self, int device_id) |
| None | check_port (self, int device_id, int port, int direction) |
| None | check_port_free (self, int device_id, int port, int direction) |
| None | edge_detect (self, int device_id, int port, Callable[[int, bool], None] event_callback) |
| int | read_adc_input (self, int device_id, int port) |
| int | read_input (self, int device_id, int port) |
| None | setup_input (self, int device_id, int port) |
| None | setup_output (self, int device_id, int port) |
| None | write_output (self, int device_id, int port, int value) |
Home-Assistant specific API for numato device access.
Definition at line 173 of file __init__.py.
| None homeassistant.components.numato.NumatoAPI.__init__ | ( | self | ) |
Initialize API state.
Definition at line 176 of file __init__.py.
| None homeassistant.components.numato.NumatoAPI.check_device_id | ( | self, | |
| int | device_id | ||
| ) |
Check whether a device has been discovered. Fail with exception.
Definition at line 197 of file __init__.py.
| None homeassistant.components.numato.NumatoAPI.check_port | ( | self, | |
| int | device_id, | ||
| int | port, | ||
| int | direction | ||
| ) |
Raise an error if the port setup doesn't match the direction.
Definition at line 205 of file __init__.py.
| None homeassistant.components.numato.NumatoAPI.check_port_free | ( | self, | |
| int | device_id, | ||
| int | port, | ||
| int | direction | ||
| ) |
Check whether a port is still free set up. Fail with exception if it has already been registered.
Definition at line 180 of file __init__.py.
| None homeassistant.components.numato.NumatoAPI.edge_detect | ( | self, | |
| int | device_id, | ||
| int | port, | ||
| Callable[[int, bool], None] | event_callback | ||
| ) |
Add detection for RISING and FALLING events.
Definition at line 251 of file __init__.py.
| int homeassistant.components.numato.NumatoAPI.read_adc_input | ( | self, | |
| int | device_id, | ||
| int | port | ||
| ) |
Read an ADC value from a GPIO ADC port.
Definition at line 245 of file __init__.py.
| int homeassistant.components.numato.NumatoAPI.read_input | ( | self, | |
| int | device_id, | ||
| int | port | ||
| ) |
Read a value from a GPIO.
Definition at line 240 of file __init__.py.
| None homeassistant.components.numato.NumatoAPI.setup_input | ( | self, | |
| int | device_id, | ||
| int | port | ||
| ) |
Set up a GPIO as input.
Definition at line 229 of file __init__.py.
| None homeassistant.components.numato.NumatoAPI.setup_output | ( | self, | |
| int | device_id, | ||
| int | port | ||
| ) |
Set up a GPIO as output.
Definition at line 223 of file __init__.py.
| None homeassistant.components.numato.NumatoAPI.write_output | ( | self, | |
| int | device_id, | ||
| int | port, | ||
| int | value | ||
| ) |
Write a value to a GPIO.
Definition at line 235 of file __init__.py.