# Commands

## batterX Home - Control GPIO Outputs

```
type     entity    text1    text2                Description

20737    0         1        0=OFF 1=ON 2=AUTO    Output 1
20737    0         2        0=OFF 1=ON 2=AUTO    Output 2
20737    0         3        0=OFF 1=ON 2=AUTO    Output 3
20737    0         4        0=OFF 1=ON 2=AUTO    Output 4
```

Using this command you can turn on/off the GPIO Outputs of the liveX.

* `type`: Command identifier
  * `20737`
* `entity`: Command identifier
  * `0`
* `text1`: Output number
  * `1`: Output 1
  * `2`: Output 2
  * `3`: Output 3
  * `4`: Output 4
* `text2`: Command action
  * `0`: Forced Off
  * `1`: Forced On
  * `2`: Automatic

#### Command Example

`type = 20737`  `entity = 0`  `text1 = 3`  `text2 = 1`

This command will turn `Output 3` **`ON`**

## batterX Home - Control Inverter Commands

```
type     entity    text1    text2                Description

20738    0         1        0=OFF 1=ON 2=AUTO    Grid Injection
20738    0         2        0=OFF 1=ON 2=AUTO    Battery Charging
20738    0         3        0=OFF 1=ON 2=AUTO    Battery Charging AC
20738    0         4        0=OFF 1=ON 2=AUTO    Battery Discharging
```

Using this command you can turn on/off the inverter commands.

* `type`: Command identifier
  * `20738`
* `entity`: Command identifier
  * `0`
* `text1`: Inverter command number
  * `1`: Grid injection
  * `2`: Battery charging
  * `3`: Battery charging from AC
  * `4`: Battery discharging
* `text2`: Command action
  * `0`: Forced Off
  * `1`: Forced On
  * `2`: Automatic

#### Command Example

`type = 20738`  `entity = 0`  `text1 = 3`  `text2 = 1`

This command will turn `BatteryChargingAC` **`ON`**
