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. Controllers
  3. Domoticz
  4. Connecting Gateway to Domoticz

Connecting Gateway to Domoticz

Scheduled Pinned Locked Moved Domoticz
21 Posts 3 Posters 7.8k Views 2 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.
  • C ceech

    Decided to switch to Domoticz, ran into problem.
    So, Domoticz
    0_1505828508978_Domoticz.png
    and Gateway
    https://www.mysensors.org/build/raspberry
    got installed.
    How does one make them talk to each other? Any help is appreciated.

    NeverDieN Offline
    NeverDieN Offline
    NeverDie
    Hero Member
    wrote on last edited by NeverDie
    #2

    @ceech
    Try adding a talkative device device and enabling it. Then you'll know if it's working.

    1 Reply Last reply
    0
    • C Offline
      C Offline
      ceech
      Hardware Contributor
      wrote on last edited by ceech
      #3

      I tried sudo ./bin/mysgw -d and the Gateway seems to be listening

      0_1505829110671_Gateway.png
      What can I do next?

      mfalkviddM 1 Reply Last reply
      0
      • C ceech

        I tried sudo ./bin/mysgw -d and the Gateway seems to be listening

        0_1505829110671_Gateway.png
        What can I do next?

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

        @ceech did you make a serial or ethernet gateway? (which configure command did you use?)

        If serial/USB: Domoticz does not like the default name, so you need to change it according to the instructions on the build page.
        If ethernet: the gateway needs to be added as ethernet, not serial/USB in Domoticz.

        EDIT: I see now that you made an ethernet gateway so the second statement applies.

        1 Reply Last reply
        0
        • C Offline
          C Offline
          ceech
          Hardware Contributor
          wrote on last edited by ceech
          #5

          @mfalkvidd @NeverDie I tried all sorts of combinations. Like for example:
          ./configure --my-transport=nrf24
          ./configure --my-gateway=serial
          ./configure --my-serial-is-pty
          ./configure --my-serial-pty=/dev/ttyMySensorsGateway

          and in Domoticz MySensors Gateway USB with dev/ttyAMA0

          then
          ./configure --my-transport=nrf24
          ./configure --my-gateway=ethernet
          ./configure --my-controller-ip-address=192.168.1.120
          and in Domoticz MySensors Gateway with LAN

          I used other different combinations and this is as close to the connection as I could get
          0_1505839132337_Domoticz.png
          I feel like I'm missing something.

          NeverDieN mfalkviddM 2 Replies Last reply
          0
          • C ceech

            @mfalkvidd @NeverDie I tried all sorts of combinations. Like for example:
            ./configure --my-transport=nrf24
            ./configure --my-gateway=serial
            ./configure --my-serial-is-pty
            ./configure --my-serial-pty=/dev/ttyMySensorsGateway

            and in Domoticz MySensors Gateway USB with dev/ttyAMA0

            then
            ./configure --my-transport=nrf24
            ./configure --my-gateway=ethernet
            ./configure --my-controller-ip-address=192.168.1.120
            and in Domoticz MySensors Gateway with LAN

            I used other different combinations and this is as close to the connection as I could get
            0_1505839132337_Domoticz.png
            I feel like I'm missing something.

            NeverDieN Offline
            NeverDieN Offline
            NeverDie
            Hero Member
            wrote on last edited by NeverDie
            #6

            @ceech
            No, no, no. I wouldn't mess with that. Remember that it's supposed to be a GUI. First turn a device on, so that it "phones home" and registers itself with the gateway. Then go to setup, and add the device using the GUI. At least, that's how I did it when I tried it out, and it worked. I wouldn't call it a great UI design (feels more like a work in progress), but it is semi-intuitive if you approach it that way.

            1 Reply Last reply
            0
            • C ceech

              @mfalkvidd @NeverDie I tried all sorts of combinations. Like for example:
              ./configure --my-transport=nrf24
              ./configure --my-gateway=serial
              ./configure --my-serial-is-pty
              ./configure --my-serial-pty=/dev/ttyMySensorsGateway

              and in Domoticz MySensors Gateway USB with dev/ttyAMA0

              then
              ./configure --my-transport=nrf24
              ./configure --my-gateway=ethernet
              ./configure --my-controller-ip-address=192.168.1.120
              and in Domoticz MySensors Gateway with LAN

              I used other different combinations and this is as close to the connection as I could get
              0_1505839132337_Domoticz.png
              I feel like I'm missing something.

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

              @ceech all parameters for the configure command need to be added in one line

              C 1 Reply Last reply
              0
              • NeverDieN Offline
                NeverDieN Offline
                NeverDie
                Hero Member
                wrote on last edited by
                #8

                Are you sure you're using the right serial port? I did it on a Windows PC (I think only Windows 10 worked for me), and I never did find the Linux way of naming serial ports all that memorable.

                C 2 Replies Last reply
                0
                • NeverDieN NeverDie

                  Are you sure you're using the right serial port? I did it on a Windows PC (I think only Windows 10 worked for me), and I never did find the Linux way of naming serial ports all that memorable.

                  C Offline
                  C Offline
                  ceech
                  Hardware Contributor
                  wrote on last edited by
                  #9

                  @NeverDie I have no idea.

                  1 Reply Last reply
                  0
                  • mfalkviddM mfalkvidd

                    @ceech all parameters for the configure command need to be added in one line

                    C Offline
                    C Offline
                    ceech
                    Hardware Contributor
                    wrote on last edited by
                    #10

                    @mfalkvidd It's a good advice, unfortunately it didn't resolve the problem.

                    mfalkviddM 1 Reply Last reply
                    0
                    • NeverDieN NeverDie

                      Are you sure you're using the right serial port? I did it on a Windows PC (I think only Windows 10 worked for me), and I never did find the Linux way of naming serial ports all that memorable.

                      C Offline
                      C Offline
                      ceech
                      Hardware Contributor
                      wrote on last edited by
                      #11

                      @NeverDie There are two serial ports available in Domoticz. Right? And you have to specify which one you are using in Gateway configuration. Right?

                      1 Reply Last reply
                      0
                      • C ceech

                        @mfalkvidd It's a good advice, unfortunately it didn't resolve the problem.

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

                        @ceech you'll need to quite a bit more detailed than that if anyone is to have a chance to help you.

                        What are the exact commands you used?
                        What was the output in the terminal?
                        What did you do in Domoticz?
                        What does the domoticz log say?

                        C 1 Reply Last reply
                        0
                        • mfalkviddM mfalkvidd

                          @ceech you'll need to quite a bit more detailed than that if anyone is to have a chance to help you.

                          What are the exact commands you used?
                          What was the output in the terminal?
                          What did you do in Domoticz?
                          What does the domoticz log say?

                          C Offline
                          C Offline
                          ceech
                          Hardware Contributor
                          wrote on last edited by
                          #13

                          @mfalkvidd Right. This is the Domoticz's part of the setting
                          0_1505841041884_Untitled.png
                          And I configured Gateway like this:
                          ./configure --my-transport=nrf24 --my-gateway=ethernet --my-controller-ip-address=192.168.1.120

                          make
                          sudo make install

                          sudo systemctl enable mysgw.service # << adding to boot
                          sudo systemctl start mysgw.service # << starting

                          mfalkviddM 2 Replies Last reply
                          0
                          • NeverDieN Offline
                            NeverDieN Offline
                            NeverDie
                            Hero Member
                            wrote on last edited by NeverDie
                            #14

                            I'm going to defer to mfalkvidd. Sounds like he has more of a handle on the Pi version of this, which is what you need. If you're stuck though, try the PC version. Maybe it's easier. Then you can return to the Pi once you get your bearings on how to navigate it.

                            1 Reply Last reply
                            0
                            • C ceech

                              @mfalkvidd Right. This is the Domoticz's part of the setting
                              0_1505841041884_Untitled.png
                              And I configured Gateway like this:
                              ./configure --my-transport=nrf24 --my-gateway=ethernet --my-controller-ip-address=192.168.1.120

                              make
                              sudo make install

                              sudo systemctl enable mysgw.service # << adding to boot
                              sudo systemctl start mysgw.service # << starting

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

                              @ceech what did sudo ./bin/mysgw -d say at startup and when Domoticz tried to connect?
                              What does the domoticz log say?

                              If you run netstat -nap in another terminal window (while mysgw -d is running), does it say something like this?

                              tcp        0      0 0.0.0.0:5003              0.0.0.0:*               LISTEN    2281/mysgw
                              
                              1 Reply Last reply
                              0
                              • C ceech

                                @mfalkvidd Right. This is the Domoticz's part of the setting
                                0_1505841041884_Untitled.png
                                And I configured Gateway like this:
                                ./configure --my-transport=nrf24 --my-gateway=ethernet --my-controller-ip-address=192.168.1.120

                                make
                                sudo make install

                                sudo systemctl enable mysgw.service # << adding to boot
                                sudo systemctl start mysgw.service # << starting

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

                                @ceech I think I have located the error.

                                Domoticz wants to connect to the gateway, but in the configure command --my-controller-ip-address was used. This means that the gateway will connect to the controller, which Domoticz does not support.

                                So drop --my-controller-ip-address, run the configure command again, run make and start up again.

                                When I run sudo ./bin/mysgw -d with your configuration I get lots of these:

                                pi@raspi1:~/MySensors $ sudo ./bin/mysgw -d
                                mysgw: Starting gateway...
                                mysgw: Protocol version - 2.1.1
                                mysgw: MCO:BGN:INIT GW,CP=R-NG---,VER=2.1.1
                                mysgw: connect: Connection refused
                                mysgw: failed to connect
                                mysgw: Eth: connect
                                mysgw: connect: Connection refused
                                mysgw: failed to connect
                                

                                which shows that the gateway is unable to connect to the controller.

                                C 1 Reply Last reply
                                0
                                • mfalkviddM mfalkvidd

                                  @ceech I think I have located the error.

                                  Domoticz wants to connect to the gateway, but in the configure command --my-controller-ip-address was used. This means that the gateway will connect to the controller, which Domoticz does not support.

                                  So drop --my-controller-ip-address, run the configure command again, run make and start up again.

                                  When I run sudo ./bin/mysgw -d with your configuration I get lots of these:

                                  pi@raspi1:~/MySensors $ sudo ./bin/mysgw -d
                                  mysgw: Starting gateway...
                                  mysgw: Protocol version - 2.1.1
                                  mysgw: MCO:BGN:INIT GW,CP=R-NG---,VER=2.1.1
                                  mysgw: connect: Connection refused
                                  mysgw: failed to connect
                                  mysgw: Eth: connect
                                  mysgw: connect: Connection refused
                                  mysgw: failed to connect
                                  

                                  which shows that the gateway is unable to connect to the controller.

                                  C Offline
                                  C Offline
                                  ceech
                                  Hardware Contributor
                                  wrote on last edited by ceech
                                  #17

                                  @mfalkvidd Removing --my-controller-ip-address did in fact solve the issue.
                                  Thank you for your help.
                                  So, to sum up, these are commands to be used when configuring Gateway for Domoticz ethernet (LAN) connection:

                                  ./configure --my-transport=nrf24 --my-gateway=ethernet
                                  
                                  make
                                  sudo make install
                                  
                                  sudo systemctl enable mysgw.service # << adding to boot
                                  sudo systemctl start mysgw.service # << starting
                                  mfalkviddM 1 Reply Last reply
                                  2
                                  • C ceech

                                    @mfalkvidd Removing --my-controller-ip-address did in fact solve the issue.
                                    Thank you for your help.
                                    So, to sum up, these are commands to be used when configuring Gateway for Domoticz ethernet (LAN) connection:

                                    ./configure --my-transport=nrf24 --my-gateway=ethernet
                                    
                                    make
                                    sudo make install
                                    
                                    sudo systemctl enable mysgw.service # << adding to boot
                                    sudo systemctl start mysgw.service # << starting
                                    mfalkviddM Offline
                                    mfalkviddM Offline
                                    mfalkvidd
                                    Mod
                                    wrote on last edited by
                                    #18

                                    @ceech yes and no. Skipping the test step is a bad idea. If that step is skipped, people have to resort to asking questions in the forum ;-)

                                    C 1 Reply Last reply
                                    0
                                    • mfalkviddM mfalkvidd

                                      @ceech yes and no. Skipping the test step is a bad idea. If that step is skipped, people have to resort to asking questions in the forum ;-)

                                      C Offline
                                      C Offline
                                      ceech
                                      Hardware Contributor
                                      wrote on last edited by
                                      #19

                                      @mfalkvidd Of course. Skipping test is a bad idea. It is obvious, though that people who resort to asking questions on the forum have tried the test step several times to try and figure things out for themselves. Maybe if the https://www.mysensors.org/build/raspberry wasn't misleading they would even succeed.

                                      mfalkviddM 1 Reply Last reply
                                      0
                                      • C ceech

                                        @mfalkvidd Of course. Skipping test is a bad idea. It is obvious, though that people who resort to asking questions on the forum have tried the test step several times to try and figure things out for themselves. Maybe if the https://www.mysensors.org/build/raspberry wasn't misleading they would even succeed.

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

                                        @ceech I'll be happy to update the guide if you could be a bit more specific.

                                        C 1 Reply Last reply
                                        1
                                        • mfalkviddM mfalkvidd

                                          @ceech I'll be happy to update the guide if you could be a bit more specific.

                                          C Offline
                                          C Offline
                                          ceech
                                          Hardware Contributor
                                          wrote on last edited by
                                          #21

                                          @mfalkvidd First thing one does is to follow instructions exactly and hope things will work out. They don't. You try a different type of connection. Which one? Why one or the other? Which option among the same type? It doesn't work, either. Now, you are thinking, ok this guide is for several controllers, so how do I adapt it for my specific case.
                                          The point being, you can't adapt the instructions on your own. You have to ask someone who's done it before and knows what commands to use in order to make Gateway connect to the specific controller.
                                          For example: using
                                          --my-gateway=ethernet --my-controller-url-address=YOUR-CONTROLLER-ADDRESS
                                          will never connect your Gateway to Domoticz. How can one know that this is the line to be modified?

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


                                          20

                                          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