This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

LM and Cumulocity IOT integration
#1
Hello!

Does anyone have integrated LM with Cumulocity IoT?
I need to send some parameters once in hour from LM to Cumulocity.

Things what I need to send:
  • 1h solar production
  • 1h solar production in eur
  • 1h solar usage
  • 1h solar usage in eur
  • 1h solar sell to grid
  • 1h solar sell to grid in eur

All of these are already prepared/calculated in LM side (hourly electrical price and calculations).

Also some alarms in case if there is connection error with solar inverter.

Can anyone help with authorization and example about sending some measurement data?
Cumulocity IoT - OpenAPI Specification

I think measurements are right way to go...

Cumulocity IoT's domain model - Cumulocity IoT documentation
Cumulocity IoT - OpenAPI Specification


Any help is appreciated!
Thanks!
Reply
#2
Auth header can be added like this:
Code:
require('encdec')
auth = 't0071234/testuser:secret123'

headers = {
  Authorization = 'Basic ' .. encdec.base64enc(auth),
}

Sending measurements is done by POST'ing JSON via HTTPS. There are many similar examples in the forum.
https://cumulocity.com/docs/concepts/dom...asurements
https://cumulocity.com/api/core/#tag/Measurements
Reply


Forum Jump: