Connecting Gateway to Domoticz
-
@mfalkvidd It's a good advice, unfortunately it didn't resolve the problem.
-
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.
-
@mfalkvidd It's a good advice, unfortunately it didn't resolve the problem.
-
@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?@mfalkvidd Right. This is the Domoticz's part of the setting

And I configured Gateway like this:
./configure --my-transport=nrf24 --my-gateway=ethernet --my-controller-ip-address=192.168.1.120make
sudo make installsudo systemctl enable mysgw.service # << adding to boot
sudo systemctl start mysgw.service # << starting -
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.
-
@mfalkvidd Right. This is the Domoticz's part of the setting

And I configured Gateway like this:
./configure --my-transport=nrf24 --my-gateway=ethernet --my-controller-ip-address=192.168.1.120make
sudo make installsudo systemctl enable mysgw.service # << adding to boot
sudo systemctl start mysgw.service # << starting@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 -
@mfalkvidd Right. This is the Domoticz's part of the setting

And I configured Gateway like this:
./configure --my-transport=nrf24 --my-gateway=ethernet --my-controller-ip-address=192.168.1.120make
sudo make installsudo systemctl enable mysgw.service # << adding to boot
sudo systemctl start mysgw.service # << starting@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 connectwhich shows that the gateway is unable to connect to the controller.
-
@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 connectwhich shows that the gateway is unable to connect to the controller.
@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 -
@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 -
@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.
-
@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.
-
@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?