Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
naiades-platform-poc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
naiades
naiades-platform-poc
Commits
fee9d200
Commit
fee9d200
authored
May 14, 2020
by
Federico Sismondi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update() watering scripts using orion LD API
parent
d7c95bb3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
12 deletions
+6
-12
scripts/watering_05_retrieve_attribute.sh
scripts/watering_05_retrieve_attribute.sh
+4
-10
scripts/watering_06_update_specific_attrs.sh
scripts/watering_06_update_specific_attrs.sh
+1
-1
scripts/watering_07_subscribe_to_entity.sh
scripts/watering_07_subscribe_to_entity.sh
+1
-1
scripts/xx_todo.sh
scripts/xx_todo.sh
+0
-0
No files found.
scripts/watering_05_retrieve_attribute.sh
View file @
fee9d200
...
@@ -3,14 +3,8 @@
...
@@ -3,14 +3,8 @@
[[
-z
"
$ORION_HOST
"
]]
&&
echo
"Please set ORION_HOST env var. E.g. export ORION_HOST=127.0.0.1"
&&
exit
[[
-z
"
$ORION_HOST
"
]]
&&
echo
"Please set ORION_HOST env var. E.g. export ORION_HOST=127.0.0.1"
&&
exit
echo
"Querying context broker at:
${
ORION_HOST
}
"
echo
"Querying context broker at:
${
ORION_HOST
}
"
curl
--location
--request
GET
\
curl
-X
GET
\
"http://
$ORION_HOST
:1026/v2/entities/urn:ngsi-ld:FlowerBed:FlowerBed-345/attrs/soilMoistureVwc"
\
"http://
$ORION_HOST
:1026/v2/entities/urn:ngsi-ld:FlowerBed:FlowerBed-345"
\
--header
"Fiware-Service: carouge"
\
-H
'Accept: application/json'
\
--header
"Fiware-ServicePath: /watering"
\
-H
'Link: <https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"'
| python
-mjson
.tool
#curl --location --request GET \
# "http://$ORION_HOST:1026/v2/entities/urn:ngsi-ld:FlowerBed:FlowerBed-345/attrs/location" \
# --header "Fiware-Service: carouge" \
# --header "Fiware-ServicePath: /watering" \
# | python -mjson.tool
\ No newline at end of file
scripts/watering_06_update_specific_attrs.sh
View file @
fee9d200
...
@@ -9,5 +9,5 @@ curl --location --request PATCH \
...
@@ -9,5 +9,5 @@ curl --location --request PATCH \
--header
'Content-Type: application/json'
\
--header
'Content-Type: application/json'
\
--data-raw
'{
--data-raw
'{
"type": "Property",
"type": "Property",
"value":
8
"value":
23
}'
}'
scripts/watering_07_subscribe_to_entity.sh
View file @
fee9d200
...
@@ -18,7 +18,7 @@ curl --location --request POST \
...
@@ -18,7 +18,7 @@ curl --location --request POST \
"entities": [{"type": "FlowerBed"}],
"entities": [{"type": "FlowerBed"}],
"notification": {
"notification": {
"attributes": ["soilMoistureVwc"],
"attributes": ["soilMoistureVwc"],
"format": "
keyValues
",
"format": "
normalized
",
"endpoint": {
"endpoint": {
"uri": "'
${
SUBSCRIPTION_URL
}
'",
"uri": "'
${
SUBSCRIPTION_URL
}
'",
"accept": "application/json"
"accept": "application/json"
...
...
scripts/xx_todo.sh
100644 → 100755
View file @
fee9d200
File mode changed from 100644 to 100755
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment