# DeviceServer
DeviceServer API

This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 1.2.2
- Package version: 1.2.2
- Generator version: 7.11.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen

## Requirements.

Python 3.8+

## Installation & Usage
### pip install

If the python package is hosted on a repository, you can install directly using:

```sh
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
```
(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`)

Then import the package:
```python
import DeviceServer
```

### Setuptools

Install via [Setuptools](http://pypi.python.org/pypi/setuptools).

```sh
python setup.py install --user
```
(or `sudo python setup.py install` to install the package for all users)

Then import the package:
```python
import DeviceServer
```

### Tests

Execute `pytest` to run the tests.

## Getting Started

Please follow the [installation procedure](#installation--usage) and then run the following:

```python

import DeviceServer
from DeviceServer.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost/DeviceServer
# See configuration.py for a list of all supported configuration parameters.
configuration = DeviceServer.Configuration(
    host = "http://localhost/DeviceServer"
)



# Enter a context with an instance of the API client
with DeviceServer.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = DeviceServer.AttenuatorApi(api_client)
    device_id = 'device_id_example' # str | 
    expander_index = 56 # int | expander index
    expander_port_index = 56 # int | expander port index (optional)

    try:
        # GET attenuation state
        api_response = api_instance.get_attenuator_state(device_id, expander_index, expander_port_index=expander_port_index)
        print("The response of AttenuatorApi->get_attenuator_state:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling AttenuatorApi->get_attenuator_state: %s\n" % e)

```

## Documentation for API Endpoints

All URIs are relative to *http://localhost/DeviceServer*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*AttenuatorApi* | [**get_attenuator_state**](docs/AttenuatorApi.md#get_attenuator_state) | **GET** /Attenuator/{device_id}/Attenuate | GET attenuation state
*AttenuatorApi* | [**get_channel_attenuation**](docs/AttenuatorApi.md#get_channel_attenuation) | **GET** /Attenuator/{device_id}/AttenuateChannel | GET attenuation channel state
*AttenuatorApi* | [**get_device_attenuation_configuration**](docs/AttenuatorApi.md#get_device_attenuation_configuration) | **GET** /Attenuator/{device_id}/AttenuatorConfig | GET attenuation device config
*AttenuatorApi* | [**put_attenuator_state**](docs/AttenuatorApi.md#put_attenuator_state) | **PUT** /Attenuator/{device_id}/Attenuate | PUT attenuation state
*AttenuatorApi* | [**put_channel_attenuation**](docs/AttenuatorApi.md#put_channel_attenuation) | **PUT** /Attenuator/{device_id}/AttenuateChannel | PUT attenuation state
*DeviceMountSystemApi* | [**get_tray_description**](docs/DeviceMountSystemApi.md#get_tray_description) | **GET** /DeviceMountSystem/{device_id}/Tray/Description | GET description of Tray
*DeviceMountSystemApi* | [**get_tray_present**](docs/DeviceMountSystemApi.md#get_tray_present) | **GET** /DeviceMountSystem/{device_id}/Tray/Present | GET state of Port Module Relay
*DeviceMountSystemApi* | [**get_tray_uuid**](docs/DeviceMountSystemApi.md#get_tray_uuid) | **GET** /DeviceMountSystem/{device_id}/Tray/UUID | GET UUID of Tray
*DeviceMountSystemApi* | [**put_tray_description**](docs/DeviceMountSystemApi.md#put_tray_description) | **PUT** /DeviceMountSystem/{device_id}/Tray/Description | PUT description of Tray
*DeviceMountSystemApi* | [**put_tray_uuid**](docs/DeviceMountSystemApi.md#put_tray_uuid) | **PUT** /DeviceMountSystem/{device_id}/Tray/UUID | PUT UUID of Tray
*DevicesApi* | [**get_current**](docs/DevicesApi.md#get_current) | **GET** /Devices/{device_id}/Currents/{current_index} | GET current reading of device
*DevicesApi* | [**get_device_device_id_buttons**](docs/DevicesApi.md#get_device_device_id_buttons) | **GET** /Devices/{device_id}/Buttons | GET all buttons for device
*DevicesApi* | [**get_device_device_id_leds**](docs/DevicesApi.md#get_device_device_id_leds) | **GET** /Devices/{device_id}/Leds | GET all leds for Device
*DevicesApi* | [**get_device_device_id_ports**](docs/DevicesApi.md#get_device_device_id_ports) | **GET** /Devices/{device_id}/Ports | GET all Ports for Device
*DevicesApi* | [**get_device_device_id_temperature_ports**](docs/DevicesApi.md#get_device_device_id_temperature_ports) | **GET** /Devices/{device_id}/Temparatures | GET all temperature ports for device
*DevicesApi* | [**get_device_id_port_index**](docs/DevicesApi.md#get_device_id_port_index) | **GET** /Devices/{device_id}/Ports/{port_index} | GET status of port
*DevicesApi* | [**get_device_port_current**](docs/DevicesApi.md#get_device_port_current) | **GET** /Devices/{device_id}/Ports/{port_index}/Currents | GET current reading of device Port
*DevicesApi* | [**get_device_port_module_led_state**](docs/DevicesApi.md#get_device_port_module_led_state) | **GET** /Devices/{device_id}/Ports/{port_index}/Modules/{module_index}/Leds | GET state of Port Module Led
*DevicesApi* | [**get_device_port_module_relay_state**](docs/DevicesApi.md#get_device_port_module_relay_state) | **GET** /Devices/{device_id}/Ports/{port_index}/Modules/{module_index}/Relays/{relay_index} | GET state of Port Module Relay
*DevicesApi* | [**get_device_port_voltage**](docs/DevicesApi.md#get_device_port_voltage) | **GET** /Devices/{device_id}/Ports/{port_index}/Voltages | GET voltage reading of device Port
*DevicesApi* | [**get_device_rotation_angle**](docs/DevicesApi.md#get_device_rotation_angle) | **GET** /Devices/{device_id}/Rotation | GET Rotation Angle
*DevicesApi* | [**get_device_rotation_speed**](docs/DevicesApi.md#get_device_rotation_speed) | **GET** /Devices/{device_id}/Speed | GET Turntable Speed
*DevicesApi* | [**get_device_uuid_deprecated**](docs/DevicesApi.md#get_device_uuid_deprecated) | **GET** /Serial/{device_serial} | GET uuid from database
*DevicesApi* | [**get_devices**](docs/DevicesApi.md#get_devices) | **GET** /Devices | GET list of devices
*DevicesApi* | [**get_devices_button**](docs/DevicesApi.md#get_devices_button) | **GET** /Devices/{device_id}/Button/{button_index} | GET status of button
*DevicesApi* | [**get_devices_index**](docs/DevicesApi.md#get_devices_index) | **GET** /Devices/{device_id} | GET single device
*DevicesApi* | [**get_devices_led**](docs/DevicesApi.md#get_devices_led) | **GET** /Devices/{device_id}/Leds/{led_index} | GET status of Led
*DevicesApi* | [**get_devices_temperature**](docs/DevicesApi.md#get_devices_temperature) | **GET** /Devices/{device_id}/Temperature | GET temperature reading
*DevicesApi* | [**get_fan_speed**](docs/DevicesApi.md#get_fan_speed) | **GET** /Devices/{device_id}/Fan/{fan_index}/Speed | GET device fan speed
*DevicesApi* | [**get_fan_target_temperature**](docs/DevicesApi.md#get_fan_target_temperature) | **GET** /Devices/{device_id}/Fan/{fan_index}/TargetTemperature | GET device fan target temperature
*DevicesApi* | [**get_fan_temperature**](docs/DevicesApi.md#get_fan_temperature) | **GET** /Devices/{device_id}/Fan/{fan_index}/Temperature | GET device fan temperature
*DevicesApi* | [**get_firmware_version**](docs/DevicesApi.md#get_firmware_version) | **GET** /Devices/{device_id}/Firmware | GET Device Firmware Version
*DevicesApi* | [**get_image**](docs/DevicesApi.md#get_image) | **GET** /Devices/{device_id}/Image | GET Image
*DevicesApi* | [**get_image_names**](docs/DevicesApi.md#get_image_names) | **GET** /Devices/{device_id}/ImageNames | GET Image Names
*DevicesApi* | [**get_message_from_rx_buffer_deprecated**](docs/DevicesApi.md#get_message_from_rx_buffer_deprecated) | **GET** /Devices/messages/rx | GET message from RX table
*DevicesApi* | [**get_message_from_tx_buffer_deprecated**](docs/DevicesApi.md#get_message_from_tx_buffer_deprecated) | **GET** /Devices/messages/tx | GET message from TX table
*DevicesApi* | [**get_port**](docs/DevicesApi.md#get_port) | **GET** /Port/{port_id} | GET status of Port by id
*DevicesApi* | [**get_port_led_state**](docs/DevicesApi.md#get_port_led_state) | **GET** /Devices/{device_id}/Ports/{port_index}/Leds/{led_index} | GET state of Port LED
*DevicesApi* | [**get_port_setup_status**](docs/DevicesApi.md#get_port_setup_status) | **GET** /Devices/{device_id}/Ports/{port_index}/SetupStatus | GET setup status of Port
*DevicesApi* | [**get_port_states**](docs/DevicesApi.md#get_port_states) | **GET** /PortStates/{port_id} | GET port states by Port id
*DevicesApi* | [**get_ports**](docs/DevicesApi.md#get_ports) | **GET** /Ports | GET status of all ports
*DevicesApi* | [**get_relay_state**](docs/DevicesApi.md#get_relay_state) | **GET** /Devices/{device_id}/Relay | GET state of relay
*DevicesApi* | [**get_temperature_range**](docs/DevicesApi.md#get_temperature_range) | **GET** /Devices/{device_id}/Temperature/Range | GET Temperature Range
*DevicesApi* | [**get_temperature_thresholds**](docs/DevicesApi.md#get_temperature_thresholds) | **GET** /Devices/{device_id}/Temperature/Thresholds | GET Temperature Thresholds
*DevicesApi* | [**get_turntable_calibration_data**](docs/DevicesApi.md#get_turntable_calibration_data) | **GET** /Devices/{device_id}/Calibration | GET Turntable Calibration Values
*DevicesApi* | [**get_voltage**](docs/DevicesApi.md#get_voltage) | **GET** /Devices/{device_id}/Voltages/{voltage_index} | GET voltage reading of device
*DevicesApi* | [**put_auto_calibrate_turntable**](docs/DevicesApi.md#put_auto_calibrate_turntable) | **PUT** /Devices/{device_id}/Calibration | PUT Calibration
*DevicesApi* | [**put_device_deprecated**](docs/DevicesApi.md#put_device_deprecated) | **PUT** /Devices/AddDevice | PUT Add evice
*DevicesApi* | [**put_device_device_id_description**](docs/DevicesApi.md#put_device_device_id_description) | **PUT** /Device/{device_id}/Description | PUT a description for a Device
*DevicesApi* | [**put_device_device_id_name**](docs/DevicesApi.md#put_device_device_id_name) | **PUT** /Device/{device_id}/Name | PUT a name for a Device
*DevicesApi* | [**put_device_id_label**](docs/DevicesApi.md#put_device_id_label) | **PUT** /Device/{device_id}/Port/{port_index}/Label | PUT a Port label
*DevicesApi* | [**put_device_port_module_led_state**](docs/DevicesApi.md#put_device_port_module_led_state) | **PUT** /Devices/{device_id}/Ports/{port_index}/Modules/{module_index}/Leds | PUT state of Port Module LED
*DevicesApi* | [**put_device_port_module_relay_state**](docs/DevicesApi.md#put_device_port_module_relay_state) | **PUT** /Devices/{device_id}/Ports/{port_index}/Modules/{module_index}/Relays/{relay_index} | PUT state of Port Module Relay
*DevicesApi* | [**put_device_rotation_angle**](docs/DevicesApi.md#put_device_rotation_angle) | **PUT** /Devices/{device_id}/Rotation | PUT Rotation
*DevicesApi* | [**put_device_rotation_angle_continuous**](docs/DevicesApi.md#put_device_rotation_angle_continuous) | **PUT** /Devices/{device_id}/ContiniousRotation | PUT Continious Rotation
*DevicesApi* | [**put_device_rotation_speed**](docs/DevicesApi.md#put_device_rotation_speed) | **PUT** /Devices/{device_id}/Speed | PUT Turntable Speed
*DevicesApi* | [**put_devices_led_index**](docs/DevicesApi.md#put_devices_led_index) | **PUT** /Devices/{device_id}/Leds/{led_index} | PUT state of Led
*DevicesApi* | [**put_devices_ports**](docs/DevicesApi.md#put_devices_ports) | **PUT** /Devices/{device_id}/Ports/{port_index} | PUT state of port
*DevicesApi* | [**put_halt_rotation**](docs/DevicesApi.md#put_halt_rotation) | **PUT** /Devices/{device_id}/HaltRotation | PUT Halt Rotation
*DevicesApi* | [**put_port_led_state**](docs/DevicesApi.md#put_port_led_state) | **PUT** /Devices/{device_id}/Ports/{port_index}/Leds/{led_index} | PUT state of Port LED
*DevicesApi* | [**put_port_port_id_label**](docs/DevicesApi.md#put_port_port_id_label) | **PUT** /Port/{port_id}/Label | PUT the label for a Port
*DevicesApi* | [**put_port_port_id_state_label**](docs/DevicesApi.md#put_port_port_id_state_label) | **PUT** /Port/{port_id}/StateLabel | PUT state label
*DevicesApi* | [**put_ports_pulse**](docs/DevicesApi.md#put_ports_pulse) | **PUT** /Devices/{device_id}/Ports/{port_index}/Pulse | PUT Port into state for period of time
*DevicesApi* | [**put_relay_state**](docs/DevicesApi.md#put_relay_state) | **PUT** /Devices/{device_id}/Relay | PUT state of Relay
*DevicesApi* | [**put_serial_test_message_deprecated**](docs/DevicesApi.md#put_serial_test_message_deprecated) | **PUT** /Devices/{device_id}/Ports/{port_index}/SerialMessage | Serial Message Test
*DevicesApi* | [**put_state_by_port_id**](docs/DevicesApi.md#put_state_by_port_id) | **PUT** /Port/{port_id} | PUT state of port
*DockerApi* | [**get_container_logs**](docs/DockerApi.md#get_container_logs) | **GET** /Docker/container/logs | GET a Docker container&#39;s logs
*DockerApi* | [**get_docker_container_names**](docs/DockerApi.md#get_docker_container_names) | **GET** /Docker/containers | GET all Docker containers
*DockerApi* | [**get_docker_containers_metrics**](docs/DockerApi.md#get_docker_containers_metrics) | **GET** /Docker/containers/metrics | GET Docker container uptimes, versions, statuses and logs for each container
*InternalApi* | [**get_device_uuid**](docs/InternalApi.md#get_device_uuid) | **GET** /Internal/{device_serial} | GET uuid from database
*InternalApi* | [**get_message_from_rx_buffer**](docs/InternalApi.md#get_message_from_rx_buffer) | **GET** /Internal/messages/rx | GET message from RX table
*InternalApi* | [**get_message_from_tx_buffer**](docs/InternalApi.md#get_message_from_tx_buffer) | **GET** /Internal/messages/tx | GET message from TX table
*InternalApi* | [**post_verify_jwt**](docs/InternalApi.md#post_verify_jwt) | **POST** /Internal/verify_jwt | POST /verify_jwt
*InternalApi* | [**post_verify_user_access**](docs/InternalApi.md#post_verify_user_access) | **POST** /Internal/access_control | POST /access_control
*InternalApi* | [**put_device**](docs/InternalApi.md#put_device) | **PUT** /Internal/AddDevice | PUT Add Device
*SerialMuxApi* | [**put_serial_test_message**](docs/SerialMuxApi.md#put_serial_test_message) | **PUT** /SerialMux/{device_id}/Ports/{port_index}/SerialMessage | Serial Message Test
*TurntableApi* | [**turntable_get_device_rotation_angle**](docs/TurntableApi.md#turntable_get_device_rotation_angle) | **GET** /Turntable/{device_id}/Rotation | GET Rotation Angle
*TurntableApi* | [**turntable_get_device_rotation_speed**](docs/TurntableApi.md#turntable_get_device_rotation_speed) | **GET** /Turntable/{device_id}/Speed | GET Turntable Speed
*TurntableApi* | [**turntable_get_image**](docs/TurntableApi.md#turntable_get_image) | **GET** /Turntable/{device_id}/Image | GET Image
*TurntableApi* | [**turntable_get_image_names**](docs/TurntableApi.md#turntable_get_image_names) | **GET** /Turntable/{device_id}/ImageNames | GET Image Names
*TurntableApi* | [**turntable_get_turntable_calibration_data**](docs/TurntableApi.md#turntable_get_turntable_calibration_data) | **GET** /Turntable/{device_id}/Calibration | GET Turntable Calibration Values
*TurntableApi* | [**turntable_put_auto_calibrate_turntable**](docs/TurntableApi.md#turntable_put_auto_calibrate_turntable) | **PUT** /Turntable/{device_id}/Calibration | PUT Calibration
*TurntableApi* | [**turntable_put_device_rotation_angle**](docs/TurntableApi.md#turntable_put_device_rotation_angle) | **PUT** /Turntable/{device_id}/Rotation | PUT Rotation
*TurntableApi* | [**turntable_put_device_rotation_angle_continuous**](docs/TurntableApi.md#turntable_put_device_rotation_angle_continuous) | **PUT** /Turntable/{device_id}/ContiniousRotation | PUT Continious Rotation
*TurntableApi* | [**turntable_put_device_rotation_speed**](docs/TurntableApi.md#turntable_put_device_rotation_speed) | **PUT** /Turntable/{device_id}/Speed | PUT Turntable Speed
*TurntableApi* | [**turntable_put_halt_rotation**](docs/TurntableApi.md#turntable_put_halt_rotation) | **PUT** /Turntable/{device_id}/HaltRotation | PUT Halt Rotation


## Documentation For Models

 - [AttenuationState](docs/AttenuationState.md)
 - [ChannelAttenuationState](docs/ChannelAttenuationState.md)
 - [DbButtonState](docs/DbButtonState.md)
 - [DbDeviceButton](docs/DbDeviceButton.md)
 - [DbDeviceLed](docs/DbDeviceLed.md)
 - [DbDevicePort](docs/DbDevicePort.md)
 - [DbDeviceTemperaturePort](docs/DbDeviceTemperaturePort.md)
 - [DbLedState](docs/DbLedState.md)
 - [DbPortState](docs/DbPortState.md)
 - [DbUploadFirmwareState](docs/DbUploadFirmwareState.md)
 - [Device](docs/Device.md)
 - [DeviceButton](docs/DeviceButton.md)
 - [DeviceLed](docs/DeviceLed.md)
 - [DevicePort](docs/DevicePort.md)
 - [DeviceRxBuffer](docs/DeviceRxBuffer.md)
 - [DeviceTemperaturePort](docs/DeviceTemperaturePort.md)
 - [DeviceTxBuffer](docs/DeviceTxBuffer.md)
 - [FirmwareVersion](docs/FirmwareVersion.md)
 - [HostConfig](docs/HostConfig.md)
 - [LedState](docs/LedState.md)
 - [PortState](docs/PortState.md)
 - [PostVerifyUserAccessRequest](docs/PostVerifyUserAccessRequest.md)
 - [PutDeviceDeviceIdDescription200Response](docs/PutDeviceDeviceIdDescription200Response.md)
 - [PutDeviceDeviceIdName200Response](docs/PutDeviceDeviceIdName200Response.md)
 - [RelayState](docs/RelayState.md)
 - [TempRange](docs/TempRange.md)
 - [Temperature](docs/Temperature.md)


<a id="documentation-for-authorization"></a>
## Documentation For Authorization


Authentication schemes defined for the API:
<a id="bearerAuthHeader"></a>
### bearerAuthHeader

- **Type**: Bearer authentication


## Author

david@3adesign.co.uk


