# recharge **Repository Path**: withlogic/recharge ## Basic Information - **Project Name**: recharge - **Description**: 控制充电桩开关程序 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 3 - **Created**: 2020-12-11 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 充电桩设备控制程序 ### Compile ```bash $ go build ``` ### 接口 # 订阅设备消息 http://127.0.0.1:8088/device/subscribe?deviceID=866714040288325 # 取消订阅设备消息 http://127.0.0.1:8088/device/unsubscribe?deviceID=866714040288325 # 设置设备基本参数 ratedpower 额定输出功率30kw maxChargeTime 最大充电时间 120分钟 # periodTime 上报时间间隔 1 分钟 continueTime 充满电后持续时间 0分钟 # 充满后持续输出功率 10kw endTime 续充时间 0 分钟 minPower 最小起充功率 10kw http://127.0.0.1:8088/device/set?deviceID=642722&ratedpower=30&maxChargeTime=120&periodTime=1&continueTime=0&continuePower=10&endTime=0&minPower=10 # 获取设备的插座号列表 http://127.0.0.1:8088/device/get-sockets?deviceID=642722 # 打开设备电源 http://127.0.0.1:8088/device/open?deviceID=866714040288325&channelID=1&maxTime=10 # 关闭设备电源 http://127.0.0.1:8088/device/close?deviceID=866714040288325&channelID=1&maxTime=1 ### 参数说明 `deviceID` 设备号 `channelID` 设备上的线路(第几个插座) `maxTime` 多少秒后设备电源关闭