[Open-source] A lightweight IoT platform developed in Golang, accelerating IoT development and delivery
![[Open-source] A lightweight IoT platform developed in Golang, accelerating IoT development and delivery](https://yy123.ink/api/img/1782579206417-30udte.jpg)
1. Project Overview
Sagoo IOT
SagooIOT is a lightweight IoT platform developed with golang. It supports cross-platform IoT access and management schemes, and implements basic functions for IoT development. Based on these functions, a complete IoT-related business system can be quickly built.
2. Open Source License
Licensed under Apache-2.0
3. Screenshots
Demonstration Picture
Demonstration Picture















4. Feature Overview
- SagooIOT System Advantages -
SagooIOT provides support for private deployment or containerization, allowing users to easily deploy it on a single machine, cluster, or container service environment, and supports horizontal expansion to meet different business needs. Using SagooIOT can achieve excellent performance and provide excellent IoT service capabilities.
Millions
Data Concurrency
Distributed system deployment, supporting millions of concurrent data.
Tens of millions
Device access
Device Gateway Horizontal Expansion, Supporting Tens of Millions of Device Access.
Billions
Data Collection
TDengine Time Series Database, Supporting Billions of Data Collection Points
Low Latency
Data Communication
High-performance network components, non-blocking network programming, with extremely low communication latency.
Features
- High Productivity: A backend management system can be built in a few minutes
- Modularity: Single application, multiple system mode, a complete application is split into multiple systems, making it easier to extend and increase code reuse.
- Authentication Mechanism: Using gtoken for user state authentication and casbin for permission authentication
- Routing Mode: Benefiting from goframe2.0, it provides a standardized routing registration way, without annotation, API documents can be automatically generated
- Interface Development
- Supporting Thing Models, Multiple Products, and Multiple Device Access Management
- Shielding Network Protocol Complexity, Adapting to Multiple Access Protocols (TCP, MQTT, UDP, CoAP, HTTP, GRPC, RPC, etc.), Flexible Access to Different Devices from Different Manufacturers
- Supporting Cross-Platform Running, Quickly Implementing Edge Computing Functions, Implementing Offline Automatic Warning, Automatic Execution, etc.
- Supporting Cross-Terminal Display, Device Status Monitoring and Data Display can be performed through PC, Mobile, Tablet, etc.
- Unique Plugin System, Supporting Cross-Language Access, Quickly Accessing through C/C++, Python-written Plugins
- Plugin System Supports Hot Swapping, Supporting Modbus TCP, Modbus RTU, Modbus ASCII, IEC61850, OPC, etc. Data Collection Protocols
Built-in functions
- User Management: Users are system operators, this function mainly completes system user configuration.
- Department Management: Configuring system organizational structures (companies, departments, teams), tree structure presentation supports data permissions.
- Position Management: Configure system users' positions.
- Menu Management: Configure system menus, operation permissions, button permissions, etc.
- Role Management: Role menu permission distribution, set role data range permissions by organization.
- Dictionary Management: Maintain some fixed data frequently used in the system.
- Parameter Management: Dynamically configure common parameters in the system.
- Operation Log: Record and query system normal operation logs; record and query system abnormal information logs.
- Login Log: Record and query system login logs, including login exceptions.
- Online Users: Monitor the status of active users in the system.
- Scheduled Tasks: Online (add, modify, delete) task scheduling, including execution result logs.
- Code Generation: Generate front-end and back-end code.
- Service Monitoring: Monitor current system CPU, memory, disk, stack, etc. related information.
- File Upload, Cache Tags, etc.
- Product Management: Unified management of device-type products.
- Device Management: Device access and data configuration management.
- Data Center: Data modeling management of third-party APIs or databases and internal data, supporting rule definitions.
5. Tech Stack
System architecture

SagooIOT is an open-source enterprise-level IoT development platform based on GoLang. It is responsible for device management and protocol data management, supporting cross-platform IoT access and management schemes. The platform has implemented basic functions related to IoT development, and based on these functions, a complete IoT-related business system can be quickly built. The goal is to reduce development work through reusable components, simplify, and accelerate IoT development delivery. It supports multiple access protocols (TCP, MQTT, UDP, CoAP, HTTP, GRPC, RPC, etc.).
- Based on the new Go Frame 2.0 + Vue3 + Element Plus, a full-stack front-end and back-end separated management system is developed.
- Front-end uses vue-next-admin, Vue, Element UI.
Tech Stack
- GoFrame
- Vue3
- Swagger
- Jwt
- Element plus
- MySql
- Redis
- TDengine
Basic Environment Installation
- Redis 7.0.4
- TDengine 3.0.1.5
- EMQX 5.0.9-el8
- Nginx 1.22.0
- rule-engine
For detailed installation process, please refer to the open-source project official documentation.
Deployment Instructions
This program can be independently deployed and executed directly, or used with nginx or apache.
Hardware Requirements
Minimum Configuration
CPU
1 core
Memory
1GB
Hard disk
40G
Recommended Configuration
CPU
2-core+
Memory
4GB+
Hard disk
40GB+
Supported Platforms
SagooIOT uses Golang for development and has good cross-platform characteristics. The following platforms are supported:
aix/ppc64 android/386 android/amd64 android/arm android/arm64 darwin/amd64 darwin/arm64 dragonfly/amd64 freebsd/386 freebsd/amd64 freebsd/arm freebsd/arm64 illumos/amd64 js/wasm linux/386 linux/amd64 linux/arm linux/arm64 linux/mips linux/mips64 linux/mips64le linux/mipsle linux/ppc64 linux/ppc64le linux/riscv64 linux/s390x netbsd/386 netbsd/amd64 netbsd/arm netbsd/arm64 openbsd/386 openbsd/amd64 openbsd/arm openbsd/arm64 plan9/386 plan9/amd64 plan9/arm solaris/amd64 windows/386 windows/amd64 windows/arm
Device Access Protocol
After the device is successfully connected to the network, a specific protocol needs to be used to interact with the cloud platform. The following is a brief introduction to several commonly used device access protocols and the notes to be considered when selecting them.
MQTT
MQTT is a lightweight publish-subscribe message protocol that works on the TCP protocol. It requires devices to establish a persistent TCP connection with the cloud platform and complete authentication before data communication can be performed.
MQTT Protocol has the following significant advantages:
Supports Real-time Control
MQTT can achieve real-time command issuance and control through its long connection with the cloud platform. Devices can immediately receive control instructions and achieve real-time control in scenarios such as smart homes and agricultural monitoring.
Easy to Monitor Device Status
The long connection also makes it easy to monitor the online status of devices. Although the device connection may be disconnected due to network problems, the MQTT heartbeat mechanism can effectively detect the status.
Flexible Security Level
MQTT supports different security authentication mechanisms. For resource-constrained devices, simple username and password encryption can be used. For high-security scenarios, TLS certificate mechanisms can be used to ensure data security.
Small Data Traffic
MQTT uses binary format, which can significantly reduce unnecessary payload compared to text protocols. This is particularly beneficial for low-bandwidth networks such as NB-IoT. MQTT is a high-efficiency, flexible, and secure IoT message protocol. It is very suitable for scenarios that require real-time control and monitoring, and is the preferred access protocol for IoT.
HTTP
HTTP protocol runs on top of TCP and is very friendly to developers. Devices can send data to the cloud platform through HTTP.
HTTP is simple and practical, and if the device resources allow, HTTPS can be used for secure transmission. However, HTTP is not as real-time as MQTT and cannot perform command control. For simple data collection scenarios, HTTP can be chosen.
CoAP
CoAP is a lightweight REST-style protocol that runs on UDP and is more suitable for low-power devices.
CoAP is not only lightweight but also has a usage method similar to HTTP. If the device resources are limited, CoAP can be considered.
TCP
SagooIOT also supports custom protocol access based on TCP. For example, many DTU devices use TCP transparent transmission.
TCP can be highly customized, but it requires self-developed communication format parsing. It can also be converted to a different format on the cloud platform to adapt to different devices.
Devices can choose MQTT, HTTP, CoAP, or TCP access protocols based on their resource situation, real-time requirements, security requirements, etc.
Regardless of the protocol adopted, format parsing, authentication, and other processing are required. SagooIOT provides different protocol access methods and backend data processing and conversion functions.
Source: SagooIOT Official Website Documentation