> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://support.cthings.io/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Switching the relays on the Eastron SDM320-LoRa

|| To identify, connect and decode data from the SDM320-LoRa [see this article](/en/article/decoding-data-from-the-eastron-sdm320-lora-ubjnis/?bust=1773850080451)

## Getting the current state of the relay

To get the current state of the relay, the following downlink can be sent on fPort 1.

| 01 03 FC B0 00 01 B5 BD

An uplink similar to the following should be received shortly after the downlink is sent.

| 01 03 02 00 00 B8 44

Bytes 3-4 (0-based) of the received uplink can be decoded identically to when the relay state is received periodically. 00 00 indicates the relay is Open and 00 FF indicates the relay is Closed. In the above example all relays are closed.

## Switching the relay state

The relay can be closed using the following command.

| 01 10 FD 00 00 01 02 FF 00 CB 6F

The relay can be opened using the following command.

| 01 10 FD 00 00 01 02 00 00 8A 9F
