在电动汽车 (EV) 世界中,电动汽车驾驶员最神奇的体验之一就是在移动应用程序上点击“开始”并看到充电器开始工作。
但是这个魔法是如何发生的呢?
让我们深入了解电动汽车充电器和移动应用程序如何通信的幕后旅程。
游戏中的玩家
- 移动应用程序:这是用户发起操作的地方,例如开始或停止充电会话。
- 后端服务器:操作背后的大脑,协调应用程序和充电器之间的通信。
- 电动汽车充电器:为您的电动汽车提供电力的硬件。
这些玩家之间的通信遵循名为OCPP(开放充电点协议)的标准化协议。具体来说,大多数系统都使用 基于 WebSocket 的 OCPP,这可确保实时、可靠的通信。
开始充电过程
第 1 步:用户在应用程序中点击“开始”
当用户点击“开始”按钮时,该过程开始。后端服务器准备一个 RemoteStartTransaction 命令,其中包含以下详细信息:
{ "connectorId": 1, "idTag": "remote-11902", "chargingProfile": { "transactionId": 11902, "chargingProfileId": 1, "stackLevel": 1, "chargingProfilePurpose": "TxProfile", "chargingProfileKind": "Relative", "chargingSchedule": { "chargingRateUnit": "A", "chargingSchedulePeriod": [ ... ] } } }
此命令通过后端使用 RPC 调用发送到充电器:
await client.call( 'RemoteStartTransaction', remoteStartTransactionBody );
第 2 步:充电器响应
充电器通过响应确认命令:
{"status": "Accepted"}
这表明充电器已准备好开始交易。
第三步:充电器发送StartTransaction
当充电器完全准备好后,它会向后端发送StartTransaction消息:
{ "connectorId": 1, "idTag": "remote-11902", "meterStart": 0, "timestamp": "2025-01-15T02:09:54.000Z" }
监控充电会话
在整个充电过程中,充电器会定期发送MeterValues更新,其中包括电压、电流和传递的能量等指标。这些更新可以配置为每 30 秒或以不同的时间间隔进行:
{ "connectorId": 1, "transactionId": 11902, "meterValue": [ { "timestamp": "2025-01-15T02:09:54.000Z", "sampledValue": [ { "value": "241.10", "measurand": "Voltage", "unit": "V" }, { "value": "0.00", "measurand": "Current.Import", "unit": "A" }, { "value": "0", "measurand": "Power.Active.Import", "unit": "W" }, { "value": "32", "measurand": "Current.Offered", "unit": "A" } ] } ] }
停止充电过程
第 1 步:用户在应用程序中点击“停止”
当用户点击“停止”时,后端会向充电器发送RemoteStopTransaction命令:
await client.call( 'RemoteStopTransaction', { transactionId: 11902 } );
第 2 步:充电器响应
充电器确认:
{"status": "Accepted"}
步骤3:充电器发送StopTransaction
完成关闭后,充电器会发送一条StopTransaction消息,其中包含传输的总能量等详细信息:
{ "connectorId": 1, "idTag": "remote-11902", "chargingProfile": { "transactionId": 11902, "chargingProfileId": 1, "stackLevel": 1, "chargingProfilePurpose": "TxProfile", "chargingProfileKind": "Relative", "chargingSchedule": { "chargingRateUnit": "A", "chargingSchedulePeriod": [ ... ] } } }
什么是连接器?
就像汽油泵可能有不同的柴油或汽油喷嘴一样,电动汽车充电器可以有多个连接器。常见类型包括:
- CCS2:风靡欧洲和北美。
- CHAdeMO:常见于日本。
- Mennekes(2 型):在欧洲广泛使用。
每个连接器独立运行,允许一个充电器为多辆车提供服务。
OCPP
OCPP(开放充电点协议)是一种开放式通信标准,专为电动汽车(EV)充电站(充电点)和中央管理系统(通常称为后端系统或充电点管理系统)之间的交互而设计。
它实现了不同制造商和软件提供商的充电基础设施之间的互操作性。
OCPP 版本:
- OCPP 1.5:早期版本,仍在一些旧系统中使用。
- OCPP 1.6:广泛采用,支持 SOAP 和 WebSocket 通信。
- OCPP 2.0 和 2.0.1:增强版本,具有更多功能,如改进的安全性 (TLS)、支持智能充电、更好的诊断和固件管理。
关键用例:
- 充电站管理:充电站的远程监控、故障排除和固件更新。
- 智能充电:实现负载平衡、调度/预订以及与电网集成。
- 支付集成:允许充电站与支付网关交互并管理用户帐户。
- 分析和报告:帮助运营商分析使用模式并优化运营。
OCPP 的工作原理:
OCPP 定义了充电点和中央系统之间的消息结构和通信协议。例如:
- 充电点发送有关其状态、能耗或错误的消息。
- 中央系统可以发送命令来启动/停止充电、更新固件或执行诊断。
OCPP 由开放收费联盟 (OCA) 管理,该联盟持续开发和推广该协议。
包裹
- Python:mobilityhouse/ocpp
- Javascript:mikuso/ocpp-rpc
总结一下
每次您从应用程序开始或停止充电时,一系列精确的实时消息都会在您的应用程序、后端和充电器之间流动。
OCPP 协议使这一切成为可能,确保不同制造商的充电器和应用程序可以无缝协作。
所以,下次您插入电动汽车并点击“开始”时,您会更多地了解幕后的魔力!
我一直在开发一个超级方便的工具,叫做 LiveAPI。
它旨在让开发人员轻松编写 API 文档。
使用LiveAPI,您可以快速生成交互式API文档,允许用户直接从浏览器执行API。
如果您厌倦了为 API 手动创建文档,这个工具可能会让您的生活变得更轻松。


从 Lama2 到 LiveAPI:构建超级便捷的 API 文档(第二部分)
开发人员如何使电动汽车充电器能够与移动应用程序通信 的 Athreya 又名 Maneshwar ・ 2024 年 12 月 14 日
以上是开发人员如何使电动汽车充电器能够与移动应用程序通信的详细内容。更多信息请关注PHP中文网其他相关文章!

Pythonarrayssupportvariousoperations:1)Slicingextractssubsets,2)Appending/Extendingaddselements,3)Insertingplaceselementsatspecificpositions,4)Removingdeleteselements,5)Sorting/Reversingchangesorder,and6)Listcomprehensionscreatenewlistsbasedonexistin

NumPyarraysareessentialforapplicationsrequiringefficientnumericalcomputationsanddatamanipulation.Theyarecrucialindatascience,machinelearning,physics,engineering,andfinanceduetotheirabilitytohandlelarge-scaledataefficiently.Forexample,infinancialanaly

useanArray.ArarayoveralistinpythonwhendeAlingwithHomeSdata,performance-Caliticalcode,orinterFacingWithCcccode.1)同质性data:arrayssavememorywithtypedelements.2)绩效code-performance-clitionalcode-clitadialcode-critical-clitical-clitical-clitical-clitaine code:araysofferferbetterperperperformenterperformanceformanceformancefornalumericalicalialical.3)

不,notalllistoperationsareSupportedByArrays,andviceversa.1)arraysdonotsupportdynamicoperationslikeappendorinsertwithoutresizing,wheremactssperformance.2)listssdonotguaranteeconeeconeconstanttanttanttanttanttanttanttanttimecomplecomecomecomplecomecomecomecomecomecomplecomectaccesslikearrikearraysodo。

toAccesselementsInapythonlist,useIndIndexing,负索引,切片,口头化。1)indexingStartSat0.2)否定indexingAccessesessessessesfomtheend.3)slicingextractsportions.4)iterationerationUsistorationUsisturessoreTionsforloopsoreNumeratorseforeporloopsorenumerate.alwaysCheckListListListListlentePtotoVoidToavoIndexIndexIndexIndexIndexIndExerror。

Arraysinpython,尤其是Vianumpy,ArecrucialInsCientificComputingfortheireftheireffertheireffertheirefferthe.1)Heasuedfornumerericalicerationalation,dataAnalysis和Machinelearning.2)Numpy'Simpy'Simpy'simplementIncressionSressirestrionsfasteroperoperoperationspasterationspasterationspasterationspasterationspasterationsthanpythonlists.3)inthanypythonlists.3)andAreseNableAblequick

你可以通过使用pyenv、venv和Anaconda来管理不同的Python版本。1)使用pyenv管理多个Python版本:安装pyenv,设置全局和本地版本。2)使用venv创建虚拟环境以隔离项目依赖。3)使用Anaconda管理数据科学项目中的Python版本。4)保留系统Python用于系统级任务。通过这些工具和策略,你可以有效地管理不同版本的Python,确保项目顺利运行。

numpyarrayshaveseveraladagesoverandastardandpythonarrays:1)基于基于duetoc的iMplation,2)2)他们的aremoremoremorymorymoremorymoremorymoremorymoremoremory,尤其是WithlargedAtasets和3)效率化,效率化,矢量化函数函数函数函数构成和稳定性构成和稳定性的操作,制造


热AI工具

Undresser.AI Undress
人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover
用于从照片中去除衣服的在线人工智能工具。

Undress AI Tool
免费脱衣服图片

Clothoff.io
AI脱衣机

Video Face Swap
使用我们完全免费的人工智能换脸工具轻松在任何视频中换脸!

热门文章

热工具

VSCode Windows 64位 下载
微软推出的免费、功能强大的一款IDE编辑器

MinGW - 适用于 Windows 的极简 GNU
这个项目正在迁移到osdn.net/projects/mingw的过程中,你可以继续在那里关注我们。MinGW:GNU编译器集合(GCC)的本地Windows移植版本,可自由分发的导入库和用于构建本地Windows应用程序的头文件;包括对MSVC运行时的扩展,以支持C99功能。MinGW的所有软件都可以在64位Windows平台上运行。

EditPlus 中文破解版
体积小,语法高亮,不支持代码提示功能

适用于 Eclipse 的 SAP NetWeaver 服务器适配器
将Eclipse与SAP NetWeaver应用服务器集成。

Dreamweaver Mac版
视觉化网页开发工具