1

I am learning about ACME oneM2M framework, am a new to it. I am trying to create a web dashboard, through which I would be able to control LED light. This web dashboard can have buttons ON and OFF, trying to create this through ACME. Please help me how can I do it, how can I send request to create resource in ACME REST UI?

Andreas Kraft
  • 3,754
  • 1
  • 30
  • 39
shubham
  • 83
  • 1
  • 9

1 Answers1

1

Author of ACME CSE here.

The ACME CSE is an implementation of a oneM2M CSE (Common Services Entity). It supports the http and MQTT bindings for creating, retrieving, updating, and deleting of resources in a oneM2M resource tree. This means you may send requests like the following one to the CSE (using curl):

curl -X GET -H 'X-M2M-Origin:CAdmin' -H 'X-M2M-RI:123' -H 'X-M2M-RVI:3' -H 'Content-Type:application/json' -H 'Accept:application/json' http://localhost:8080/cse-in

That request would retrieve the <CSEBase> resource from a CSE running locally at port 8080. Every request needs a couple of mandatory headers and (for CREATE and UPDATE) a body with a resource definition.

If you have no experience with oneM2M then you should have a look at the specifications TS-0001 (Architecture), TS-0004 (Protocol) and TS-0009 (http binding) first (see oneM2M specifications). The "Develop with oneM2M" section on that website provides a good starting point to get a technical overview.

A hands-on tutorial that introduces you to a couple of basic oneM2M concepts is available in the form of Jupiter Notebooks at oneM2M's GitHub repository (disclaimer: I am the author of these tutorial as well). You can download the tutorial, or run the notebooks directly on mybinder.org without any installation efforts.
The tutorial comes with its own installation of the ACME CSE running in a separate notebook online. There are notebooks that will show you how to register your application, and how to work with data containers. For each request the corresponding curl request is shown as well, which then might be good starting point for your own oneM2M application.

Andreas Kraft
  • 3,754
  • 1
  • 30
  • 39
  • Thank you very much for shairing, I downlaoded the notebooks from github that you shared, while running notebook on anaconda environment, the file start-cse.ipynb. It was giving Syslog error but as you already fixed the error, i updated in the notebook as well. But afer that I am getting new error that says "module 'acme.services.CSE' has no attribute 'event". If possible can you please help me with this? – shubham Aug 11 '22 at 03:02
  • This is strange. We should move the discussions to the ACME CSE issue tracker. Could you please open an issue here: https://github.com/ankraft/ACME-oneM2M-CSE/issues . Please include some more information, like python version used, and a stack trace of the error. – Andreas Kraft Aug 11 '22 at 08:12