orchestracities / lego-diorama-usi-2022 Goto Github PK
View Code? Open in Web Editor NEWThis repository hosts code, configuration and documentation to deploy Orchestra Cities lego diorama.
License: Apache License 2.0
This repository hosts code, configuration and documentation to deploy Orchestra Cities lego diorama.
License: Apache License 2.0
instead of passing the topic as variable, let's compose it inside the code following fiware protocol
a topic will be formed by:
protocol
(share across multiple sensors)service_api_key
(share across multiple sensors of the same time, e.g. streetlights)sensor_id
(different for each sensor)a topic to read/write sensor values will be as follow: /<protocol>/<service_api_key>/<sensor_id>/attrs
i.e. supposed that the protocol is json
, the service api key is 4jggokgpepnvsb2uv4s40d59ov
and the sensor is urn:streetlight:001
: /json/4jggokgpepnvsb2uv4s40d59ov/urn:streetlight:001/attrs
a message to update attributes is a json payload serialized as a string that maps attribute names to values:
{"attribute_name": "value"}
e.g.:
{"h": 70, "t": 15}
i.e., updating the sensor values will be a mqtt command as:
$ mosquitto_pub -t /json/4jggokgpepnvsb2uv4s40d59ov/urn:streetlight:001/attrs -m '{"h": 70, "t": 15}' -h <mosquitto_broker> -p <mosquitto_port> -u <user> -P <password>
a topic to receive commands will be as follow: /<protocol>/<service_api_key>/<sensor_id>/cmd
i.e. supposed that the protocol is json
, the service api key is 4jggokgpepnvsb2uv4s40d59ov
and the sensor is urn:streetlight:001
: /json/4jggokgpepnvsb2uv4s40d59ov/urn:streetlight:001/cmd
a message to receive command is a json payload serialized as a string that maps command names to passed parameters and their values:
{ "command name": { "command parameter": "value" } }
e.g.
{ "light": { "switch": "on" } }
last, but not least, once a sensor receive a commands and execute it, it should confirm the execution (or report error) on the topic: /<protocol>/<service_api_key>/<sensor_id>/cmdexe
i.e. supposed that the protocol is json
, the service api key is 4jggokgpepnvsb2uv4s40d59ov
and the sensor is urn:streetlight:001
: /json/4jggokgpepnvsb2uv4s40d59ov/urn:streetlight:001/cmdexe
the message to be sent is a json payload serialized as a string that maps attribute names to values:
{ "command name": { "command parameter": "value" } }
e.g.
{ "light": { "switch": "ok" } }
(see old code)
Is your feature request related to a problem? Please describe.
Given that we are not yet ready for the k8s + kubeedge stack, let's start with basic integration at the service level
by providing a docker ministack.
Describe the solution you'd like
deploy a stack with one click that includes different services required:
Describe alternatives you've considered
N/A
Additional context
N/A
use a mqtt queue, 1 topic per sensor (2)
the flow should be:
{ "light": { "power": "on" } }
):
{ "light": { "power": "ok" } }
){ "powerState": "on" }
){ "light": { "power": "off" } }
):{ "light": { "power": "ok" } }
){ "powerState": "off" }
)(see old code)
Waste Management
Environment Management
Parking and EVCharging
TrafficFlow and Streetlight
Other items:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.