Accesso

Effettuare il login per entrare nella sezione MyBalluff

Rimani sempre aggiornato!

Con le nostre e-mail riceverai informazioni su prodotti, eventi, servizi e novità.

REGISTRATI COME AZIENDA

Verificheremo se disponi già di un numero cliente con noi per collegare il tuo nuovo account online con esso.

Registrati
Prodotti
Assistenza e supporto
Settori Industriali e Soluzioni
Azienda
Versione 1.0
·
Ultima modifica il 2025-06-27

MQTT Broker Setup on CMTK

1. Prerequisites

1) SD Card Inserted

2) Docker Enabled

3) Portainer Setup

2. Setup Internet Access

  1. Conect LAN2 Port on the CMTK to your router
  2. Go to the "Netwrok Settings tab and set the LAN2 port as a DHCP client and press save.
  3. If wired and configured properly, the IP address information should be poplulated.you should be able to use the Ping Server to successfully ping the balluff.com URL.
  4. You should be able to use the "Ping Server" function to successfully ping balluff.com

3. Open Portainer

  1. Go to the "Settings Tab" --> Docker --> Open Portainer
  2. Input your credentials and login.  If this is the first time logging into portainer, it will prompt you to create a user name and password.

4. Create the MQTT Broker

  1. Once logged into Portainer, navigate to the "Stacks" tab.
  2. Create a Stack
    1. Give the stack a name.  It must be lowercase characters.  In this example, the name is "mqtt". 
    2. Select "Web editor" as the build method
    3. Copy and paste the following into the web editor.  You can change the port numbers if you would like to, in this example it is set to "50008:50008"
      1. services:

          mosquitto:

            image: eclipse-mosquitto:latest

            container_name: MQTT_Broker

            ports:

              - "50008:50008"

            volumes:

              - mosquitto_config:/mosquitto/config

              - mosquitto_data:/mosquitto/data

              - mosquitto_log:/mosquitto/log

            restart: always

        volumes:

          mosquitto_config:

          mosquitto_data:

          mosquitto_log:

  3. Click "Deploy the Stack"
  4. Go to the "Volumes" tab and confirm the volumes were created.  There should be a total of three (log, config, and data).
  5. Go to the "Containers" tab.  There should be a newly created container running with the name "MQTT_Broker".  Under the Quick Actions column, click on the "Exec Console" command.
  6. Select " /bin/sh" as the command and click "Connect"
  7. Input the following commands:
    1. Change Directory
      1. cd/mosquitto/config
    2. Allow listener on the port (50008 for this example)
      1. echo "listener 50008" > mosquitto.conf
    3. Do not allow anonymous connection
      1. echo "allow_anonymous false >> mosquitto.conf
    4. Create a password file
      1. echo "password_file /mosquitto/config/passwordfile" >> mosquitto.conf 
    5. Set your username
      1. mosquitto_passwd -c passwordfile admin
      2.  I am using admin as the username.  If you would like to change the name, modify the end of the command by changing admin to your desired name.
      3. Once you hit enter, it will prompt you to enter a password and then prompt you to re-enter the password for confirmation.  When entering the password, the characters will not display on the screen.
    6. Command to confirm config settings
      1. cat mosquitto.conf
    7. You can also set the allow anonymous to true instead of false, which will make it where a username and password does not need to be input to access the broker.  If setting this to true, you do not need to run the "mosquitto_passwd -c passwordfile admin" command.
      1. echo "allow_anonymous true" >> mosquito.conf
    8.  
      1. cd /mosquitto/config
  8.  Go back to the "Containers" tab to stop the container and then start it again.  This will allow for the configuration setting done in the previous step to take effect.
    1. Stop the container
    2. After stopping the container, start it back.
  9. You can now use the MQTT broker to store data from a MQTT device.
Energy consumption labeling
Energy consumption labeling

EPREL - European Product Database for Energy Labeling

Avete domande o suggerimenti? Siamo a vostra disposizione.

Per tutte le domande relative ad argomenti commerciali come preventivi, ordini, tempi di consegna, il nostro reparto vendite interno sarà lieto di supportarvi.

Contattateci direttamente per telefono: + 39 011 3150711


Balluff Automation S.r.l

Balluff Automation S.r.l.
Corso Cuneo 15,
10078 Venaria Reale (TO).

Prodotto campione gratuito

Per poter aggiungere un prodotto campione gratuito al carrello è necessario rimuovere tutti i prodotti normali dal carrello. È sicuro di voler continuare