Overview
The Lincoln Electric integration with MachineMetrics involves utilizing MQTT (Message Queuing Telemetry Transport) for data communication. This guide outlines the steps required to set up and manage MQTT brokers, and configure adapters for Lincoln Electric controls on the customer's edge device.
Prerequisites
- Access to the MachineMetrics edge device.
- Ability to install and configure MQTT broker on the edge device.
- Knowledge of Docker and basic network configurations.
MQTT Broker Setup
Existing Broker Configuration:
If the customer has an existing MQTT broker, simply configure the Lincoln Electric adapter with the customer's broker credentials (username and password).
MachineMetrics Hosted Broker:
If using MachineMetrics' hosted broker, proceed with the following setup steps:
a. Create Account Credentials:
- Generate a unique random password using tools like 1Password or LastPass.
- Install Mosquitto locally if not already installed.
- Use mosquitto_passwd to create a hashed password:
touch ./temp_pwfile
mosquitto_passwd -b ./temp_pwfile lincoln_client <random_password>
cat ./temp_pwfile # To display the hashed password
rm ./temp_pwfile
- Copy the hashed password (post lincoln_client:) for later use.
b. Find the Docker Network:
Determine the internal Docker network used by the containers:
ping supervisor # From the supervisor container
route # From the host OS to find the matching network interface
balena network ls # To match network ID with the interface name
c. Broker Installation on Edge Device:
Ensure the edge device firmware is up-to-date.
Navigate to the edge device's management page, check the Extras section for existing configurations.
Install the MQTT broker using the following Docker Compose configuration:
yaml
Copy code
version: '2'
services:
mosquitto:
image: 352302322568.dkr.ecr.us-west-2.amazonaws.com/edge-apps/mosquitto:2.0.11-2
restart: unless-stopped
networks:
- main_services
ports:
- '1883:1883'
environment:
- LINCOLN_CLIENT_PW=<hashed_password>
labels:
com.machinemetrics.features.system_token: 1
networks:
main_services:
external:
name: <docker_network>
Replace <hashed_password> with the generated password hash.
Replace <docker_network> with the identified Docker network name.
Credential Distribution:
Provide the following credentials to the customer via a secure method:
makefile
Copy code
Host: mqtt://<edge_ip_address>
Username: lincoln_client
Password: <random_plaintext_password>
Ensure the edge device has a static IP or DHCP reservation.
Adapter Configuration
Creating a New Data Source:
Set up a new data source of type MQTT (Lincoln Electric) in the MachineMetrics interface.
For MachineMetrics' internal broker, use the connection string mqtt://customservices_mosquitto_1.
If connecting to a customer-provided broker, use the customer's specified host string.
Serial Number Discovery:
In discovery mode, the adapter collects all board serial numbers seen in the messages and displays them in an alarm.
Identify the correct serial number for each machine and configure it in the adapter.
Configuration Keys
Telemetry Keys: Current, Voltage, Wire Speed, Motor Current, True Energy, Weld Record.
Summary Keys: Avg Current, Avg Voltage, Avg Wire Speed, Avg Motor Current, Avg Gas Flow, Consumable Density, Diameter, Duration.
Derived Keys: Execution, Weld Count, Consumable Rate, Control Board Serial, Observed Serials, Wire Length, Wire Mass.
This setup guide should help ensure that your MQTT integration for Lincoln Electric controls via MachineMetrics is successful. For any issues not covered by this guide, please consult the MachineMetrics support team.
Comments
0 comments
Please sign in to leave a comment.