A TypeScript-powered Express API server for managing Meross smart devices via the Meross Cloud. Built for seamless IoT automation and smart control integration.
┌───────────────────────────────────────────────────────────────────────┐
│ Meross API Server │
│ │
│ ┌───────────────────┐ ┌───────────────────┐ ┌───────────────┐ │
│ │ Express App │ │ MerossManager │ │ MerossCloud │ │
│ │ │ │ │ │ (SDK) │ │
│ │ - REST Endpoints │◄──►│ - Device Mgmt │◄──►│ - Cloud Comm │ │
│ │ - Middlewares │ │ - Sync │ │ - Auth │ │
│ └───────────────────┘ └───────────────────┘ └───────────────┘ │
│ │
└───────────────────────────────────────────────────────────────────────┘
git clone https://github.com/munirmardinli/meross-api-server.git
cd meross-api-server
npm install
.env
file with your Meross credentials:MEROSS_EMAIL=your@email.com
MEROSS_PASSWORD=yourpassword
Running the Server
npx tsx watch src/index.ts # Development mode with hot-reload
node dist/src/index.js # Production mode
The server will start on port 3000 by default.
GET /devices
List all discovered Meross devices.
Example Response:
[
{
"uuid": "1234567890",
"name": "Smart Plug",
"type": "mss110",
"online": true,
"controllable": true
}
]
POST /devices/:uuid/toggle
Toggle a device's channel state.
Request Body:
{
"channel": 0
}
Success Response:
{
"status": "success",
"device": "Smart Plug",
"action": "toggle",
"channel": 0
}
Error Response:
{
"error": "Device not controllable",
"solution": "Check synchronization"
}
Building the Project
npx tsc
Environment Variable | Required | Description |
---|---|---|
MEROSS_EMAIL |
✅ | Your Meross account email |
MEROSS_PASSWORD |
✅ | Your Meross account password |
PORT |
❌ | Server port (default: 3000 ) |
Contributions are welcome! Please open an issue or submit a pull request.
git checkout -b feature/AmazingFeature
)git commit -m 'Add some AmazingFeature'
)git push origin feature/AmazingFeature
)Distributed under the MIT License. See LICENSE
for more information.
Munir Mardinli