/device-modbus-go

Primary LanguageGoApache License 2.0Apache-2.0

Device Modbus Go

Modbus device service go version

Requisite

  • core-data
  • core-metadata
  • core-command

Predefined configuration

Device list

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

Modbus TCP

[[DeviceList]]
  Name = "Damocles device"
  Profile = "CoolMasterNet Connected Device"
  Description = "Damocles2 is a product for monitoring and controlling digital inputs and outputs over a LAN."
  labels = [ "power-meter","Modbus TCP" ]
  [DeviceList.Addressable]
    name = "HVAC-Gateway address"
    Protocol = "TCP"
    Address = "127.0.0.1"
    Port = 1502
    Path = "1"

Modbus RTU

[[DeviceList]]
  Name = "Damocles device"
  Profile = "CoolMasterNet Connected Device"
  Description = "Damocles2 is a product for monitoring and controlling digital inputs and outputs over a LAN."
  labels = [ "power-meter","Modbus RTU" ]
  [DeviceList.Addressable]
    name = "HVAC-Gateway address"
    Protocol = "RTU"
    Address = "/tmp/slave,19200,8,1,0"
    Path = "1"

Installation and Execution

make prepare
make build
make run

build image

docker build -t edgexfoundry/docker-device-modbus-go:0.1.0 .