Last Updated on : 2024-06-28 05:48:45download
A space defines the geographical location, area, and layout information of IoT scenes, and displays the topological relationship between various smart devices in a tree structure. You can add physical resources (mainly smart devices) to each node of the tree structure. For example, lights, air conditioners, and video security devices in rooms.
Flexibly scalable and universal space models across business semantics can cope with business forms of all industries and scenarios. Thus, you can achieve more efficient solutions in diversified scenarios. A space plays multiple roles in IoT application development, including but not limited to:
The hierarchical structure constructed by the space has the following features:
As a multifunction venue, a gym contains different levels of spaces like the gym hall, floors, and rooms for ball games. You can create the desired spaces in the space model, helping implement device linkage. For example, control lights and a basketball court scoreboard.
The following figure shows an example of a space structure. The gym is the root node, and the first floor (including the basketball court) and the second floor (including the table tennis room and badminton court) are child nodes.
By creating the structure on top of the space model, you can:
As a popular business scenario, smart apartment can involve spaces in various dimensions, such as apartments, units, buildings, room numbers, and public areas. A resident needs permission to devices not only in his room, but also in the public space area. This way, implement the linkage between devices in the specified room and devices in the public area.
The following figure shows an example of a space structure. The apartment is the root node, and Building A, Unit 1, and Floor 1 (including rooms 101 and 102) are child nodes.
By creating the structure on top of the space model, you can:
On top of this space model, you can further extend and iterate features. For example:
After more and more extended functionalities are in place, smart apartments provide a more convenient and comfortable living experience, while improving the safety and quality of life for residents.
API name | API endpoint |
---|---|
Delete Space | DELETE:/v2.0/cloud/space/{space_id} |
Query Resources in Space | GET:/v2.0/cloud/space/{space_id}/resource |
Create Space | POST:/v2.0/cloud/space/creation |
Query Space | GET:/v2.0/cloud/space/{space_id} |
Query Space List | GET:/v2.0/cloud/space/child |
Modify Space Information | PUT:/v2.0/cloud/space/{space_id} |
Query Parent-Child Relationship | GET:/v2.0/cloud/space/relation |
Item | Limits |
---|---|
The number of devices under a single space node | 100 |
The number of child nodes in a single space | 100 |
The number of levels in a single space | 10 levels |
The concepts of home and asset often appear in certain business scenarios of Tuya, and both are the upper-level business packaging of a space. As a more abstract model, a space only retains the most fundamental data of topologies and resource association. The space does not include the upper-level business data of assets and homes such as a room in a home.
If you want to get upper-level business data, see Asset Management and Home Management.
In order to apply the space model in the upper-level business, Tuya can also help you upgrade the underlying space into an upper-level asset or home. This way, you can seamlessly connect and use upper-layer business capabilities, such as OEM app.
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback