Skip to content

Commit

Permalink
Release 1.0.36
Browse files Browse the repository at this point in the history
  • Loading branch information
predix-adoption-bot committed Feb 13, 2019
1 parent 98bce45 commit 2b96148
Show file tree
Hide file tree
Showing 26 changed files with 816 additions and 43 deletions.
8 changes: 6 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,28 @@ LABEL maintainer="Predix Builder Relations"
LABEL hub="https://hub.docker.com"
LABEL org="https://hub.docker.com/u/predixadoption"
LABEL repo="predix-edge-ref-app"
LABEL version="1.0.34"
LABEL version="1.0.36"
LABEL support="https://forum.predix.io"
LABEL license="https://github.com/PredixDev/predix-docker-samples/blob/master/LICENSE.md"

RUN apk add git
RUN apk add git zip && \
rm -f /var/cache/apk/*
RUN npm config set strict-ssl false && \
npm install -g bower

WORKDIR /usr/src/edge-ref-app

#COPY config ./config
RUN mkdir -p ./data
RUN mkdir -p ./scripts

COPY data/compressor-specs.json ./data
COPY gulp_tasks ./gulp_tasks
COPY server ./server
COPY src ./src
COPY images ./images
COPY bower.json gulpfile.js package*.json polymer.json ./
COPY scripts/package-config.sh scripts

RUN node -v

Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -277,16 +277,16 @@ Now log in to the Docker Hub. Create a dockerhub account if you do not have one.
docker login -u <username> -p <password>
```

Build predix-edge-ref-app docker image using proxy. Your Docker Organization is usually your username.
Build predix-edge-ref-app docker image using proxy. Change 'predixadoption' to your Docker Organization which is usually your username.

```sh
docker build --no-cache -t <Docker Organization>/predix-edge-ref-app:latest --build-arg https_proxy --build-arg no_proxy= --build-arg http_proxy .
docker build --no-cache -t predixadoption/predix-edge-ref-app:latest --build-arg https_proxy --build-arg no_proxy= --build-arg http_proxy .
```

Build predix-edge-ref-app docker image without proxy.
Build predix-edge-ref-app docker image without proxy. Change 'predixadoption' to your Docker Organization which is usually your username.

```sh
docker build --no-cache -t <Docker Organization>/predix-edge-ref-app:latest .
docker build --no-cache -t predixadoption/predix-edge-ref-app:latest .
```

Now Push the docker image to the Docker Hub.
Expand Down
6 changes: 4 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@
"px-panel": "^1.1.1",
"iron-ajax": "^2.1.3",
"px-alert-message": "^1.3.3",
"px-kpi": "^5.0.0"
"px-kpi": "^5.0.0",
"px-modal": "^3.3.5"
},
"devDependencies": {
"web-component-tester": "Polymer/web-component-tester#^6.0.0",
"webcomponentsjs": "webcomponents/webcomponentsjs#^1.0.0"
"webcomponentsjs": "webcomponents/webcomponentsjs#^1.0.0",
"px-forms-design": "^2.1.2"
}
}
6 changes: 3 additions & 3 deletions config/app-deadband/env
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
#export MYENVVAR=VALUE

export HIGHHIGH="4"
export HIGH="3.5"
export LOW="2.5"
export LOWLOW="2"
export HIGH="3.0"
export LOW="2.0"
export LOWLOW="1.5"
2 changes: 1 addition & 1 deletion config/app-deadband/flows-app-deadband.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"id":"b2e192e7.2ec24","type":"tab","label":"M+M+Demo+Flow","disabled":false,"info":""},{"id":"9e4f5511.a28c98","type":"subflow","name":"Subflow 2","info":"","in":[],"out":[]},{"id":"1b9b7e8f.439c61","type":"subflow","name":"Subflow 3","info":"1. Opens the OPC Adapter Config file\n2. Grabs the MQTT config info\n3. Sends it to the Debug Window\n","in":[],"out":[]},{"id":"490c44b7.a0bf0c","type":"mqtt-broker","z":"","name":"","broker":"mqtt-tcp://predix-edge-broker","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"5b0e890d.8c6228","type":"file in","z":"9e4f5511.a28c98","name":"ConfigIn","filename":"/config/config-cloud-gateway.json","format":"utf8","chunk":false,"sendError":false,"x":300,"y":60,"wires":[["718ccce4.faa1e4"]]},{"id":"58c0f78e.a320b8","type":"debug","z":"9e4f5511.a28c98","name":"debug","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":690,"y":60,"wires":[]},{"id":"718ccce4.faa1e4","type":"function","z":"9e4f5511.a28c98","name":"GetMQTTSection","func":"var config = JSON.parse(msg.payload);\nmsg.payload = config.blocks.time_series_sender.config.mqtt;\nreturn msg;\n","outputs":1,"noerr":0,"x":510,"y":60,"wires":[["58c0f78e.a320b8"]]},{"id":"dc44d76f.e9ce78","type":"inject","z":"9e4f5511.a28c98","name":"TriggerFlow","topic":"","payload":"","payloadType":"date","repeat":"15","crontab":"","once":true,"onceDelay":0.1,"x":130,"y":60,"wires":[["5b0e890d.8c6228"]]},{"id":"40b61585.53378c","type":"debug","z":"1b9b7e8f.439c61","name":"debug","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":710,"y":40,"wires":[]},{"id":"f9ec0b4e.f7b878","type":"function","z":"1b9b7e8f.439c61","name":"GetMQTTSection","func":"var config = JSON.parse(msg.payload);\nmsg.payload = config.blocks.mqtt.config;\nreturn msg;\n","outputs":1,"noerr":0,"x":490,"y":40,"wires":[["40b61585.53378c"]]},{"id":"89c44c60.b489c","type":"file in","z":"1b9b7e8f.439c61","name":"ConfigIn","filename":"/config/config-opcua.json","format":"utf8","chunk":false,"sendError":false,"x":300,"y":40,"wires":[["f9ec0b4e.f7b878"]]},{"id":"3010433f.7353fc","type":"inject","z":"1b9b7e8f.439c61","name":"TriggerFlow","topic":"","payload":"","payloadType":"date","repeat":"15","crontab":"","once":true,"onceDelay":0.1,"x":130,"y":40,"wires":[["89c44c60.b489c"]]},{"id":"c29d3e42.6f54d","type":"mqtt in","z":"b2e192e7.2ec24","name":"From OPCUA Adapter","topic":"app_data","qos":"2","broker":"490c44b7.a0bf0c","x":140,"y":180,"wires":[["321280bb.a13ec"]]},{"id":"a72237c7.469d38","type":"mqtt out","z":"b2e192e7.2ec24","name":"To Cloud Gateway","topic":"timeseries_data","qos":"","retain":"","broker":"490c44b7.a0bf0c","x":650,"y":180,"wires":[]},{"id":"1a04e44.042991c","type":"subflow:9e4f5511.a28c98","z":"b2e192e7.2ec24","name":"CloudGatewayConfig","x":120,"y":100,"wires":[]},{"id":"14aca965.485a97","type":"debug","z":"b2e192e7.2ec24","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":210,"y":280,"wires":[]},{"id":"7bd7b6de.3adf38","type":"subflow:1b9b7e8f.439c61","z":"b2e192e7.2ec24","name":"OPCUAAdapterConfig","x":120,"y":60,"wires":[]},{"id":"321280bb.a13ec","type":"function","z":"b2e192e7.2ec24","name":"Deadband Filter","func":"//read the message into a json object\n var item = JSON.parse(msg.payload);\n var HIGHHIGH = context.global.process.env.HIGHHIGH;\n var HIGH = context.global.process.env.HIGH;\n var LOW = context.global.process.env.LOW;\n var LOWLOW = context.global.process.env.LOWLOW;\n //scale up the value by 1000 and put it back on the broker topic to be sent to Predix Time Series\n for ( var i=0;i<item.body.length;i++)\n {\n var tagName = item.body[i].name;\n var value = item.body[i].datapoints[0][1];\n\n var scaled_item = JSON.stringify(item);\n msg.payload = scaled_item\n\n \n if ( value < HIGHHIGH && value > LOWLOW ) {\n return msg\n }\n else {\n return null; \n }\n\n //publish the tag back to the broker on the topic the cloud-gateway\n //container is subscribing to\n\n return msg;\n }\n","outputs":1,"noerr":0,"x":400,"y":180,"wires":[["a72237c7.469d38"]]}]
[{"id":"b2e192e7.2ec24","type":"tab","label":"M+M+Demo+Flow","disabled":false,"info":""},{"id":"9e4f5511.a28c98","type":"subflow","name":"Subflow 2","info":"","in":[],"out":[]},{"id":"1b9b7e8f.439c61","type":"subflow","name":"Subflow 3","info":"1. Opens the OPC Adapter Config file\n2. Grabs the MQTT config info\n3. Sends it to the Debug Window\n","in":[],"out":[]},{"id":"490c44b7.a0bf0c","type":"mqtt-broker","z":"","name":"","broker":"mqtt-tcp://predix-edge-broker","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"5b0e890d.8c6228","type":"file in","z":"9e4f5511.a28c98","name":"ConfigIn","filename":"/config/config-cloud-gateway.json","format":"utf8","chunk":false,"sendError":false,"x":300,"y":60,"wires":[["718ccce4.faa1e4"]]},{"id":"58c0f78e.a320b8","type":"debug","z":"9e4f5511.a28c98","name":"debug","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":690,"y":60,"wires":[]},{"id":"718ccce4.faa1e4","type":"function","z":"9e4f5511.a28c98","name":"GetMQTTSection","func":"var config = JSON.parse(msg.payload);\nmsg.payload = config.blocks.time_series_sender.config.mqtt;\nreturn msg;\n","outputs":1,"noerr":0,"x":510,"y":60,"wires":[["58c0f78e.a320b8"]]},{"id":"dc44d76f.e9ce78","type":"inject","z":"9e4f5511.a28c98","name":"TriggerFlow","topic":"","payload":"","payloadType":"date","repeat":"15","crontab":"","once":true,"onceDelay":0.1,"x":130,"y":60,"wires":[["5b0e890d.8c6228"]]},{"id":"40b61585.53378c","type":"debug","z":"1b9b7e8f.439c61","name":"debug","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":710,"y":40,"wires":[]},{"id":"f9ec0b4e.f7b878","type":"function","z":"1b9b7e8f.439c61","name":"GetMQTTSection","func":"var config = JSON.parse(msg.payload);\nmsg.payload = config.blocks.mqtt.config;\nreturn msg;\n","outputs":1,"noerr":0,"x":490,"y":40,"wires":[["40b61585.53378c"]]},{"id":"89c44c60.b489c","type":"file in","z":"1b9b7e8f.439c61","name":"ConfigIn","filename":"/config/config-opcua.json","format":"utf8","chunk":false,"sendError":false,"x":300,"y":40,"wires":[["f9ec0b4e.f7b878"]]},{"id":"3010433f.7353fc","type":"inject","z":"1b9b7e8f.439c61","name":"TriggerFlow","topic":"","payload":"","payloadType":"date","repeat":"15","crontab":"","once":true,"onceDelay":0.1,"x":130,"y":40,"wires":[["89c44c60.b489c"]]},{"id":"c29d3e42.6f54d","type":"mqtt in","z":"b2e192e7.2ec24","name":"From OPCUA Adapter","topic":"app_data","qos":"2","broker":"490c44b7.a0bf0c","x":140,"y":180,"wires":[["321280bb.a13ec"]]},{"id":"a72237c7.469d38","type":"mqtt out","z":"b2e192e7.2ec24","name":"To Cloud Gateway","topic":"timeseries_data","qos":"","retain":"","broker":"490c44b7.a0bf0c","x":650,"y":180,"wires":[]},{"id":"1a04e44.042991c","type":"subflow:9e4f5511.a28c98","z":"b2e192e7.2ec24","name":"CloudGatewayConfig","x":120,"y":100,"wires":[]},{"id":"14aca965.485a97","type":"debug","z":"b2e192e7.2ec24","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":210,"y":280,"wires":[]},{"id":"7bd7b6de.3adf38","type":"subflow:1b9b7e8f.439c61","z":"b2e192e7.2ec24","name":"OPCUAAdapterConfig","x":120,"y":60,"wires":[]},{"id":"321280bb.a13ec","type":"function","z":"b2e192e7.2ec24","name":"Deadband Filter","func":"//read the message into a json object\n//we do some extra things here that more instructive than efficient\n var item = JSON.parse(msg.payload);\n var HIGHHIGH = context.global.process.env.HIGHHIGH;\n var HIGH = context.global.process.env.HIGH;\n var LOW = context.global.process.env.LOW;\n var LOWLOW = context.global.process.env.LOWLOW;\n //scale up the value by 1000 and put it back on the broker topic to be sent to Predix Time Series\n for ( var i=0;i<item.body.length;i++)\n {\n var tagName = item.body[i].name;\n if ( tagName.includes('dischargepressure')) {\n var value = item.body[i].datapoints[0][1];\n msg.payload = JSON.stringify(item);\n if ( value > HIGH || value < LOW ) {\n return msg\n }\n else {\n return null; \n }\n }\n else {\n return msg;\n }\n }\n","outputs":1,"noerr":0,"x":400,"y":180,"wires":[["a72237c7.469d38"]]}]
Binary file modified config/app-deadband/predix-edge-ref-app-app-deadband-config.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion config/config-simulator.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[
{"browseName": "Simulator.Device1.FLOAT1", "frequency": 1000, "random": {"dataType": "Double", "min": 0, "max": 0.5, "precision": 4}},
{"browseName": "Simulator.Device1.FLOAT2", "frequency": 1000, "counter": {"dataType": "Double", "start": 1.10, "min": 1.10, "max": 4.40, "increment": 1.10 }},
{"browseName": "Simulator.Device1.FLOAT2", "frequency": 1000, "counter": {"dataType": "Double", "start": 1.10, "min": 1.10, "max": 4.40, "increment": 0.3 }},
{"browseName": "Simulator.Device1.FLOAT3", "frequency": 1000, "counter": {"dataType": "Integer", "start": 1, "min": 1, "max": 1000, "increment": 1 }},
{"browseName": "Simulator.Device1.FLOAT4", "frequency": 1000, "counter": {"dataType": "Integer", "start": 1, "min": 1, "max": 1000, "increment": 10 }},
{"browseName": "Simulator.Device1.FLOAT5", "frequency": 1000, "counter": {"dataType": "Integer", "start": 1, "min": 1, "max": 1000, "increment": 20 }},
Expand Down
4 changes: 2 additions & 2 deletions docker-compose-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "3.0"
#This file combines all the edge services and our services so that it can be deployed as a unit
services:
opcua-simulator:
image: "predixadoption/predix-edge-opcua-simulator:1.0.5"
image: "predixadoption/predix-edge-opcua-simulator:1.0.6"
hostname: "opcua-simulator"
volumes:
- ./config:/config
Expand Down Expand Up @@ -30,7 +30,7 @@ services:
networks:
- predix-edge-broker_net
predix-edge-node-red:
image: "predixadoption/predix-edge-node-red:1.0.16"
image: "predixadoption/predix-edge-node-red:1.0.18"
volumes:
- ./config:/config
- ./data:/data
Expand Down
7 changes: 4 additions & 3 deletions docker-compose-local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "3.0"
#This file combines all the edge services and our services so that it can be deployed as a unit
services:
opcua-simulator:
image: "predixadoption/predix-edge-opcua-simulator:1.0.5"
image: "predixadoption/predix-edge-opcua-simulator:1.0.6"
hostname: "opcua-simulator"
volumes:
- ./config:/config
Expand Down Expand Up @@ -31,7 +31,7 @@ services:
networks:
- predix-edge-broker_net
predix-edge-node-red:
image: "predixadoption/predix-edge-node-red:1.0.16"
image: "predixadoption/predix-edge-node-red:1.0.18"
volumes:
- ./config:/config
- ./data:/data
Expand All @@ -40,7 +40,7 @@ services:
ports:
- 1880:1880
predix-edge-ref-app:
image: "predixadoption/predix-edge-ref-app:1.0.34"
image: "predixadoption/predix-edge-ref-app:1.0.36"
volumes:
- ./config:/config
- ./data:/data
Expand All @@ -50,6 +50,7 @@ services:
ports:
- 5000:5000
- 9002:9002
#entrypoint: ["sh", "-c", "sleep 500000"]
networks:
predix-edge-broker_net:
external: true
6 changes: 3 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "3.0"
#This file combines all the edge services and our services so that it can be deployed as a unit
services:
opcua-simulator:
image: "predixadoption/predix-edge-opcua-simulator:1.0.5"
image: "predixadoption/predix-edge-opcua-simulator:1.0.6"
networks:
- predix-edge-broker_net
ports:
Expand All @@ -24,13 +24,13 @@ services:
networks:
- predix-edge-broker_net
predix-edge-node-red:
image: "predixadoption/predix-edge-node-red:1.0.16"
image: "predixadoption/predix-edge-node-red:1.0.18"
networks:
- predix-edge-broker_net
ports:
- 1880:1880
predix-edge-ref-app:
image: "predixadoption/predix-edge-ref-app:1.0.34"
image: "predixadoption/predix-edge-ref-app:1.0.36"
networks:
- predix-edge-broker_net
ports:
Expand Down
Binary file modified images/edge-ref-app-data-flows-small.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 2b96148

Please sign in to comment.