Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Hardware
  3. Raspberry PI + MQTT Gateway + Domoticz -> Connection refused

Raspberry PI + MQTT Gateway + Domoticz -> Connection refused

Scheduled Pinned Locked Moved Hardware
6 Posts 3 Posters 5.8k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    artipi
    wrote on last edited by
    #1

    Hello to all,

    i am happy to be here! This is great Platform, thanks for that:)

    To my Problem:

    I have installed a Raspberry with Domoticz and followed the Instructions on : https://www.mysensors.org/build/raspberry
    to create my Gateway.
    My Steps:

    git clone https://github.com/mysensors/MySensors.git --branch master
    
    cd MySensors
    
    ./configure --my-gateway=mqtt --my-controller-ip-address=127.0.0.1 --my-mqtt-publish-topic-prefix=mysensors-out --my-mqtt-subscribe-topic-prefix=mysensors-in --my-mqtt-client-id=mygateway1
    
    make
    
    sudo ./bin/mysgw -d
    

    And after that i am getting this Errors:

    pi@raspberrypi:~ $ cd MySensors/
    pi@raspberrypi:~/MySensors $ sudo ./bin/mysgw -d
    mysgw: Starting gateway...
    mysgw: Protocol version - 2.1.1
    mysgw: MCO:BGN:INIT GW,CP=RNNG---,VER=2.1.1
    mysgw: TSF:LRT:OK
    mysgw: TSM:INIT
    mysgw: TSF:WUR:MS=0
    mysgw: TSM:INIT:TSP OK
    mysgw: TSM:INIT:GW MODE
    mysgw: TSM:READY:ID=0,PAR=0,DIS=0
    mysgw: MCO:REG:NOT NEEDED
    mysgw: MCO:BGN:STP
    mysgw: MCO:BGN:INIT OK,TSP=1
    mysgw: Attempting MQTT connection...
    mysgw: connect: Connection refused
    mysgw: failed to connect
    mysgw: Attempting MQTT connection...
    mysgw: connect: Connection refused
    mysgw: failed to connect
    mysgw: Attempting MQTT connection...
    mysgw: connect: Connection refused
    mysgw: failed to connect
    

    Can someone help me?

    Thanks, Arthur.

    mfalkviddM 1 Reply Last reply
    0
    • A artipi

      Hello to all,

      i am happy to be here! This is great Platform, thanks for that:)

      To my Problem:

      I have installed a Raspberry with Domoticz and followed the Instructions on : https://www.mysensors.org/build/raspberry
      to create my Gateway.
      My Steps:

      git clone https://github.com/mysensors/MySensors.git --branch master
      
      cd MySensors
      
      ./configure --my-gateway=mqtt --my-controller-ip-address=127.0.0.1 --my-mqtt-publish-topic-prefix=mysensors-out --my-mqtt-subscribe-topic-prefix=mysensors-in --my-mqtt-client-id=mygateway1
      
      make
      
      sudo ./bin/mysgw -d
      

      And after that i am getting this Errors:

      pi@raspberrypi:~ $ cd MySensors/
      pi@raspberrypi:~/MySensors $ sudo ./bin/mysgw -d
      mysgw: Starting gateway...
      mysgw: Protocol version - 2.1.1
      mysgw: MCO:BGN:INIT GW,CP=RNNG---,VER=2.1.1
      mysgw: TSF:LRT:OK
      mysgw: TSM:INIT
      mysgw: TSF:WUR:MS=0
      mysgw: TSM:INIT:TSP OK
      mysgw: TSM:INIT:GW MODE
      mysgw: TSM:READY:ID=0,PAR=0,DIS=0
      mysgw: MCO:REG:NOT NEEDED
      mysgw: MCO:BGN:STP
      mysgw: MCO:BGN:INIT OK,TSP=1
      mysgw: Attempting MQTT connection...
      mysgw: connect: Connection refused
      mysgw: failed to connect
      mysgw: Attempting MQTT connection...
      mysgw: connect: Connection refused
      mysgw: failed to connect
      mysgw: Attempting MQTT connection...
      mysgw: connect: Connection refused
      mysgw: failed to connect
      

      Can someone help me?

      Thanks, Arthur.

      mfalkviddM Offline
      mfalkviddM Offline
      mfalkvidd
      Mod
      wrote on last edited by
      #2

      Welcome to the MySensors community @artipi !

      Domoticz is a mqtt client and wants to connect to a mqtt broker.

      The Mqtt gateway is also a mqtt client that wants to connect to a broker.

      So you need a mqtt broker that both clients can connect to.

      Luckily, Domoticz has instructions for installing mosquitti, which is a mqtt broker. It might already be installed on your system. If it is, you can instruct the gateway to connect to it by using --my-port=1883 in the configure command.

      If mosquitto isn't installed, you can install it by following these instructions: https://www.domoticz.com/wiki/MQTT#Installing_Mosquitto

      1 Reply Last reply
      0
      • A Offline
        A Offline
        artipi
        wrote on last edited by
        #3

        Thanks very much! Mosquitto was the solution!:)

        1 Reply Last reply
        1
        • A Offline
          A Offline
          artipi
          wrote on last edited by
          #4

          Just another question:

          How to test incomming messages to broker from msgw??

          1 Reply Last reply
          0
          • gohanG Offline
            gohanG Offline
            gohan
            Mod
            wrote on last edited by
            #5

            You can install any mqtt client on computer, connect to mqtt broker and subscribe to topic # and you should be able to see all incoming messages. Or you can start playing with the ethernet gateway first (this way you can use myscontroller to monitor the gateway) and later move to mqtt.

            1 Reply Last reply
            0
            • A Offline
              A Offline
              artipi
              wrote on last edited by
              #6

              Ok, thanks.

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              29

              Online

              11.7k

              Users

              11.2k

              Topics

              113.1k

              Posts


              Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • MySensors
              • OpenHardware.io
              • Categories
              • Recent
              • Tags
              • Popular