fogflow/mqtt-adapter based image with multi-platform support (amd64/arm32/arm64)
403
1º Add this operator to FogFlow Operators
2º Modify this curl where:
FogFlowDesignerURI is the URI of the FogFlow Designer.
MQTTBrokerURI/MQTTBrokerPort is the URI of the MQTT Broker.
DeviceID Is the Identifier for the virtual device, this will be addressed through MQTT for the final entity.
DeviceType is the virtual device created for the Designer, this trigger the deployment of the Operator inside the Worker based on the location of this virtual device.
DeviceTopic is the topic where the device will send information.
Mappings Device reported attributes mappings.
Location Location of the virtual device, used to deploy this operator in a Worker based on its location.
curl -iX POST \
'http://{FogFlowDesinerURI}:8080/device' \
-H 'Content-Type: application/json' \
-d '
{
"id": {DeviceID},
"type": {DeviceType},
"attributes": {
"protocol": {
"type": "string",
"value": "MQTT"
},
"mqttbroker": {
"type": "string",
"value": "mqtt://{MQTTBrokerURI:MQTTBrokerPort}"
},
"topic": {
"type": "string",
"value": {DeviceTopic}
},
"threshold": {
"type": "integer",
"value": 80
},
"mappings": {
"type": "object",
"value": {
"temp8": {
"name": "temperature",
"type": "float",
"entity_type": "AirQualityObserved"
},
"hum8": {
"name": "relativeHumidity",
"type": "float",
"entity_type": "AirQualityObserved"
}
}
}
},
"metadata": {
"location": {
"type": "point",
"value": {
"latitude": 38.01506335734526,
"longitude": -1.1715629779027177
}
}
}
}'
3º Create the FogFunction that deploy this operator, configure the Entity Stream as the same as the virtual {DeviceType} created previously.
4º Enjoy
Content type
Image
Digest
sha256:110a06b83…
Size
356.9 MB
Last updated
almost 4 years ago
docker pull jeleazar/fogflow-mqtt-adapter