Giter VIP home page Giter VIP logo

flexy-cumulocity-connector's People

Contributors

alexjhawk avatar dependabot[bot] avatar heli-hms avatar it-hms avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

flexy-cumulocity-connector's Issues

[BUG] Debug logging causes performance degradation with large payloads

Do I have the latest version of the Ewon firmware?

  • Yes

Do I have the latest version of the application?

  • Yes

Do I have a custom or modified version of the application?

  • Yes

Ewon Firmware Version

14.8s0

Application Version

1.4.1

Network Connection Type

Ethernet

Current Behavior

Changing the LogLevel to 6 causes the body of payloads sent to be output to the Ewon's realtime logs. This has performance implications where a large amount of data is contained in the payload. This is especially notable when that condition persists for consecutive data polls and the realtime logging becomes overwhelmed.

Expected Behavior

It is expected that debug output does not have a drastic impact on the connector performance under reasonable or normal operating circumstances.

Steps to Reproduce

  1. Launch and run the connector using log level 6
  2. Process a large amount of data through the historical data queue to a payload or payloads
  3. Connector logs the request/response body, causing performance implications

Additional Information

First Observed by Customer
Confirmed by @alexjhawk
Reported by @alexjhawk

Code of Conduct

  • I agree to abide by the Code of Conduct.

Add Tag name conventions to documentation

Tag values can be assigned to child devices, fragments and measurement series by using the corresponding tag name conventions. they should be described in our documentation.

Certificate & private Instance

Hello,

I have trouble connecting the Agent to Cumulocity. I'm working with an private Instance of Cumulocity and therefore I think I might have a problem with the certificate. Is this assumption correct? Can I specify an crt that is on the Ewon Flexy?

Best Regards

[OTHER] Extra \" characters in connectorName, connectorVersion and connectorDownloadUrl

Do I have a custom or modified version of the application?

  • Yes

Ewon Firmware Version

14.8s0

Application Version

1.4.1

Description

Hi,

this is not a real issue. However, I am just wondering, if there is a special reason, why some extra " character are added to the connectorName, connectorVersion and connectorDownloadUrl in the following code snippet?

/** Sends basic information about the connector and hardware to Cumulocity. */
public void sendInformationToCumulocity() {
// Get connector information for adding software/agent information
String connectorName =
""" + CConnectorMqttMgr.class.getPackage().getImplementationTitle() + """;
String connectorVersion =
""" + CConnectorMqttMgr.class.getPackage().getImplementationVersion() + """;
String connectorDownloadUrl = """ + CONNECTOR_DOWNLOAD_URL + """;

As a result, the c8y_Agent fragment of the device`s managed object will contain these extra " characters.

Thank you!
Best regards,
Attila

Additional Information

No response

Code of Conduct

  • I agree to abide by the Code of Conduct.

Payload size must be limited on slow connections due to Cumulocity server disconnects.

Over "slow" connections e.g., cellular, Cumulocity sever will consistently drop connections when a payload is over a certain size. Through testing we find this size limit to be roughly 2kB. However, this is an observation of a single device, and we have not quantified what exactly constitutes a "slow connection".

Furthermore, the server stops responding, but keeps the TCP keep alive. So the client depends on the MQTT keep alive to know if the connection is disconnected.

image

Aggregated Measurement Data Configurable Type Value

With the change to aggregated measurement data, the type value changed to "None". This remains as "ewon" when sending non-aggregated data in 1.4.0. Please allow for a user entered type value so we may maintain our datatype as "ewon" when sending aggregated measurement data.

"self": "https://tenanturl/measurement/measurements/2958095",
"id": "2958095",
"type": "ewon", <-- CHANGED TO "None" in Aggregated Measurement Data
"source": {
"self": "https://tenanturl/inventory/managedObjects/44758",
"id": "44758"
},
"time": "2023-12-07T15:27:41.000Z",
"ewon": {
"Density_Reference": {
"unit": null,
"value": 1.0
}
}
},

Add support for "Transient" messages

Please add the ability to toggle measurement data transmitted to Cumulocity as "Transient" though the addition of a header text in each message: X-Cumulocity-Processing-Mode: TRANSIENT
This will allow for processing of data as it enters Cumulocity but prevent automatic storage of the measurement data

Reduce excessive logging during known queue polling disable conditions

Reduce excessive logging during known queue polling disable conditions. This can be achieved partly by the migration to the abstract connector framework, as well as evaluating the implementation of a manual reset by key option for the library log once functionality. (To allow the log to appear again once without reimplementing a log once mechanism at the connector level as well)

Originally posted by @it-hms in #59 (comment)

Cumulocity device keeps waiting for connection and errors in Flexy realtime logs

Dear,

I followed the QUICK-START.md and everything went smooth but the registered device in Cumulocity keeps saying "Waiting for connection".

In the HMS Ewon Flexy the Java program started correctly but shows some error logs in the Realtime logs.
First there was: "JVM - An error occurred while reading data from the historical log."
After that: "MQTT - Disconnected (unexpected)"
And then: "The MQTT manager is not available to send historical data. Skipping data poll!"

I don't know why the MQTT manager is unavailable or why there is none.
In the Java program source code I found that this message get's logged when mqttMgr == null.

However, there are constantly MQTT CONNECT and MQTT CONNACK messages transfered so there must be some sort of connection.

Anybody knows what the problem is or could be?

Thanks in advance.

Best regards,
Dries

Cumulocity device waiting for connection blurred

Realtime logs blurred

Realtime logs 2 blurred

Changes to the Releases "Assets" Section

Change the Assets section to contain only the following files:

  1. Flexy-cumulocity-connector-X.Y.Z.zip
  • Flexy-cumulocity-connector-X.Y.Z-full.jar
  • jvmrun
  • CumulocityConnectorConfig.json
  • QUICK-START.md
  • README.md
  1. Source Code (.zip)
  2. Source Code (tar.gz)

push bootstrap config down to Connector

Potential idea for remote push of bootstrap config
Cumulocity .jar will need to create three string tags and one Boolean:
• pass
• url
• uname
• setComplete

The idea is that the connector can be deployed and it should monitor tags for changes. Upon change, an update action should occur. This action needs to be specified.

The alternate path would be to have the .jar support web requests. The entire config could be posted in body, or passed via query params. This is a cleaner option

Cyclic reboots as long as no device credentials are available

During tests on customer site, the assignment of device credentials failed due to issues with connecting to the on-premise Cumulocity.

Before the device credentials were assigned to the device, the Flexy rebooted every 5 to 8 minutes.
Event log shows "Java Critical Error: 15" followed by "Systemstart, FWR: 14.5s1" and "Grund für Neustart: Skriptanforderung" (=Reason for restart: requested by script):
grafik
The FTP connection was not needed to trigger the error.

System is using German language

RT-Log:
grafik

Internet connection is established using mobile data connection.

JSON via MQTT

Situation: Each Tag is sent via Smart Rest template 200 leading to higher Device Class and costs for Cumulocity Customers.

Solution: Implement JSON via MQTT feature.

Technical Question: Which property can be used to aggregate a number of measurements to be sent via one JSON via MQTT publish command?

Idea: Groups A, B, C, D could be used to send measurements as separate JSON via MQTT commands. Or Group A will always send measurements via template 200 while groups B, C, D will be sent via separate JSON via MQTT commands.

Connector does not send its full inventory info until a reboot.

After initial installation and before a reboot:

  • c8y_Harware and c8y_SupportedOperations are missing in the inventory managed object.
  • The logs indicate that it initially subscribed correctly to the operations topics s/ds

After initial installation and after a reboot:

  • The inventory info is there and the device also successfully performs the operations.

Connector Version: 1.4.1
Firmware Version 14.8s0 (English)

jvmrun does not point to correct .jar file of the release

jvmrun in the release 1.0.3 points to the 1.0.0 jar file hence is not started by the ewon

jvmrun from release 1.0.3 zipfile:

-heapsize 25M -classpath /usr/flexy-cumulocity-connector-1.0.0-full.jar -emain com.hms_networks.sc.cumulocity.CConnectorMain # # #

Removing the c8y_Software Operation ID

The legacy c8y_Software Operation is still listed in the supported operation by the connector, and the Software Management features however are not inplemented but it is still shown in the Cumulocity UI. Removing it from the SupportedOperations could avoid future confusion, since many users are asking about where and what this feature is.

image

image

[BUG] <onShutdown> does not shutdown connector

Do I have the latest version of the Ewon firmware?

  • Yes

Do I have the latest version of the application?

  • Yes

Do I have a custom or modified version of the application?

  • Yes

Ewon Firmware Version

14.8

Application Version

1.4.1

Network Connection Type

Ethernet

Current Behavior

accessing jvmForm?formName=controlApi&shutdown=true does not shutdown the connector

Expected Behavior

The connector would stop

Steps to Reproduce

  1. run the connector
  2. send jvmForm?formName=controlApi&shutdown=true
  3. get success response
  4. check version /jvmForm?formName=statusApi&getVersion=true ( is still running)

Additional Information

I do not have the latest ewon firmware, but was required to check the box to report an issue. I have not modified the application.

Code of Conduct

  • I agree to abide by the Code of Conduct.

Measurement aggregation feature

Feature would change payload format to have multiple measurements aggregated in a single payload. This could be far more efficient use of bandwidth for some applications. This feature would also require a configurable aggregation period. This should be a period of time where measurements in that period would be aggregated and have the same timestamp and grouped in the same payload. The would make the timestamp less accurate, but this accuracy might not be necessary.
Requested_Ewon_Flexy_Format.txt

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.