1

I'm trying to access an existing a sensor from the cumulocity platform to get and set measurement data. Is there any small example how to do this?

Thanks and kind regards, Andreas

Andreas
  • 21
  • 1

1 Answers1

1

There are several open source examples and also SDKs in the Cumulocity bitbucket repository

For device integration I can recommend the walkthroughs on request level how a device agent works. They exist both for HTTP and MQTT (note that MQTT in Cumulocity is mainly for writing data to the system not for retrieving it). The documentation also contains plenty of code snippets to get you started.

There is of course also the pure API reference but I would start from one of the integration guides to understand how a device "detects" its representation in Cumulocity and then adds data for it.

TyrManuZ
  • 2,039
  • 1
  • 14
  • 23
  • I am in the same boat as the OP. I just simply want to extract the latest readings from all our sensors and save the data into an SQL database. However, the API doc is very confusing. Unlike most APIs, I have to create a Docker package and then an "app"?! Any direction on how to create a simple API in ASP.net Core C# would be appreciated. – Fandango68 Oct 18 '22 at 06:03
  • 1
    If you just want to access the API you can do that from any external REST client. You don't need to to create a docker or an application inside Cumulocity IoT. – TyrManuZ Nov 08 '22 at 03:22