Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to Extension library 1.16.0 #79

Merged
merged 4 commits into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Ewon Flexy Cumulocity Connector Changelog

## Version 1.4.4
### Features
- Update extension library to version 1.16.0
### Bug Fixes
- Handles changes in timezone UTC offset

## Version 1.4.3
### Features
- Added support for Cumulocity inventory updates
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,11 @@ of the Ewon is necessary to apply this setting.*

![Data Source Flow Chart](images/DataSource.png)

#### Record Data in UTC
It is recommended to record data in UTC time zone to avoid issues with daylight saving time changes.
This can be configured in the Ewon Flexy under System > Main > General > Date and Time. Enabling the
"Record data in UTC" option will ensure historical data is recorded relative to UTC.

#### Tag Eligibility

Each tag that should be sent to Cumulocity must have historical logging enabled. Please
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<!-- PROJECT NAME -->
<name>Ewon Flexy Cumulocity Connector</name>
<!-- PROJECT VERSION -->
<version>1.4.2</version>
<version>1.4.4</version>
<!-- PROJECT GROUP ID (PARENT PACKAGE) -->
<groupId>com.hms_networks.americas.sc</groupId>
<!-- PROJECT ARTIFACT ID (ROOT PACKAGE NAME) -->
Expand Down Expand Up @@ -523,7 +523,7 @@
<dependency>
<groupId>com.hms_networks.americas.sc</groupId>
<artifactId>extensions</artifactId>
<version>1.15.9</version>
<version>1.16.0</version>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import com.hms_networks.americas.sc.extensions.system.threading.SCCountdownLatch;
import com.hms_networks.americas.sc.extensions.system.time.SCTimeUnit;
import com.hms_networks.americas.sc.extensions.system.time.SCTimeUtils;
import com.hms_networks.americas.sc.extensions.system.time.TimeZoneManager;
import com.hms_networks.sc.cumulocity.api.CConnectorApiCertificateMgr;
import com.hms_networks.sc.cumulocity.api.CConnectorMqttMgr;
import com.hms_networks.sc.cumulocity.api.CConnectorProvisionMqttMgr;
Expand Down Expand Up @@ -678,6 +679,14 @@ public static void main(String[] args) {
// Service the watchdog
RuntimeControl.refreshWatchdog();

try {
TimeZoneManager.checkUpdateTimeZone();
} catch (Exception e) {
Logger.LOG_SERIOUS(
"An error occurred while attempting to check and update the local timezone offset.");
Logger.LOG_EXCEPTION(e);
}

runMainLoop();
try {
Thread.sleep(MAIN_LOOP_CYCLE_TIME_MILLIS);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ public static void processDataPointsAndSend(
// Get data point information
String value = datapoint.getValueString();
String unit = datapoint.getTagUnit();
String time = SCTimeUtils.getIso8601FormattedTimestampForDataPoint(datapoint);
String time = datapoint.getIso8601Timestamp();

// Build payload string contents
String payloadString;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/hms_networks/sc/cumulocity/package.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<BODY>
Main package for Ewon Flexy Cumulocity Connector.

@version 1.4.3
@version 1.4.4
@author HMS Networks, MU Americas Solution Center
</BODY>
</HTML>
2 changes: 1 addition & 1 deletion starting-files/jvmrun
Original file line number Diff line number Diff line change
@@ -1 +1 @@
-heapsize 25M -classpath /usr/flexy-cumulocity-connector-1.4.3-full.jar -emain com.hms_networks.sc.cumulocity.CConnectorMain
-heapsize 25M -classpath /usr/flexy-cumulocity-connector-1.4.4-full.jar -emain com.hms_networks.sc.cumulocity.CConnectorMain
Loading