💬 Building a Raspberry Pi Gateway
-
@Tag , The controller must be using something to get the data right? How can we do it directly without using the controller?
-
@hek It looks like development is the default branch in the repository. I was following the build instructions and couldn't figure out why I kept getting "connection refused". Just typing up a troubleshooting post when I saw my log said 2.2.0-beta. Sure enough when I grabbed master(2.1.0) instead it ran fine. Should probably add a checkout in the instructions.
-
@hek It looks like development is the default branch in the repository. I was following the build instructions and couldn't figure out why I kept getting "connection refused". Just typing up a troubleshooting post when I saw my log said 2.2.0-beta. Sure enough when I grabbed master(2.1.0) instead it ran fine. Should probably add a checkout in the instructions.
@pete1450 could you clarify which instructions should be updated?
The instructions at https://www.mysensors.org/about/arduino recommend using the Arduino IDE Board manager, which will get the latest stable version.
Edit: Now I see. The link in the first post in this thread. It doesn't mention the master branch because up until Dec 25th the development branch was required. But now that 2.1 has been released the instructions should indeed use the stable version. I've updated the instructions. Thanks for noticing!
-
@Tag , The controller must be using something to get the data right? How can we do it directly without using the controller?
This is also new for me since i do not send data into any cloud... but i can imagine that you can use MQTT. (see https://www.mysensors.org/build/mqtt_gateway for more details) is important that the receiving side supports MQTT. in this case google is your friend ;)
if you do a ./configure --help you will find you can build the mysensors gateway with MQTT support
./configure --help ... --my-gateway=[ethernet|serial|mqtt] Gateway type, set to none to disable gateway feature. [ethernet] --my-node-id=<ID> Disable gateway feature and run as a node with given id. --my-controller-url-address=<URL> Controller or MQTT broker url. --my-controller-ip-address=<IP> Controller or MQTT broker ip. --my-port=<PORT> The port to keep open on gateway mode. If gateway is set to mqtt, it sets the broker port. ... -
This thread contains comments for the article "Building a Raspberry Pi Gateway" posted on MySensors.org.
I am trying to get the raspi ethernet gateway running but on both my pi 3 (also running openHAB) and the pi B (pretty basic install).
Unfortunately I get the same error on both.
Any ideas what could be going on here?
I am running the latest gateway and the latest raspbian.
mysgw: Starting gateway... mysgw: Protocol version - 2.1.0 mysgw: MCO:BGN:INIT GW,CP=RNNG---,VER=2.1.0 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: connect: Connection refused mysgw: failed to connect mysgw: Eth: connect mysgw: connect: Connection refused mysgw: failed to connect mysgw: Eth: connect -
I am trying to get the raspi ethernet gateway running but on both my pi 3 (also running openHAB) and the pi B (pretty basic install).
Unfortunately I get the same error on both.
Any ideas what could be going on here?
I am running the latest gateway and the latest raspbian.
mysgw: Starting gateway... mysgw: Protocol version - 2.1.0 mysgw: MCO:BGN:INIT GW,CP=RNNG---,VER=2.1.0 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: connect: Connection refused mysgw: failed to connect mysgw: Eth: connect mysgw: connect: Connection refused mysgw: failed to connect mysgw: Eth: connectI am using a Rasp Pi 3 as well.
I can't even proceed further in the tutorial cause of this error cause nothing works after it. -
I am trying to get the raspi ethernet gateway running but on both my pi 3 (also running openHAB) and the pi B (pretty basic install).
Unfortunately I get the same error on both.
Any ideas what could be going on here?
I am running the latest gateway and the latest raspbian.
mysgw: Starting gateway... mysgw: Protocol version - 2.1.0 mysgw: MCO:BGN:INIT GW,CP=RNNG---,VER=2.1.0 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: connect: Connection refused mysgw: failed to connect mysgw: Eth: connect mysgw: connect: Connection refused mysgw: failed to connect mysgw: Eth: connect@marceltrapman @LaMB95
Could you post the complete ./configure command used to configure the gateway? -
@marceltrapman @LaMB95
Could you post the complete ./configure command used to configure the gateway?@marceloaqno Sure, forgot it :)
sudo ./configure \ --my-gateway=ethernet \ --my-controller-ip-address=192.168.1.xx \ --my-port=5003 \ --my-transport=nrf24 -
@marceloaqno Sure, forgot it :)
sudo ./configure \ --my-gateway=ethernet \ --my-controller-ip-address=192.168.1.xx \ --my-port=5003 \ --my-transport=nrf24@marceltrapman Are you sure it's not a problem with your controller?
Have you tried connecting to your controller using telnet?telnet 192.168.1.x 5003 -
@marceltrapman @LaMB95
Could you post the complete ./configure command used to configure the gateway?@marceloaqno !


Is this what you meant? -
@marceltrapman Are you sure it's not a problem with your controller?
Have you tried connecting to your controller using telnet?telnet 192.168.1.x 5003@marceloaqno not sure no.
So, I downloaded telnet on the same raspi that I want to use as the gateway and the issue seems to be that port 5003 is not available.
Funny but how do I solve this.
It can't be an issue with the firewall because it allows all traffic on the internal network. -
@marceltrapman Are you sure it's not a problem with your controller?
Have you tried connecting to your controller using telnet?telnet 192.168.1.x 5003@marceloaqno and the same from the controller to the gateway gives the same error on that port :(
-
@Reza Yes, you can use rs485 in the RPi.
./configure --my-transport=rs485 --my-rs485-serial-port=<YOUR_SERIAL_PORT>For more options, run:
./configure -h -
@marceloaqno !


Is this what you meant?@LaMB95 No, I meant the options you used when you ran ./configure
-
Is it possible to use the second ISP on my raspberypi 3 to connect NRF24L01+ and what will be the wiring diagram, also what have to change in mygsw library
@tiana
"The Broadcom SoC has three independant SPI interfaces, however only one of these is brought out to the GPIO connector, and that one SPI interface has 2 Chip enable lines."
More info here: https://www.raspberrypi.org/forums/viewtopic.php?f=44&t=22608 -
@marceloaqno and the same from the controller to the gateway gives the same error on that port :(
@marceloaqno from the docs I assume it is the gateway that has to open up port 5003 but I guess it does not because it can't connect to the ethernet (for some reason) or am I wrong?
-
@Reza Yes, you can use rs485 in the RPi.
./configure --my-transport=rs485 --my-rs485-serial-port=<YOUR_SERIAL_PORT>For more options, run:
./configure -h@marceloaqno
i means that without arduino and usb port, similar to raspberry gateway ( raspberry +nrf24)
i means connect rs485 module to GPIO raspberry pi :) with domoticz -
@LaMB95 No, I meant the options you used when you ran ./configure
I m sorry I m new to using a raspberry pi and its for a project.
But if this is not what you asked for could you be a little more specific :$

