Hi Guys,
I am a newbie to Openems, and I want to implement a simple edge device using c language on an embedded device,
I will be interfacing a meter. I have browsed the documentation checking for the
API’s needed for the edge device to send its channels’ data to the backend, but the documentation of the “API Backend” have only guided me to the source code, but it was not very clear for me for the data format and the interface.
My question is can you point me to the documentation for the edge-backend interface and data format ?
Best Regards,
Amr Elsayed.
Hi Amr,
this is not a very typical use case at the moment, so there is no real documentation for that case available yet. Just to be clear: you want to connect your ‘simple edge C application’ with an OpenEMS Backend, i.e. replacing an OpenEMS Edge?
This is what happens, when OpenEMS Edge connects to OpenEMS Backend:
-
Open a Websocket connection, providing an API key in the HTTP headers
openems/BackendApiImpl.java at develop · OpenEMS/openems · GitHub
-
Optionally: send an EdgeConfig JSON. This helps the Backend and UI to understand the configuration of the connected EdgeDevice.
openems/OnOpen.java at develop · OpenEMS/openems · GitHub
-
Frequently send your data as a JSON-RPC TimestampedDataNotification
:
openems/TimestampedDataNotification.java at 7fa18b744ceaaf8a4450e72414e047ea4a764046 · OpenEMS/openems · GitHub
openems/SendChannelValuesWorker.java at develop · OpenEMS/openems · GitHub
Regards,
Stefan
Hi Stefan,
Thank you for your kind support and valuable information.
I was discussing with the team and We will continue on the project. I will use the source code as a guide and I hope we would have this part documented one day. When I have it working I would love to help on that for sure.
Best Regards,
Amr Elsayed.
Hi Amr,
Thanks for the update. Is that development published as open source? I would be pleased to have a look and support you if required. Didn’t do any coding in C for a couple of years, though.
http://www.the-diy-life.co/ sounds interesting! Wishing you all the best!
Regards,
Stefan
Hi Stefan,
Thank you for your kind interest to always support the opensource community. unfortunately this project is a service for a client. However we are very keen to support the openEMS project and the opensource community. may be we figure out another way.
Best Regards,
Amr Elsayed.
Ok, understood. As you are offering services around OpenEMS, you are very much invited to post your offer in the OpenEMS marketplace:
https://openems.io/marketplace/
Regards,
Stefan