1. V1
Namron simplify
  • 设备与平台交互协议
  • App端接入注意事项
  • 设备属性
  • 设备类型
  • 公用
    • 发送Email验证码
      POST
  • SSE
    • SSE事件
    • 建立连接
      POST
    • 关闭连接
      DELETE
  • 账号
    • V1
      • 注册
      • 登入
      • 登出
      • 忘记密码
      • 修改密码
      • 删除账号
      • 查询账号信息
      • 修改账号信息
      • 刷新 access_token
      • 刷新 refresh_token
      • 第三方账号登录
    • V2
      • 查询账号信息
  • 天气
    • 天气预报
      GET
  • 家庭
    • 创建家庭
      POST
    • 修改家庭
      PUT
    • 删除家庭
      DELETE
    • 解绑家庭
      DELETE
    • 查询家庭列表
      GET
    • 查询家庭详情
      GET
    • 查询成员列表
      GET
    • 查询成员详情
      GET
    • 修改成员信息
      PUT
    • 删除成员
      DELETE
    • 查询成员码
      GET
    • 查询转移码
      GET
    • 查询家庭码详情
      GET
    • 加入家庭
      POST
    • 切换转移码状态
      PUT
    • 转移家庭
      PUT
    • 查询家庭的网关设备
      GET
    • Mesh 网络配置
      PUT
  • 楼层
    • 查询楼层列表
    • 创建楼层
    • 修改楼层
    • 删除楼层
  • 房间
    • V1
      • 创建房间
      • 修改房间
      • 删除房间
      • 查询房间列表
      • 查询房间详情
      • 置顶房间
      • 查询置顶的房间列表
      • 房间添加到文件夹
    • V2
      • 查询房间列表
      • 删除房间
  • 设备
    • v1
      • 查询设备列表
      • 查询设备详情
      • 查询设置品类
      • 绑定设备
      • 修改设备
      • 删除设备
      • 控制设备
      • 批量控制设备
      • 取消定时控制设备
      • 置顶设备
      • 查询置顶的设备列表
      • 查询设备电量列表
      • 查询设备告警日志记录
      • 修改设备显示状态
    • v2
      • 绑定设备
  • OTA
    • Ble本地升级(单个设备)
      • 查询可升级的固件
    • 设备联网升级
      • 单设备
        • OTA检查
        • OTA执行
      • 批量
        • OTA检查(按家庭)
        • OTA执行
  • 群组
    • v1
      • 创建群组
      • 修改群组
      • 删除群组
      • 查询群组列表
      • 查询群组详情
      • 查询子设备型号列表
      • 查询可用的子设备型号列表
      • 群组属性上报
    • v2
      • 创建群组
      • 修改群组
      • 删除群组
      • 查询群组列表
      • 查询群组详情
  • 模式
    • 查询模式列表
    • 查询模式详情
    • 创建模式
    • 修改模式
    • 删除模式
    • 执行模式
    • 置顶模式
    • 查询置顶的模式列表
  • 文件夹
    • 查询文件夹列表
    • 创建文件夹
    • 修改文件夹
    • 删除文件夹
  • 自动化
    • V1
      • 查询自动化列表
        GET
      • 查询自动化详情
        GET
      • 查询执行日志列表
        GET
      • 创建自动化
        POST
      • 修改自动化
        PUT
      • 删除自动化
        DELETE
      • 执行自动化
        POST
      • 自动化状态
        PUT
    • V2
      • 查询自动化列表
  • Mesh 网络
    • 设备
      • 设备注册
      • 设备注册(批量)
      • 设备上报
      • 设备绑定网关
    • 群组
      • v1
        • 创建 Mesh 群组
        • 修改 Mesh 群组
        • 删除 Mesh 群组
      • v2
        • 创建 Mesh 群组
        • 修改 Mesh 群组
        • 删除 Mesh 群组
    • 模式
      • 创建 Mesh 模式
      • 修改 Mesh 模式
      • 删除 Mesh 模式
    • 自动化
      • 创建 Mesh 自动化
      • 修改 Mesh 自动化
      • 删除 Mesh 自动化
  • 推送消息
    • 查询消息列表
    • 设置 firebase token
    • 推送设置
    • 修改推送设置
  • 权限
    • 设置权限
  • 网关
    • 数据迁移
      • 是否允许数据迁移
  • 生物节律
    • 查询配置信息
    • 设置【设备】配置信息
    • 设置【规则】配置信息
    • 配置生效
    • 改变状态
  • 资源置顶
    • 置顶
    • 查询置顶的【设备】列表
    • 查询置顶的【房间】列表
  • 资源隐藏
    • 隐藏
    • 隐藏列表
  1. V1

创建自动化

POST
https://cloud-namron.com/api/v1/automation
最后修改时间:2026-08-31 07:56:21

请求参数

Header 参数

Body 参数application/json

示例
{
    "name": "string",
    "mid": "string",
    "conditions": {
        "if_conditions": [
            {
                "time_condition": {
                    "time": "string",
                    "date": "string",
                    "year": 0,
                    "time_between": {
                        "begin": "string",
                        "end": "string"
                    },
                    "date_between": {
                        "begin": "string",
                        "end": "string"
                    },
                    "day_between": {
                        "begin": 0,
                        "end": 0
                    },
                    "month_between": {
                        "begin": 0,
                        "end": 0
                    },
                    "week_of_year": 0,
                    "week_between_of_year": {
                        "begin": 0,
                        "end": 0
                    },
                    "week_odd_of_year": true,
                    "week_even_of_year": true,
                    "month": 0,
                    "day_of_week": 0,
                    "day_of_month": 0,
                    "repeat": {
                        "ty": "string",
                        "val": 0
                    },
                    "invert": true
                },
                "astro_condition": {
                    "at_sunrise": true,
                    "after_sunrise": true,
                    "before_sunrise": true,
                    "sunrise_in_minutes": {
                        "ty": "string",
                        "val": 0
                    },
                    "at_sunset": true,
                    "after_sunset": true,
                    "before_sunset": true,
                    "daytime": true,
                    "nighttime": true,
                    "sunset_in_minutes": {
                        "ty": "string",
                        "val": 0
                    },
                    "invert": true
                },
                "mode_condition": {
                    "mode_id": "string",
                    "mode_change": true,
                    "invert": true
                },
                "device_condition": {
                    "sid": "string",
                    "id": "string",
                    "val": "string",
                    "min_val": "string",
                    "max_val": "string",
                    "ty": "string",
                    "prot": "string",
                    "invert": true,
                    "delay_time": 0
                },
                "weather_condition": {
                    "weather_type": "string",
                    "temperature": {
                        "ty": "string",
                        "val": -40,
                        "min_val": 0,
                        "max_val": 0
                    },
                    "humidity": "string",
                    "wind_speed": {
                        "ty": "string",
                        "val": 0,
                        "min_val": 0,
                        "max_val": 0
                    },
                    "relative_humidity": {
                        "ty": "string",
                        "val": 0,
                        "min_val": 0,
                        "max_val": 0
                    },
                    "weather": {
                        "ty": "string"
                    },
                    "invert": true
                },
                "automation_condition": {
                    "enable": "string",
                    "disable": "string",
                    "manual_start": true,
                    "invert": true
                },
                "system_condition": {
                    "gateway_online": true,
                    "gateway_offline": true,
                    "any_device_online": true,
                    "any_device_offline": true,
                    "device_online": "string",
                    "device_offline": "string",
                    "any_home_member_disable": true,
                    "any_home_member_enable": true,
                    "home_member_disable": "string",
                    "home_member_enable": "string"
                }
            }
        ],
        "and_conditions": [
            {
                "time_condition": {
                    "time": "string",
                    "date": "string",
                    "year": 0,
                    "time_between": {
                        "begin": "string",
                        "end": "string"
                    },
                    "date_between": {
                        "begin": "string",
                        "end": "string"
                    },
                    "day_between": {
                        "begin": 0,
                        "end": 0
                    },
                    "month_between": {
                        "begin": 0,
                        "end": 0
                    },
                    "week_of_year": 0,
                    "week_between_of_year": {
                        "begin": 0,
                        "end": 0
                    },
                    "week_odd_of_year": true,
                    "week_even_of_year": true,
                    "month": 0,
                    "day_of_week": 0,
                    "day_of_month": 0,
                    "repeat": {
                        "ty": "string",
                        "val": 0
                    },
                    "invert": true
                },
                "astro_condition": {
                    "at_sunrise": true,
                    "after_sunrise": true,
                    "before_sunrise": true,
                    "sunrise_in_minutes": {
                        "ty": "string",
                        "val": 0
                    },
                    "at_sunset": true,
                    "after_sunset": true,
                    "before_sunset": true,
                    "daytime": true,
                    "nighttime": true,
                    "sunset_in_minutes": {
                        "ty": "string",
                        "val": 0
                    },
                    "invert": true
                },
                "mode_condition": {
                    "mode_id": "string",
                    "mode_change": true,
                    "invert": true
                },
                "device_condition": {
                    "sid": "string",
                    "id": "string",
                    "val": "string",
                    "min_val": "string",
                    "max_val": "string",
                    "ty": "string",
                    "prot": "string",
                    "invert": true,
                    "delay_time": 0
                },
                "weather_condition": {
                    "weather_type": "string",
                    "temperature": {
                        "ty": "string",
                        "val": -40,
                        "min_val": 0,
                        "max_val": 0
                    },
                    "humidity": "string",
                    "wind_speed": {
                        "ty": "string",
                        "val": 0,
                        "min_val": 0,
                        "max_val": 0
                    },
                    "relative_humidity": {
                        "ty": "string",
                        "val": 0,
                        "min_val": 0,
                        "max_val": 0
                    },
                    "weather": {
                        "ty": "string"
                    },
                    "invert": true
                },
                "automation_condition": {
                    "enable": "string",
                    "disable": "string",
                    "manual_start": true,
                    "invert": true
                },
                "system_condition": {
                    "gateway_online": true,
                    "gateway_offline": true,
                    "any_device_online": true,
                    "any_device_offline": true,
                    "device_online": "string",
                    "device_offline": "string",
                    "any_home_member_disable": true,
                    "any_home_member_enable": true,
                    "home_member_disable": "string",
                    "home_member_enable": "string"
                },
                "group_condition": [
                    {
                        "time_condition": {
                            "time": "string",
                            "date": "string",
                            "year": 0,
                            "time_between": {
                                "begin": "string",
                                "end": "string"
                            },
                            "date_between": {
                                "begin": "string",
                                "end": "string"
                            },
                            "day_between": {
                                "begin": 0,
                                "end": 0
                            },
                            "month_between": {
                                "begin": 0,
                                "end": 0
                            },
                            "week_of_year": 0,
                            "week_between_of_year": {
                                "begin": 0,
                                "end": 0
                            },
                            "week_odd_of_year": true,
                            "week_even_of_year": true,
                            "month": 0,
                            "day_of_week": 0,
                            "day_of_month": 0,
                            "repeat": {
                                "ty": "string",
                                "val": 0
                            },
                            "invert": true
                        },
                        "astro_condition": {
                            "at_sunrise": true,
                            "after_sunrise": true,
                            "before_sunrise": true,
                            "sunrise_in_minutes": {
                                "ty": "string",
                                "val": 0
                            },
                            "at_sunset": true,
                            "after_sunset": true,
                            "before_sunset": true,
                            "daytime": true,
                            "nighttime": true,
                            "sunset_in_minutes": {
                                "ty": "string",
                                "val": 0
                            },
                            "invert": true
                        },
                        "mode_condition": {
                            "mode_id": "string",
                            "mode_change": true,
                            "invert": true
                        },
                        "device_condition": {
                            "sid": "string",
                            "id": "string",
                            "val": "string",
                            "min_val": "string",
                            "max_val": "string",
                            "ty": "string",
                            "prot": "string",
                            "invert": true,
                            "delay_time": 0
                        },
                        "weather_condition": {
                            "weather_type": "string",
                            "temperature": {
                                "ty": "string",
                                "val": -40,
                                "min_val": 0,
                                "max_val": 0
                            },
                            "humidity": "string",
                            "wind_speed": {
                                "ty": "string",
                                "val": 0,
                                "min_val": 0,
                                "max_val": 0
                            },
                            "relative_humidity": {
                                "ty": "string",
                                "val": 0,
                                "min_val": 0,
                                "max_val": 0
                            },
                            "weather": {
                                "ty": "string"
                            },
                            "invert": true
                        },
                        "automation_condition": {
                            "enable": "string",
                            "disable": "string",
                            "manual_start": true,
                            "invert": true
                        },
                        "system_condition": {
                            "gateway_online": true,
                            "gateway_offline": true,
                            "any_device_online": true,
                            "any_device_offline": true,
                            "device_online": "string",
                            "device_offline": "string",
                            "any_home_member_disable": true,
                            "any_home_member_enable": true,
                            "home_member_disable": "string",
                            "home_member_enable": "string"
                        }
                    }
                ]
            }
        ]
    },
    "actions": {
        "actions_true": [
            {
                "mode_id": "string",
                "automation_id": "string",
                "groups_id": "string",
                "mesh_addr": 0,
                "sid": "string",
                "id": "string",
                "val": "string",
                "prot": "string",
                "categ": "string",
                "device_action": {
                    "groups_id": "string",
                    "mesh_addr": 0,
                    "sid": "string",
                    "id": "string",
                    "val": "string",
                    "prot": "string",
                    "categ": "string",
                    "model": "string",
                    "over_time": 0,
                    "delay_time": 0,
                    "custom_content": "string"
                },
                "mode_action": {
                    "mode_id": "string",
                    "delay_time": 0
                },
                "automation_action": {
                    "automation_id": "string",
                    "home_id": "string",
                    "disable": [
                        "string"
                    ],
                    "enable": [
                        "string"
                    ],
                    "delay_time": 0
                },
                "custom_msg_action": {
                    "title": "string",
                    "content": "string",
                    "home_id": "string",
                    "user_ids": [
                        "string"
                    ],
                    "type": 0,
                    "delay_time": "string"
                },
                "system_action": {
                    "home_id": "string",
                    "home_member_disable": [
                        "string"
                    ],
                    "home_member_enable": [
                        "string"
                    ],
                    "delay_time": 0
                }
            }
        ],
        "actions_false": [
            {
                "mode_id": "string",
                "automation_id": "string",
                "groups_id": "string",
                "mesh_addr": 0,
                "sid": "string",
                "id": "string",
                "val": "string",
                "prot": "string",
                "categ": "string",
                "device_action": {
                    "groups_id": "string",
                    "mesh_addr": 0,
                    "sid": "string",
                    "id": "string",
                    "val": "string",
                    "prot": "string",
                    "categ": "string",
                    "model": "string",
                    "over_time": 0,
                    "delay_time": 0,
                    "custom_content": "string"
                },
                "mode_action": {
                    "mode_id": "string",
                    "delay_time": 0
                },
                "automation_action": {
                    "automation_id": "string",
                    "home_id": "string",
                    "disable": [
                        "string"
                    ],
                    "enable": [
                        "string"
                    ],
                    "delay_time": 0
                },
                "custom_msg_action": {
                    "title": "string",
                    "content": "string",
                    "home_id": "string",
                    "user_ids": [
                        "string"
                    ],
                    "type": 0,
                    "delay_time": "string"
                },
                "system_action": {
                    "home_id": "string",
                    "home_member_disable": [
                        "string"
                    ],
                    "home_member_enable": [
                        "string"
                    ],
                    "delay_time": 0
                }
            }
        ]
    },
    "folder_id": "string"
}

返回响应

🟢200成功
application/json
Bodyapplication/json

示例
{
    "code": 0,
    "msg": "string",
    "data": {
        "automation_id": "string"
    }
}
修改于 2026-08-31 07:56:21
上一页
查询执行日志列表
下一页
修改自动化
Built with