💬 Building a Raspberry Pi Gateway
-
@marceloaqno After installing broker and gateway fresh, seems to be working. Thanks for your help.
-
@pete1450 Could you send the debug log with the connection errors?
@marceloaqno
Ran as root and made sure I didn't have mysgw already running:rm -r MySensors/ git clone https://github.com/mysensors/MySensors.git --branch master cd MySensors/ ./configure --my-controller-ip-address=192.168.1.136 --my-port=5003 --my-rf24-irq-pin=15 makeroot@raspberrypi:~/downloads/MySensors# ./bin/mysgw -d mysgw: Starting gateway... mysgw: Protocol version - 2.1.1 mysgw: MCO:BGN:INIT GW,CP=RNNG--Q,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: connect: Connection refused mysgw: failed to connect mysgw: Eth: connect -
every few days mysgw randomly dies :(
Jan 19 06:40:01 pi mysgw[17960]: TSF:MSG:READ,5-5-0,s=255,c=3,t=21,pt=1,l=1,sg=0:0 Jan 19 06:40:01 pi mysgw[17960]: Sending message on topic: mysensors/out/1/5/255/3/0/21 Jan 19 06:40:01 pi mysgw[17960]: TSF:MSG:READ,0-5-255,s=255,c=3,t=20,pt=0,l=0,sg=0: Jan 19 06:40:01 pi mysgw[17960]: TSF:MSG:BC Jan 19 06:40:01 pi systemd[1]: mysgw.service: main process exited, code=killed, status=11/SEGV Jan 19 06:40:01 pi systemd[1]: Unit mysgw.service entered failed state. -
@marceloaqno
Ran as root and made sure I didn't have mysgw already running:rm -r MySensors/ git clone https://github.com/mysensors/MySensors.git --branch master cd MySensors/ ./configure --my-controller-ip-address=192.168.1.136 --my-port=5003 --my-rf24-irq-pin=15 makeroot@raspberrypi:~/downloads/MySensors# ./bin/mysgw -d mysgw: Starting gateway... mysgw: Protocol version - 2.1.1 mysgw: MCO:BGN:INIT GW,CP=RNNG--Q,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: connect: Connection refused mysgw: failed to connect mysgw: Eth: connect@pete1450 If you use the --my-controller-ip-address= option, the gateway will act as a client and attempt to conect to the supplied ip and port. If you want the gateway to open port 5003, omit this option.
-
@marceloaqno what is the correct configure option to make this gatway connect to an ethernet gateway and let a serial-only-controller connect to it. I suppose to use the pty option, but didn't got this working. As said above, socat and nodered are no option.
-
@pete1450 If you use the --my-controller-ip-address= option, the gateway will act as a client and attempt to conect to the supplied ip and port. If you want the gateway to open port 5003, omit this option.
@marceloaqno Well that fixed the connection issue. Now I'm just back to square one where pressing start doesn't do anything. Why do I not need to specify my controllers ip? That is the ip for my veralite. Whats the use case for that option.
-
every few days mysgw randomly dies :(
Jan 19 06:40:01 pi mysgw[17960]: TSF:MSG:READ,5-5-0,s=255,c=3,t=21,pt=1,l=1,sg=0:0 Jan 19 06:40:01 pi mysgw[17960]: Sending message on topic: mysensors/out/1/5/255/3/0/21 Jan 19 06:40:01 pi mysgw[17960]: TSF:MSG:READ,0-5-255,s=255,c=3,t=20,pt=0,l=0,sg=0: Jan 19 06:40:01 pi mysgw[17960]: TSF:MSG:BC Jan 19 06:40:01 pi systemd[1]: mysgw.service: main process exited, code=killed, status=11/SEGV Jan 19 06:40:01 pi systemd[1]: Unit mysgw.service entered failed state.@b0rmann Could you provide the following information?
- Your RPi model and which linux distribution you are using.
- gcc version
- The version and options you used to build the gateway (./configure --option)
- The number of nodes on your network that sends messages to the gateway.
- The broker you are using for MQTT and its version
-
@marceloaqno what is the correct configure option to make this gatway connect to an ethernet gateway and let a serial-only-controller connect to it. I suppose to use the pty option, but didn't got this working. As said above, socat and nodered are no option.
@Anduril Sorry, the gateway does not support what you're trying to do.
-
@marceloaqno Well that fixed the connection issue. Now I'm just back to square one where pressing start doesn't do anything. Why do I not need to specify my controllers ip? That is the ip for my veralite. Whats the use case for that option.
@pete1450
I can't help you with this, I've never used the Vera controller. You need to search in the Vera settings where you set this option. If Vera supports being a server and opening a port for the gateway to connect, then you use the --my-controller-ip-address option. -
Does anyone know if the Raspberry implementation have a UserPassword option for ./configure MQTT
-
Does anyone know if the Raspberry implementation have a UserPassword option for ./configure MQTT
@Michael-Curtis Nevermind, I fixed it.... you ned to add :
--my-mqtt-password=<PASS> MQTT password --my-mqtt-client-id=<ID> MQTT client id.Under "cat"
And for the actual options under "opt do"
--my-mqtt-user=*) CPPFLAGS="-DMY_MQTT_USER=\\\"${optarg}\\\" $CPPFLAGS" ;; --my-mqtt-password=*) CPPFLAGS="-DMY_MQTT_PASSWORD=\\\"${optarg}\\\" $CPPFLAGS" ;;then just add those option flags to the ./configure and run make
-
what means "5VReg -> 3.3V" in raspberry? can connect directly to 3.3V or if requied connecto to 5V with regulator to obtain 3.3v?
-
first sorry about the basics question but I think many people have the same questions and can't find the answers:
After connecting the radio (including IRQ on 15pin) and the info LEDs to the GPIO, how to config it?- Do I need to configure all the info on the same command, or can I send the command "./configure --" many times for different configs?
- Do I need to configure it as a MQTT gateway?
- Where did the 127.0.0.1 IP come from?
- Does MQTT use internet connection?
- Why do you talk about Serial Gateway here, once we have a specific type for it? this type is about using GPIO only, isn't it? That is confusing!!!
-
Hi,
Can I use pin 18 (GPIO 24) on my RPi3 for IRQ usage? Should I?
If I compile with --my-rf24-irq-pin=18, no date is received when the gateway starts.
I Cannot use pin 15 because that pin is covered by my Z-wave.me board.
Regards,
Erik -
what means "5VReg -> 3.3V" in raspberry? can connect directly to 3.3V or if requied connecto to 5V with regulator to obtain 3.3v?
@Roberto-Mo-Ca If you are using the nrf24 PA/LNA version you need to use a 5V->3.3V regulator otherwise you can connect to the 3.3v pin.
-
Hi :) Does anybody know how to use MY_SIGNING_NODE_WHITELISTING in gateway raspbery pi? Where I must create/edit white list with my nodes?
@macvictor For the MY_SIGNING_NODE_WHITELISTING, you can uncomment and edit it in MyConfig.h or add it to the examples/mysgw.cpp.
-
first sorry about the basics question but I think many people have the same questions and can't find the answers:
After connecting the radio (including IRQ on 15pin) and the info LEDs to the GPIO, how to config it?- Do I need to configure all the info on the same command, or can I send the command "./configure --" many times for different configs?
- Do I need to configure it as a MQTT gateway?
- Where did the 127.0.0.1 IP come from?
- Does MQTT use internet connection?
- Why do you talk about Serial Gateway here, once we have a specific type for it? this type is about using GPIO only, isn't it? That is confusing!!!
You execute ./configure once with all your options to set your gateway.
You need to decide what type of gateway you want to build: ethernet, serial or mqtt:
https://www.mysensors.org/build/select_gatewayTake a look at the link and let me know if you still have any questions.
-
thaks @marceloaqno but I was wondering there was a new type of gateway named Raspberry Gateway, were we could connect the radio directly on the GPIO and config it locally, without internet, because of that I also would like to know if MQTT uses internet connection.
I actually use a serial gateway connected to Pi USG and it works without internet...
I just want to have only one device...
Thanks