MQTT device service go version. The design is base on document .
- core-data
- core-metadata
- core-command
Modify configuration-driver.toml
file which under ./cmd/res
folder
[Incoming]
Protocol = "tcp"
Host = "m12.cloudmqtt.com"
Port = 17217
Username = "tobeprovided"
Password = "tobeprovided"
Qos = 0
KeepAlive = 3600
MqttClientId = "IncomingDataSubscriber"
Topic = "DataTopic"
[Response]
Protocol = "tcp"
Host = "m12.cloudmqtt.com"
Port = 17217
Username = "tobeprovided"
Password = "tobeprovided"
Qos = 0
KeepAlive = 3600
MqttClientId = "CommandResponseSubscriber"
Topic = "ResponseTopic"
Define devices info for device-sdk to auto upload device profile and create device instance. Please modify configuration.toml
file which under ./cmd/res
folder
[[DeviceList]]
Name = "MQTT test device"
Profile = "Test.Device.MQTT.Profile"
Description = "MQTT device is created for test purpose"
Labels = [ "MQTT", "test"]
[DeviceList.Addressable]
name = "Gateway address"
Protocol = "TCP"
Address = "m12.cloudmqtt.com"
Port = 17217
Publisher = "CommandPublisher"
user = "tobeprovided"
password = "tobeprovided"
topic = "CommandTopic"
make prepare
make build
make run
docker build -t edgexfoundry/docker-device-mqtt-go:0.1.0 .