> ## 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 SDM530-LoRa

|| To identify, connect and decode data from the SDM530-LoRa [see this article](/en/article/decoding-data-from-the-eastron-sdm530-lora-bc62t/)

## Getting the current state of the relays

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

| 01 03 FD 02 00 02 54 67

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

| 01 03 04 ff ff ff 00 bb e7

Bytes 3-5 (0-based) of the received uplink can be decoded identically to when the relay state is received periodically. 0x00 indicates the relay is Open and 0xFF indicates the relay is Closed for Phase 1, Phase 2 and Phase 3 respectively. In the above example all relays are closed.

## Switching all relays

All relays can be closed (0xFF) simultaneously using the following command.

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

All relays can be opened (0x00) simultaneously using the following command.

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

## Switching individual relays

Phase 1 relay can be switched (closed than opened) individually using the following commands. All other relays will be open.

| 01 10 FD 02 00 02 04 FF 00 00 00 1E F6
| 01 10 FD 02 00 02 04 00 00 00 00 2E E2

Phase 2 relay can be switched (closed than opened) individually using the following commands. All other relays will be open.

| 01 10 FD 02 00 02 04 00 FF 00 00 1E D2
| 01 10 FD 02 00 02 04 00 00 00 00 2E E2

Phase 3 relay can be switched (closed than opened) individually using the following commands. All other relays will be open.

| 01 10 FD 02 00 02 04 00 00 FF 00 6F 12
| 01 10 FD 02 00 02 04 00 00 00 00 2E E2