edgexfoundry / device-mqtt-go

Owner: Device WG
Apache License 2.0
42 stars 72 forks source link

How to configure mqtt through edgex using meta-edgex layer #326

Closed Rohini8 closed 2 years ago

Rohini8 commented 2 years ago

We integrated meta-edgex layer in yocto build for imx8 board. Ran the edgex-fuji-launch.sh script and all services are up. Then we ran device-mqtt-launch.sh script. It's showing the service is up and started publishing and listening. But we are not able to see the messages (from MQTT test device) in HiveMQ mqtt client. Please let us know how to configure mqtt service (configuration.toml file) to publish the message to MQTT broker and to check the messages using HiveMQ client.

Here by attaching the log on the board: Edgex-Mqtt-logs-on-imx8.txt

cloudxxx8 commented 2 years ago

MQTT Device Service is a south bound connector to connect the devices publishing MQTT message, so it won't publish data to northbound. Please refer to the quick started guide: https://docs.edgexfoundry.org/2.1/getting-started/quick-start/

Rohini8 commented 2 years ago

https://docs.edgexfoundry.org/2.0/getting-started/quick-start/ As per the docker-compose.yml file (from the above link), microservice used to configure mqtt is "edgex-app-mqtt".

But in the meta-edgex layer (https://github.com/alihanyalcin/meta-edgex), the service we are running to configure mqtt is "edgex-device-mqtt".

May I know the difference between "edgex-app-mqtt" and "edgex-device-mqtt" ??

cloudxxx8 commented 2 years ago

edgex-device-mqtt is responsible for communicating the southbound devices: https://docs.edgexfoundry.org/2.1/microservices/device/Ch-DeviceServices/

edgex-app-mqtt is an application service to export data to northbound: https://docs.edgexfoundry.org/2.1/microservices/application/ApplicationServices/

Rohini8 commented 2 years ago

Thank you for the information. Is "edgex-app-mqtt" available in "Fuji" version of EdgeX?

cloudxxx8 commented 2 years ago

yes, you need to use the image edgexfoundry/docker-app-service-configurable:1.0.0 "edgex-app-mqtt" is just a container name, and the image is docker-app-service-configurable:1.0.0 in Fuji however, you need to use the correct configuration for it here is the example: https://github.com/edgexfoundry/app-service-configurable/blob/v1.0.0/res/mqtt-export/configuration.toml

Rohini8 commented 2 years ago

Ok. We are trying to run edgex on Imx8qmmek board using meta-edgex layer. Is there any way to enable "edgex-app-mqtt" in meta-edgex (https://github.com/alihanyalcin/meta-edgex) layer? Or can we integrate it using any other methods?

lenny-goodell commented 2 years ago

@Rohini8 , this question is very old. Can we close?

iain-anderson commented 2 years ago

closing as inactive

Devendra-7 commented 10 months ago

Hi, We are trying to integrate meta-edgex layer to imx6 board, getting the errors related to the go language. currently we are working with the yocto 3.4(Honister) and edgex release fuji, i am new to the edgex and go language, didn't get much help from any forum. Please provide your comments on this, attaching the erro msg.

Log data follows:
| DEBUG: Executing shell function do_compile
| NOTE: make -j 20
| CGO_ENABLED=0 GO111MODULE=on go  build -ldflags "-X github.com/edgexfoundry/edgex-go.Version=1.1.0" -o cmd/config-seed/config-seed ./cmd/config-seed
| CGO_ENABLED=0 GO111MODULE=on go  build -ldflags "-X github.com/edgexfoundry/edgex-go.Version=1.1.0" -o cmd/export-client/export-client ./cmd/export-client
| CGO_ENABLED=1 GO111MODULE=on go  build -ldflags "-X github.com/edgexfoundry/edgex-go.Version=1.1.0" -o cmd/export-distro/export-distro ./cmd/export-distro
| CGO_ENABLED=0 GO111MODULE=on go  build -ldflags "-X github.com/edgexfoundry/edgex-go.Version=1.1.0" -o cmd/core-metadata/core-metadata ./cmd/core-metadata
| CGO_ENABLED=1 GO111MODULE=on go  build -ldflags "-X github.com/edgexfoundry/edgex-go.Version=1.1.0" -o cmd/core-data/core-data ./cmd/core-data
| CGO_ENABLED=0 GO111MODULE=on go  build -ldflags "-X github.com/edgexfoundry/edgex-go.Version=1.1.0" -o cmd/core-command/core-command ./cmd/core-command
| CGO_ENABLED=0 GO111MODULE=on go  build -ldflags "-X github.com/edgexfoundry/edgex-go.Version=1.1.0" -o cmd/support-logging/support-logging ./cmd/support-logging
| CGO_ENABLED=0 GO111MODULE=on go  build -ldflags "-X github.com/edgexfoundry/edgex-go.Version=1.1.0" -o cmd/support-notifications/support-notifications ./cmd/support-notifications
| go: bitbucket.org/bertimus9/systemstat@v0.0.0-20180207000608-0eeff89b0690: missing go.sum entry; to add it:
|   go mod download bitbucket.org/bertimus9/systemstat
| CGO_ENABLED=0 GO111MODULE=on go  build -ldflags "-X github.com/edgexfoundry/edgex-go.Version=1.1.0" -o cmd/sys-mgmt-executor/sys-mgmt-executor ./cmd/sys-mgmt-executor
| go: bitbucket.org/bertimus9/systemstat@v0.0.0-20180207000608-0eeff89b0690: missing go.sum entry; to add it:
|   go mod download bitbucket.org/bertimus9/systemstat
| go: bitbucket.org/bertimus9/systemstat@v0.0.0-20180207000608-0eeff89b0690: missing go.sum entry; to add it:
|   go mod download bitbucket.org/bertimus9/systemstat
| make: *** [Makefile:32: cmd/config-seed/config-seed] Error 1
| go: bitbucket.org/bertimus9/systemstat@v0.0.0-20180207000608-0eeff89b0690: missing go.sum entry; to add it:
|   go mod download bitbucket.org/bertimus9/systemstat
| make: *** Waiting for unfinished jobs....
| make: *** [Makefile:44: cmd/export-client/export-client] Error 1
| make: *** [Makefile:47: cmd/export-distro/export-distro] Error 1
| make: *** [Makefile:35: cmd/core-metadata/core-metadata] Error 1
| go: bitbucket.org/bertimus9/systemstat@v0.0.0-20180207000608-0eeff89b0690: missing go.sum entry; to add it:
|   go mod download bitbucket.org/bertimus9/systemstat
| make: *** [Makefile:38: cmd/core-data/core-data] Error 1
| go: bitbucket.org/bertimus9/systemstat@v0.0.0-20180207000608-0eeff89b0690: missing go.sum entry; to add it:
|   go mod download bitbucket.org/bertimus9/systemstat
| make: *** [Makefile:41: cmd/core-command/core-command] Error 1
| go: bitbucket.org/bertimus9/systemstat@v0.0.0-20180207000608-0eeff89b0690: missing go.sum entry; to add it:
|   go mod download bitbucket.org/bertimus9/systemstat
| make: *** [Makefile:50: cmd/support-logging/support-logging] Error 1
| go: bitbucket.org/bertimus9/systemstat@v0.0.0-20180207000608-0eeff89b0690: missing go.sum entry; to add it:
|   go mod download bitbucket.org/bertimus9/systemstat
| go: bitbucket.org/bertimus9/systemstat@v0.0.0-20180207000608-0eeff89b0690: missing go.sum entry; to add it:
|   go mod download bitbucket.org/bertimus9/systemstat
| make: *** [Makefile:53: cmd/support-notifications/support-notifications] Error 1
| make: *** [Makefile:56: cmd/sys-mgmt-executor/sys-mgmt-executor] Error 1
| ERROR: oe_runmake failed
| WARNING: exit code 1 from a shell command.
lenny-goodell commented 10 months ago

@Devendra-7 , please do not post questions on old closed issues.

We now use Github discussions for these types of question. Please post your question(s) here: https://github.com/orgs/edgexfoundry/discussions

Also, Fuji 1.1 is a very old release and has not been support for many years. We have just released Napa 3.1. Please use the latest release. Documentation is here: https://docs.edgexfoundry.org/3.1. Start with the getting started guides.