Skip to content

Commit 516d99b

Browse files
author
Predix Robot
committed
Release 1.1.128
1 parent f12264b commit 516d99b

File tree

8 files changed

+119
-48
lines changed

8 files changed

+119
-48
lines changed

config/com.ge.predix.workshop.nodeconfig.json

-2
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@
2929
"nodePinType":"Analog",
3030
"expression": ""
3131
},
32-
33-
3432
{
3533
"nodeName": "Button:TAE",
3634
"nodeClass": "upm_grove.GroveButton",

pom.xml

+23-33
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>com.ge.predix.solsvc</groupId>
55
<artifactId>predix-machine-template-adapter-pi</artifactId>
6-
<version>1.1.124</version>
6+
<version>1.1.128</version>
77
<packaging>bundle</packaging>
88

99
<properties>
10-
11-
<!-- Project Properties -->
10+
<com.scireum.parsii.version>2.3</com.scireum.parsii.version>
11+
<!-- Project Properties -->
1212
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1313
<maven.compiler.source>1.8</maven.compiler.source>
1414
<maven.compiler.target>1.8</maven.compiler.target>
15-
15+
1616
<!-- Maven Properties -->
1717
<clover.bundle.import />
1818
<maven-dependency-plugin.version>2.10</maven-dependency-plugin.version>
@@ -26,12 +26,10 @@
2626
<maven.plugins.maven-javadoc-plugin.version>2.10.3</maven.plugins.maven-javadoc-plugin.version>
2727
<maven.plugins.maven-release-plugin.version>2.5.3</maven.plugins.maven-release-plugin.version>
2828
<maven.plugins.maven-resources-plugin.version>3.0.1</maven.plugins.maven-resources-plugin.version>
29-
30-
<com.scireum.parsii.version>2.3</com.scireum.parsii.version>
31-
29+
3230
<!-- Logging Properties -->
3331
<org.slf4j.version>1.7.21</org.slf4j.version>
34-
32+
3533
<!-- This actually drives the BND used during compile time. The version of this plugin will map to a version of BND -->
3634
<org.apache.felix.maven-bundle-plugin.version>3.0.1</org.apache.felix.maven-bundle-plugin.version>
3735

@@ -50,9 +48,6 @@
5048
<javax.ws.rs.version>2.0.1</javax.ws.rs.version>
5149
<org.apache.commons.io.version>2.5</org.apache.commons.io.version>
5250

53-
<!-- Proximetry airsync -->
54-
<com.proximetry.agent-api.version>0.3.4</com.proximetry.agent-api.version>
55-
5651
<org.eclipse.jgit.version>4.3.1.201605051710-r</org.eclipse.jgit.version>
5752

5853
<jasypt.version>1.9.2</jasypt.version>
@@ -78,7 +73,7 @@
7873

7974
<!-- Protobuf Dependencies. These same versions should match what are in the predixmachine-parent/pom.xml and the git:proto/pom.xml -->
8075
<com.google.protobuf.version>3.0.0</com.google.protobuf.version>
81-
76+
8277
<!-- 3rd Party Testing-Dependency Bundle versions -->
8378
<maven-clover2-plugin.version>3.1.8</maven-clover2-plugin.version>
8479
<maven-surefire-plugin.version>2.5</maven-surefire-plugin.version>
@@ -91,8 +86,8 @@
9186
<skipTests>false</skipTests>
9287

9388
<!-- Predix Machine project versions -->
94-
<dspmicro.version>16.4.1</dspmicro.version>
95-
<dspmicro.parent.project.version>16.4.1</dspmicro.parent.project.version>
89+
<dspmicro.version>17.1.2</dspmicro.version>
90+
<dspmicro.parent.project.version>17.1.2</dspmicro.parent.project.version>
9691

9792
<!-- Predix Machine bundle versions -->
9893
<dspmicro.databus.project.version>${dspmicro.parent.project.version}</dspmicro.databus.project.version>
@@ -108,9 +103,8 @@
108103
<dspmicro.predixcloud-identity.project.version>${dspmicro.parent.project.version}</dspmicro.predixcloud-identity.project.version>
109104
<dspmicro.cloud-gateway.project.version>${dspmicro.parent.project.version}</dspmicro.cloud-gateway.project.version>
110105
<!-- Proto bundle -->
111-
<com.google.protobuf.version>3.0.0</com.google.protobuf.version>
112106
<predixmachine.protobuf-models.version>${dspmicro.parent.project.version}</predixmachine.protobuf-models.version>
113-
107+
114108
<!-- 3rd Party package versions -->
115109
<import.org.osgi.framework>"[1.7,2)"</import.org.osgi.framework>
116110
<import.org.osgi.service.cm>"[1.5,2)"</import.org.osgi.service.cm>
@@ -135,27 +129,27 @@
135129
<!-- httpcore is version 4.4 and httpclient is 4.5 -->
136130
<import.org.apache.http>"[4.4,4.6)"</import.org.apache.http>
137131
<import.org.apache.commons.io>"[1.5,2)"</import.org.apache.commons.io>
138-
<!-- Prosyst bundles their own version of file upload org.apache.commons-fileupload-1.2.2-prosyst1
132+
<!-- Prosyst bundles their own version of file upload org.apache.commons-fileupload-1.2.2-prosyst1
139133
(1.2.2). -->
140134
<import.org.apache.commons.fileupload>"[1.2,1.3)"</import.org.apache.commons.fileupload>
141135

142136
<import.org.codehaus.jackson>"[1.9,2)"</import.org.codehaus.jackson>
143137
<import.org.codehaus.jackson.map>"[1.9,2)"</import.org.codehaus.jackson.map>
144138
<import.org.codehaus.jackson.type>"[1.9,2)"</import.org.codehaus.jackson.type>
145139
<import.org.codehaus.jackson.map.annotate>"[1.9,2)"</import.org.codehaus.jackson.map.annotate>
146-
140+
147141
<import.com.prosyst.util.encode>"[2.1,3)"</import.com.prosyst.util.encode>
148142
<import.com.prosyst.mbs.services.useradmin>"[3.0,4)"</import.com.prosyst.mbs.services.useradmin>
149143

150144
<!-- Used for jGit -->
151145
<import.org.eclipse.jgit>"[4.0,5.0)"</import.org.eclipse.jgit>
152-
146+
153147
<!-- Used for rmq -->
154148
<import.com.rabbitmq>"[3.0,3.5)"</import.com.rabbitmq>
155-
149+
156150
<!-- Used for MQTT Client -->
157151
<import.org.eclipse.paho.client.mqttv3>"[1.0,2.0)"</import.org.eclipse.paho.client.mqttv3>
158-
152+
159153
<!-- DSP micro API package versions -->
160154
<import.com.ge.dspmicro.security.sslcontext.api>"[1.0,2.0)"</import.com.ge.dspmicro.security.sslcontext.api>
161155

@@ -166,7 +160,7 @@
166160

167161
<import.com.ge.dspmicro.machinegateway.api>"[1.4,2.0)"</import.com.ge.dspmicro.machinegateway.api>
168162

169-
<import.com.ge.dspmicro.machinegateway.types>"[1.3,2.0)"</import.com.ge.dspmicro.machinegateway.types>
163+
<import.com.ge.dspmicro.machinegateway.types>"[1.4,2.0)"</import.com.ge.dspmicro.machinegateway.types>
170164

171165
<import.com.ge.dspmicro.modelregistry.api>"[1.0,2.0)"</import.com.ge.dspmicro.modelregistry.api>
172166
<import.com.ge.dspmicro.modelregistry.api.types>"[1.0,2.0)"</import.com.ge.dspmicro.modelregistry.api.types>
@@ -183,34 +177,30 @@
183177

184178
<import.com.ge.dspmicro.machineadapter.mqtt.api>"[1.0,2.0)"</import.com.ge.dspmicro.machineadapter.mqtt.api>
185179

186-
<import.com.ge.dspmicro.device.api.commandframework>"[1.0,2.0)"</import.com.ge.dspmicro.device.api.commandframework>
180+
<import.com.ge.dspmicro.device.api.frameworkcomm>"[2.0,3.0)"</import.com.ge.dspmicro.device.api.frameworkcomm>
187181

188-
<import.com.ge.dspmicro.device.api.frameworkcomm>"[1.0,2.0)"</import.com.ge.dspmicro.device.api.frameworkcomm>
189-
190182
<import.com.ge.dspmicro.cloud.gateway.api>"[1.0,2.0)"</import.com.ge.dspmicro.cloud.gateway.api>
191183

192-
<import.com.ge.dspmicro.databus.api>"[1.1,2.0)"</import.com.ge.dspmicro.databus.api>
184+
<import.com.ge.dspmicro.databus.api>"[2.0,3.0)"</import.com.ge.dspmicro.databus.api>
193185
<!-- these must match the exports in the samples/sample-apps/pom.xml and the git:proto/pom.xml -->
194186
<import.com.ge.predixmachine.datacomm>"[1.0,2.0)"</import.com.ge.predixmachine.datacomm>
195-
196-
<!-- Proximetry airsync API - used for one demand polling -->
197-
<import.com.proximetry.osgiagent.api.version>"[0.3.4,1)"</import.com.proximetry.osgiagent.api.version>
198-
187+
199188
<!-- River Services -->
200189
<export.com.ge.dspmicro.river.api>1.0.0</export.com.ge.dspmicro.river.api>
201190
<import.com.ge.dspmicro.river.api>"[1.0,2.0)"</import.com.ge.dspmicro.river.api>
202191

203192
<export.com.ge.dspmicro.httpriver.send.api>1.1.0</export.com.ge.dspmicro.httpriver.send.api>
204193
<import.com.ge.dspmicro.httpriver.send.api>"[1.0,2.0)"</import.com.ge.dspmicro.httpriver.send.api>
205-
194+
206195
<!-- these must match the exports in the samples/sample-apps/pom.xml and the git:proto/pom.xml -->
207196
<import.com.google.protobuf>"[3.0,4.0)"</import.com.google.protobuf>
197+
<import.com.ge.predixmachine.datamodel.common>"[1.0,2.0)"</import.com.ge.predixmachine.datamodel.common>
208198
<import.com.ge.predixmachine.datamodel.commandcomm>"[1.0,2.0)"</import.com.ge.predixmachine.datamodel.commandcomm>
209199
<import.com.ge.predixmachine.datamodel.configcomm>"[1.0,2.0)"</import.com.ge.predixmachine.datamodel.configcomm>
210200
<import.com.ge.predixmachine.datamodel.datacomm>"[1.0,2.0)"</import.com.ge.predixmachine.datamodel.datacomm>
211201
<import.com.ge.predixmachine.datamodel.defaultcomm>"[1.0,2.0)"</import.com.ge.predixmachine.datamodel.defaultcomm>
212-
<import.com.ge.predixmachine.datamodel.gateway>"[1.0,2.0)"</import.com.ge.predixmachine.datamodel.gateway>
213-
<import.com.ge.predixmachine.datamodel.event>"[1.0,2.0)"</import.com.ge.predixmachine.datamodel.event>
202+
<import.com.ge.predixmachine.datamodel.gateway>"[1.1,2.0)"</import.com.ge.predixmachine.datamodel.gateway>
203+
<import.com.ge.predixmachine.datamodel.event>"[1.0,2.0)"</import.com.ge.predixmachine.datamodel.event>
214204
</properties>
215205
<dependencies>
216206

scripts/displayip.sh

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
#!/bin/bash
2+
3+
# usage:
4+
# ./lcd.sh
5+
6+
# I2C addresses
7+
backlight=0x62
8+
character=0x3e
9+
10+
# backlight registers
11+
mode1=0x00
12+
mode2=0x01
13+
pwm0=0x02
14+
pwm1=0x03
15+
pwm2=0x04
16+
ledout=0x08
17+
18+
# character registers
19+
display=0x80
20+
letters=0x40
21+
22+
red=0x00
23+
green=0x00
24+
blue=0x00
25+
26+
function hex() {
27+
printf "0x%02x\n" "'$1"
28+
}
29+
function showIP() {
30+
# backlight
31+
# set to cyan
32+
33+
red=0x00
34+
green=0xFF
35+
blue=0xFF
36+
37+
i2cset -y 1 $backlight $pwm0 $blue # blue
38+
i2cset -y 1 $backlight $pwm1 $green # green
39+
i2cset -y 1 $backlight $pwm2 $red # red
40+
sleep 1
41+
42+
IP=$(ifconfig eth0 | grep "inet addr" | awk -F" " '{print $2}'| awk -F":" '{print $2}')
43+
while [ ! $IP ]; do
44+
sleep 1
45+
IP=$(ifconfig eth0 | grep "inet addr" | awk -F" " '{print $2}'| awk -F":" '{print $2}')
46+
done
47+
for i in `echo $IP | grep -o .`;
48+
do
49+
hx=$(hex $i)
50+
i2cset -y 1 $character $letters $hx
51+
done
52+
}
53+
function cleardisplay() {
54+
red=0x00
55+
green=0x00
56+
blue=0x00
57+
58+
i2cset -y 1 $backlight $pwm0 $blue # blue
59+
i2cset -y 1 $backlight $pwm1 $green # green
60+
i2cset -y 1 $backlight $pwm2 $red # red
61+
62+
i2cset -y 1 $character $display 0x01 # clear display
63+
}
64+
65+
cleardisplay
66+
67+
if [[ "$1" == "start" ]]; then
68+
showIP
69+
fi
70+
71+
if [[ "$1" == "stop" ]]; then
72+
cleardisplay
73+
fi

src/main/java/com/ge/predix/solsvc/workshop/adapter/RaspberryPISubscriptionAdapter.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858

5959
/**
6060
*
61-
* @author Predix Machine Sample
61+
* Subscription Adatper for Rasperry Pi
6262
*/
6363
@SuppressWarnings({ "javadoc", "deprecation" })
6464
@Component(name = RaspberryPISubscriptionAdapter.SERVICE_PID, service =

src/main/java/com/ge/predix/solsvc/workshop/adapter/SampleMachineAdapterConfigImpl.java

+5
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@
1515
import aQute.bnd.annotation.metatype.Meta;
1616
import aQute.configurable.Config;
1717

18+
19+
/**
20+
* This OSGI component holds the configuration for Subscription Adapter
21+
*
22+
*/
1823
@Component(immediate=true,name=SampleMachineAdapterConfigImpl.SERVICE_PID,
1924
designateFactory=Config.class,
2025
configurationPolicy=ConfigurationPolicy.require,

src/main/java/com/ge/predix/solsvc/workshop/api/ISampleAdapterConfig.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ public interface ISampleAdapterConfig {
1313
public static final String PROPKEY_ADAPTER_NAME = "com.ge.predix.solsvc.workshop.adapter.Name";
1414
public static final String PROPKEY_ADAPTER_DESCRIPTION = "com.ge.predix.solsvc.workshop.adapter.Description";
1515

16-
int getUpdateInterval();
17-
String getNodeConfigFile();
18-
String getAdapterName();
19-
String getAdapterDescription();
20-
String[] getDataSubscriptions();
16+
public int getUpdateInterval();
17+
public String getNodeConfigFile();
18+
public String getAdapterName();
19+
public String getAdapterDescription();
20+
public String[] getDataSubscriptions();
2121
public Map<UUID, WorkshopDataNodePI> getDataNodes();
2222
}

src/main/java/com/ge/predix/solsvc/workshop/types/WorkshopDataSubscription.java

+5
Original file line numberDiff line numberDiff line change
@@ -173,4 +173,9 @@ public ISpillway getSpillway() {
173173
public void setSpillway(ISpillway spillway) {
174174
this.spillway = spillway;
175175
}
176+
177+
@Override
178+
public long getUpdateIntervalMillis() {
179+
return this.updateInterval;
180+
}
176181
}

version.json

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
{
22
"name": "Predix Machine Adapter for Raspberry Pi",
3-
"version": "1.1.124",
3+
"version": "1.1.128",
44
"private": true,
55
"dependencies": {
66
"local-setup": "https://github.com/PredixDev/local-setup#1.0.12",
7-
"Predix-HelloWorld-WebApp": "https://github.com/PredixDev/Predix-HelloWorld-WebApp#1.1.46",
8-
"predix-nodejs-starter": "https://github.com/PredixDev/predix-nodejs-starter#1.1.81",
7+
"Predix-HelloWorld-WebApp": "https://github.com/PredixDev/Predix-HelloWorld-WebApp#1.1.48",
8+
"predix-nodejs-starter": "https://github.com/PredixDev/predix-nodejs-starter#1.1.84",
99
"predix-machine-container-url": "https://raw.githubusercontent.com/PredixDev/predix-machine-templates/master/PredixMachineDebug-16.4.2.zip#",
10-
"predix-machine-template-processor": "https://github.com/PredixDev/predix-machine-template-processor#2.1.23",
11-
"predix-machine-template-adapter-pi": "https://github.com/PredixDev/predix-machine-template-adapter-pi#1.1.124",
12-
"predix-machine-templates": "https://github.com/PredixDev/predix-machine-templates#1.1.27",
13-
"predix-scripts": "https://github.com/PredixDev/predix-scripts#1.1.35",
10+
"predix-machine-template-processor": "https://github.com/PredixDev/predix-machine-template-processor#2.1.24",
11+
"predix-machine-template-adapter-pi": "https://github.com/PredixDev/predix-machine-template-adapter-pi#1.1.128",
12+
"predix-machine-templates": "https://github.com/PredixDev/predix-machine-templates#1.1.28",
13+
"predix-scripts": "https://github.com/PredixDev/predix-scripts#1.1.36",
1414
"winddata-timeseries-service": "https://github.com/PredixDev/winddata-timeseries-service#2.0.26"
1515
},
1616
"author": "rishabhtulsian,swapnavad,susheelchoudhari"

0 commit comments

Comments
 (0)