MD1 API Documentation
The SwychTemp MD1 is a LoRa-enabled Modbus gateway providing HTTP APIs for device control and monitoring.
Quick Links
| Guide | Description |
|---|---|
| Getting Started | WiFi setup, network discovery, first API call |
| Configuration | Device settings, LoRa, encryption, Modbus nodes |
| Devices | Read states, write commands |
| Rules Engine | On-device automation rules |
| Modbus Tool | Diagnostic register read/write tool |
| WiFi | WiFi credential management |
| LoRa Protocol | LoRa communication and encryption |
API Endpoints Overview
| Endpoint | Method | Description |
|---|---|---|
/api/devices |
GET | Device info and current states |
/api/config |
GET | Full configuration |
/api/config/save |
POST | Save configuration |
/api/linkeddevices |
GET | Modbus device config only |
/write |
POST | Write commands to devices |
/api/rules |
GET | Get automation rules |
/api/rules |
POST | Save automation rules |
/api/modbus/exec |
POST | Execute Modbus read/write |
/wifi |
POST | Set WiFi credentials |
/wifi/clear |
GET | Clear WiFi credentials |
/restart |
POST | Restart device |
Device Identification
Each MD1 device is identified by its MAC address (12-character hex string). This ID is used in all API responses and commands.
{
"id": "AABBCCDDEEFF",
"model": "SwychTemp MD1",
"firmware": "1.0.3"
}
Base URL
When connected to your network, the MD1 is accessible via:
- IP Address: Assigned by your router (e.g.,
http://192.168.1.100) - mDNS:
http://swychmd1-AABBCC.local(first 6 characters of MAC)