OpenEVSE / openevse_esp32_firmware

OpenEVSE V4 WiFi gateway using ESP32
177 stars 118 forks source link

Openevse OCPP End point address updating via Steve when firmware access unavailable? #884

Open retrocoder-78 opened 4 months ago

retrocoder-78 commented 4 months ago

Just looking for discussion and thoughts...

One of the major OEM evse manufactures (I know of) is working with network backend operators in this fashion, updating remotely the OCPP url via the backend which takes effect on the evse. If owners of many units per site decide to migrate backend services to a different backend operator, many units would need to be manually configured with the new OCPP url. This is potentially time consuming and by extension expensive.

Once first connection is done, firmware settings are set and a connection with Steve is established. If the WS (WSS) address ever needed to be adjusted without firmware access, it seems to me to be that,

  1. A custom build of Steve would be required. From reviewing all the OCPP documentation, I don't think a mechanisms exists to address this type of functionality. I could be wrong.

Steve does have a spot in the Charge Point Details information for the end point address. Possibly this could be used for such a functionality?

  1. The OCPP side of openevse would need to be able to handle having the websockets end point url updated via the backend after first initial connection.

Just looking for any thoughts about such a functionality or if this has been thought about in any way @matth-x .

Your time is appreciated! :smile:

jeremypoulter commented 3 months ago

@matth-x any thoughts?

retrocoder-78 commented 3 months ago

Thanks for the bump Jeremy.

Maybe to flesh this out, in the field updating a ocpp WS backend address via Steve would be a feature most (99%) hardware oems don't have. Having a bunch of large scale deployment experience, if units ever need to be 'repointed', it can be timely and expensive. So, this would be a big ticket selling feature to the openevse offering and directly feed into any spin off projects. Especially if it's attached to a backend (Steve like) offering.

If anyone needs more information, please feel free to let me know. 🙂

On Wed, 7 Aug 2024, 2:58 pm Jeremy Poulter, @.***> wrote:

@matth-x https://github.com/matth-x any thoughts?

— Reply to this email directly, view it on GitHub https://github.com/OpenEVSE/openevse_esp32_firmware/issues/884#issuecomment-2274418684, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQLQX5JF7WV6IXPEAD64EQTZQKJ7FAVCNFSM6AAAAABK3M4VQGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENZUGQYTQNRYGQ . You are receiving this because you authored the thread.Message ID: @.***>

matth-x commented 3 months ago

Hi @retrocoder-78, sorry, I must somehow missed this issue.

The current provisioning scheme is to define factory defaults and then dynamically configuring the connection details via OpenEVSE dashboard or the default OCPP server.

The factory defaults are hardcoded into the firmware here:

https://github.com/OpenEVSE/openevse_esp32_firmware/blob/fe5be4d600bb689010081315cc7244ef2cbea91f/src/app_config.cpp#L194-L196

If you set them to your server, OpenEVSE will initially connect to it. Using the ChangeConfiguration command, you can then update the following configs:

Actually the custom Configs are implemented the same way as the standardized configs in OpenEVSE, so Change-/ and GetConfiguration work for the connection details configs too.

retrocoder-78 commented 3 months ago

Thank you Matthias! This makes sense. Is it at all possible that an entry in Steve could adjust the WS (WSS) configuration in the OpenEVSE dashboard? This is what in some way other OEM's have introduced into their firmware and backend.

Steve does have a field labelled,

Endpoint Address. I believe this is the WS address entered into the OpenEVSE dashboard like you mentioned.

From how I have read the OCPP standard, and looking through Steve, the answer is it would be a custom feature on both sides.

The way I read your reply is, that currently, no. It's setup to enter into the OpenEVSE firmware, and then communicate with Steve.

Any thoughts you have would be helpful! 🙂

On Thu, Aug 8, 2024 at 11:59 AM Matthias Akstaller @.***> wrote:

Hi @retrocoder-78 https://github.com/retrocoder-78, sorry, I must somehow missed this issue.

The current provisioning scheme is to define factory defaults and then dynamically configuring the connection details via OpenEVSE dashboard or the default OCPP server.

The factory defaults are hardcoded into the firmware here:

https://github.com/OpenEVSE/openevse_esp32_firmware/blob/fe5be4d600bb689010081315cc7244ef2cbea91f/src/app_config.cpp#L194-L196

If you set them to your server, OpenEVSE will initially connect to it. Using the ChangeConfiguration command, you can then update the following configs:

  • Cst_BackendUrl: OCPP server "base URL"
  • Cst_ChargeBoxId: identifier of the charger
  • AuthorizationKey: Websocket key

Actually the custom Configs are implemented the same way as the standardized configs in OpenEVSE, so Change-/ and GetConfiguration work for the connection details configs too.

— Reply to this email directly, view it on GitHub https://github.com/OpenEVSE/openevse_esp32_firmware/issues/884#issuecomment-2276468406, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQLQX5KAXJMKSVZUB3NQ4YDZQO52JAVCNFSM6AAAAABK3M4VQGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENZWGQ3DQNBQGY . You are receiving this because you were mentioned.Message ID: @.***>

matth-x commented 3 months ago

Yes, it is possible. Sorry for the confusing explanation in my previous reply.

In SteVe, you can use the ChangeConfiguration operation to update the backend URL and chargeBoxId of the OpenEVSE. In the ChangeConfiguration view, select the key type "Custom", enter "Cst_BackendUrl" in the custom configuration key field and the server address in value. Press the perform button and then, do the same with custom configuration key "Cst_ChargeBoxId" and the new value you want to assign.

To streamline this process, you could define a factory default OCPP server URL which is hardcoded on the OpenEVSE. Then, each newly deployed OpenEVSE would first connect to the factory OCPP server where you can assign the final OCPP server address comfortably via ChangeConfiguration command.

retrocoder-78 commented 3 months ago

This is great information! Thank you for the detailed explanation. I gave this a try, changing the boxid via Steve to have a change in the OpenEVSE unit. What came back from Steve is, 'not supported'. I have that boxid setup in Steve.

Any thoughts?

Screenshot from 2024-08-19 11-05-44 Screenshot from 2024-08-19 11-04-12