Factoryinput

The technical documentation of the factoryinput microservice, which provides REST endpoints for MQTT messages via HTTP requests.

This microservice is still in development and is not considered stable for production use

Factoryinput provides REST endpoints for MQTT messages via HTTP requests.

This microservice is typically accessed via grafana-proxy

How it works

The factoryinput microservice provides REST endpoints for MQTT messages via HTTP requests.

The main endpoint is /api/v1/{customer}/{location}/{asset}/{value}, with a POST request method. The customer, location, asset and value are all strings. And are used to build the MQTT topic. The body of the HTTP request is used as the MQTT payload.

Kubernetes resources

  • StatefulSet: united-manufacturing-hub-factoryinput
  • Service:
    • Internal ClusterIP: united-manufacturing-hub-factoryinput-service at port 80
  • Secret: factoryinput-secret

Configuration

Environment variables

Environment variables
Variable nameDescriptionTypeAllowed valuesDefault
BROKER_URLURL to the brokerstringallssl://united-manufacturing-hub-mqtt:8883
CERTIFICATE_NAMESet to NO_CERT to allow non-encrypted MQTT access, or to USE_TLS to use TLS encryptionstringUSE_TLS, NO_CERTUSE_TLS
CUSTOMER_NAME_{NUMBER}Specifies a user for the REST API. Multiple users can be setstringAny""
CUSTOMER_PASSWORD_{NUMBER}Specifies the password of the user for the REST APIstringAny""
DEBUG_ENABLE_FGTRACEEnables the use of the fgtrace library. Not reccomended for productionstringtrue, falsefalse
FACTORYINPUT_PASSWORDSpecifies the admin user for the REST APIstringAnyfactoryinsight
FACTORYINPUT_USERSpecifies the password for the admin user for the REST APIstringAnyRandom UUID
LOGGING_LEVELDefines which logging level is used, mostly relevant for developersstringPRODUCTION, DEVELOPMENTPRODUCTION
MQTT_QUEUE_HANDLERNumber of queue workers to spawnint0-6553510
MQTT_PASSWORDPassword for the MQTT brokerstringAnyINSECURE_INSECURE_INSECURE
SERIAL_NUMBERSerial number of the cluster. Used for tracingstringAnydefalut
VERSIONThe version of the API used. Each version also enables all the previous onesintAny1
Last modified April 17, 2023: build: version 0.9.13 (6cb0a01)