Cannot run MySensors on RPI 3
-
@mfalkvidd Should I try to use the dev version? Also, should I "format" my SD card with a fresh install of Raspbian Stretch Lite?
Do you think this might help?
Also, it does not matter if my Pi runs the controller and MySensors at the same time, right?
-
Download the development version of MySensors and try that. I could not get MySensors to work on a RPI 3 with the 2.1.1 version.
-
There is a note in the raspberry page to use development version. BTW, did you connect the 5v pin to the nrf24 module? It seems so from the picture and if it's the case, say bye-bye to it. Also the capacitor it is better to be closer to the radio module and not on the raspberry gpio
-
Download the development version of MySensors and try that. I could not get MySensors to work on a RPI 3 with the 2.1.1 version.
@mickecarlsson said in Cannot run MySensors on RPI 3:
Download the development version of MySensors and try that. I could not get MySensors to work on a RPI 3 with the 2.1.1 version.
I will try with the dev version and let you guys know again.
@gohan said in Cannot run MySensors on RPI 3:
There is a note in the raspberry page to use development version. BTW, did you connect the 5v pin to the nrf24 module? It seems so from the picture and if it's the case, say bye-bye to it. Also the capacitor it is better to be closer to the radio module and not on the raspberry gpio
Nope, it's connected to 3.3V. Regarding the capacitor, I had it first near the NRF24, but mfalkvidd told me to move it.
But thank you for your inputs, guys. I'll try the dev version and hope it will work.
-
@mickecarlsson said in Cannot run MySensors on RPI 3:
Download the development version of MySensors and try that. I could not get MySensors to work on a RPI 3 with the 2.1.1 version.
I will try with the dev version and let you guys know again.
@gohan said in Cannot run MySensors on RPI 3:
There is a note in the raspberry page to use development version. BTW, did you connect the 5v pin to the nrf24 module? It seems so from the picture and if it's the case, say bye-bye to it. Also the capacitor it is better to be closer to the radio module and not on the raspberry gpio
Nope, it's connected to 3.3V. Regarding the capacitor, I had it first near the NRF24, but mfalkvidd told me to move it.
But thank you for your inputs, guys. I'll try the dev version and hope it will work.
-
Hey all,
So I removed the stable version of MySensors and got the development version.
Let me show you step by step what I did:
sudo rm -r MySensors git clone https://github.com/mysensors/MySensors.git --branch development cd MySensors ./configure --my-transport=nrf24 --my-gateway=mqtt --my-controller-ip-address=[MY-PI-IP] --my-mqtt-publish-topic-prefix=mysensors-out --my-mqtt-subscribe-topic-prefix=mysensors-in --my-mqtt-client-id=mygateway1 make sudo ./bin/mysgw -d[MY-PI-IP] has been changed to my RPI's IP.
The output I got first is this:
pi@rpi-lite:~/MySensors $ sudo ./bin/mysgw -d mysgw: Starting gateway... mysgw: Protocol version - 2.2.0-rc.2 mysgw: MCO:BGN:INIT GW,CP=RNNGL---,VER=2.2.0-rc.2 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: GWT:RMQ:MQTT RECONNECT mysgw: connect: Connection refused mysgw: failed to connect mysgw: GWT:RMQ:MQTT RECONNECT mysgw: connect: Connection refused mysgw: failed to connect mysgw: GWT:RMQ:MQTT RECONNECT mysgw: connect: Connection refused mysgw: failed to connect mysgw: GWT:RMQ:MQTT RECONNECT mysgw: connect: Connection refused mysgw: failed to connect mysgw: GWT:RMQ:MQTT RECONNECT mysgw: connect: Connection refused mysgw: failed to connect mysgw: GWT:RMQ:MQTT RECONNECT mysgw: connect: Connection refused mysgw: failed to connect mysgw: GWT:RMQ:MQTT RECONNECT mysgw: connect: Connection refused mysgw: failed to connect mysgw: GWT:RMQ:MQTT RECONNECT mysgw: connect: Connection refused mysgw: failed to connect mysgw: GWT:RMQ:MQTT RECONNECT mysgw: connect: Connection refused mysgw: failed to connect mysgw: GWT:RMQ:MQTT RECONNECT mysgw: connect: Connection refused mysgw: failed to connect mysgw: GWT:RMQ:MQTT RECONNECT mysgw: connect: Connection refused mysgw: failed to connect mysgw: GWT:RMQ:MQTT RECONNECT mysgw: connect: Connection refused mysgw: failed to connect mysgw: GWT:RMQ:MQTT RECONNECT mysgw: connect: Connection refused mysgw: failed to connect mysgw: GWT:RMQ:MQTT RECONNECT mysgw: connect: Connection refused mysgw: failed to connect mysgw: GWT:RMQ:MQTT RECONNECT mysgw: connect: Connection refused mysgw: failed to connect mysgw: GWT:RMQ:MQTT RECONNECT mysgw: connect: Connection refused mysgw: failed to connect mysgw: GWT:RMQ:MQTT RECONNECT mysgw: connect: Connection refused mysgw: failed to connect mysgw: GWT:RMQ:MQTT RECONNECT mysgw: connect: Connection refused mysgw: failed to connect mysgw: GWT:RMQ:MQTT RECONNECT mysgw: connect: Connection refused mysgw: failed to connect mysgw: GWT:RMQ:MQTT RECONNECT mysgw: connect: Connection refused mysgw: failed to connect mysgw: GWT:RMQ:MQTT RECONNECT mysgw: connect: Connection refused mysgw: failed to connect mysgw: GWT:RMQ:MQTT RECONNECT mysgw: connect: Connection refused mysgw: failed to connect mysgw: GWT:RMQ:MQTT RECONNECT mysgw: connect: Connection refused mysgw: failed to connect mysgw: GWT:RMQ:MQTT RECONNECT mysgw: connect: Connection refused mysgw: failed to connect mysgw: GWT:RMQ:MQTT RECONNECT mysgw: connect: Connection refused mysgw: failed to connect mysgw: GWT:RMQ:MQTT RECONNECT mysgw: connect: Connection refused mysgw: failed to connect mysgw: GWT:RMQ:MQTT RECONNECT mysgw: connect: Connection refused mysgw: failed to connect mysgw: GWT:RMQ:MQTT RECONNECT mysgw: connect: Connection refused mysgw: failed to connect mysgw: GWT:RMQ:MQTT RECONNECT mysgw: connect: Connection refused mysgw: failed to connect mysgw: GWT:RMQ:MQTT RECONNECT mysgw: connect: Connection refused mysgw: failed to connect mysgw: GWT:RMQ:MQTT RECONNECT mysgw: connect: Connection refused mysgw: failed to connect mysgw: GWT:RMQ:MQTT RECONNECT mysgw: connect: Connection refused mysgw: failed to connect mysgw: GWT:RMQ:MQTT RECONNECT mysgw: connect: Connection refused mysgw: failed to connect mysgw: GWT:RMQ:MQTT RECONNECT mysgw: connect: Connection refused mysgw: failed to connect mysgw: GWT:RMQ:MQTT RECONNECT mysgw: connect: Connection refused mysgw: failed to connect mysgw: GWT:RMQ:MQTT RECONNECT mysgw: connect: Connection refused mysgw: failed to connect mysgw: GWT:RMQ:MQTT RECONNECT mysgw: connect: Connection refused mysgw: failed to connect mysgw: GWT:RMQ:MQTT RECONNECT mysgw: connect: Connection refused mysgw: failed to connect mysgw: GWT:RMQ:MQTT RECONNECT mysgw: connect: Connection refused mysgw: failed to connect mysgw: GWT:RMQ:MQTT RECONNECT mysgw: connect: Connection refused mysgw: failed to connect mysgw: GWT:RMQ:MQTT RECONNECT mysgw: connect: Connection refused mysgw: failed to connect mysgw: GWT:RMQ:MQTT RECONNECT mysgw: connect: Connection refused mysgw: failed to connect mysgw: GWT:RMQ:MQTT RECONNECT mysgw: connect: Connection refused mysgw: failed to connect mysgw: GWT:RMQ:MQTT RECONNECT mysgw: connect: Connection refused mysgw: failed to connect mysgw: GWT:RMQ:MQTT RECONNECT mysgw: connect: Connection refused mysgw: failed to connect mysgw: GWT:RMQ:MQTT RECONNECT mysgw: connect: Connection refused mysgw: failed to connect mysgw: GWT:RMQ:MQTT RECONNECT mysgw: connect: Connection refused mysgw: failed to connect mysgw: GWT:RMQ:MQTT RECONNECT mysgw: connect: Connection refused mysgw: failed to connect mysgw: GWT:RMQ:MQTT RECONNECT mysgw: connect: Connection refused mysgw: failed to connect mysgw: GWT:RMQ:MQTT RECONNECT mysgw: connect: Connection refused mysgw: failed to connect mysgw: GWT:RMQ:MQTT RECONNECT mysgw: connect: Connection refused mysgw: failed to connect mysgw: GWT:RMQ:MQTT RECONNECT mysgw: connect: Connection refused mysgw: failed to connect mysgw: GWT:RMQ:MQTT RECONNECT mysgw: connect: Connection refused mysgw: failed to connect mysgw: GWT:RMQ:MQTT RECONNECT mysgw: connect: Connection refused mysgw: failed to connect mysgw: GWT:RMQ:MQTT RECONNECT mysgw: connect: Connection refused mysgw: failed to connect mysgw: GWT:RMQ:MQTT RECONNECT mysgw: connect: Connection refused mysgw: failed to connect mysgw: GWT:RMQ:MQTT RECONNECT mysgw: connect: Connection refused mysgw: failed to connect mysgw: GWT:RMQ:MQTT RECONNECT mysgw: connect: Connection refused mysgw: failed to connect mysgw: GWT:RMQ:MQTT RECONNECT mysgw: connect: Connection refused mysgw: failed to connect mysgw: GWT:RMQ:MQTT RECONNECT mysgw: connect: Connection refused mysgw: failed to connect mysgw: GWT:RMQ:MQTT RECONNECT mysgw: connect: Connection refused mysgw: failed to connect mysgw: GWT:RMQ:MQTT RECONNECT mysgw: connect: Connection refused mysgw: failed to connect mysgw: GWT:RMQ:MQTT RECONNECT mysgw: connect: Connection refused mysgw: failed to connect mysgw: GWT:RMQ:MQTT RECONNECT mysgw: connect: Connection refused mysgw: failed to connect mysgw: GWT:RMQ:MQTT RECONNECT mysgw: connect: Connection refused mysgw: failed to connect mysgw: GWT:RMQ:MQTT RECONNECT mysgw: connect: Connection refused mysgw: failed to connect mysgw: TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0: mysgw: !TSF:MSG:LEN,0!=7 mysgw: TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0: mysgw: !TSF:MSG:LEN,0!=7 mysgw: TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0: mysgw: !TSF:MSG:LEN,0!=7 mysgw: TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0: mysgw: !TSF:MSG:LEN,0!=7then it started going non-stop repeating the following output:
mysgw: GWT:RMQ:MQTT RECONNECT mysgw: connect: Connection refused mysgw: failed to connect mysgw: TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0: mysgw: !TSF:MSG:LEN,0!=7 mysgw: TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0: mysgw: !TSF:MSG:LEN,0!=7 mysgw: TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0: mysgw: !TSF:MSG:LEN,0!=7 mysgw: TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0: mysgw: !TSF:MSG:LEN,0!=7 mysgw: TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0: mysgw: !TSF:MSG:LEN,0!=7 mysgw: GWT:RMQ:MQTT RECONNECT mysgw: connect: Connection refused mysgw: failed to connectNow I have a problem with the gateway. Did I configure something wrong? Or did I forget a step?
All help is very much appreciated :)
-
I struggled with RPi gateway for ages without success. The easiest solution by far is to run the gateway on arduino and interface it to RPI through a serial gateway. Its not a very elegant solution but works. I did some investigation and came to the conclusion that the problem with RPi gateway is to do with the low level library that communicates with the radio but never found a fix.
-
I struggled with RPi gateway for ages without success. The easiest solution by far is to run the gateway on arduino and interface it to RPI through a serial gateway. Its not a very elegant solution but works. I did some investigation and came to the conclusion that the problem with RPi gateway is to do with the low level library that communicates with the radio but never found a fix.
@grdl said in Cannot run MySensors on RPI 3:
I struggled with RPi gateway for ages without success. The easiest solution by far is to run the gateway on arduino and interface it to RPI through a serial gateway. Its not a very elegant solution but works. I did some investigation and came to the conclusion that the problem with RPi gateway is to do with the low level library that communicates with the radio but never found a fix.
Hi, thanks for your answer.
If you are telling me that you have had the same issues as me, I am willing to do your method. True, not an elegant solution but I just want it to get up and running...
When you say "run the gateway on arduino and interface it to RPI through a serial gateway", do you mean you built a serial gateway as mentioned here: https://www.mysensors.org/build/serial_gateway and then with an USB cable you connect it directly to your RPI? Am I understanding this correct?
If yes, could you please tell me which parameters you have used while building your MySensors on your RPI. Would this be correct:
./configure --my-transport=nrf24 --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyMySensorsGatewayDid you leave the value for --my-serial-pty was shown above? Did you add any other parameters?
Sorry for asking so many questions but I cannot fully grasp the concept of MySensors without MQTT.
I appreciate your response and thank you in advance :)
-
I've been running the Ethernet gateway (port 5003) on my raspi without issues for several months now.
@kkanedaa It looks like the development version finally works with your nrf module. Regarding the MQTT connection refused: Are you sure your MQTT broker does not need a username and password?
-
I struggled with RPi gateway for ages without success. The easiest solution by far is to run the gateway on arduino and interface it to RPI through a serial gateway. Its not a very elegant solution but works. I did some investigation and came to the conclusion that the problem with RPi gateway is to do with the low level library that communicates with the radio but never found a fix.
-
This weekend a had also issues with nrf24 on rpi3. I'm using openhabian image and it was all working ok. But my sd card got corrupted and i had to reinstall openhabian. So I downloaded the newest image burned and ran my setup script - which should give me running and restored setup of OpenHAB, MySensors and couple more. But mysensors didn't work ... I found that the mysgw was failing to initialise nrf module (!TSM:INIT:TSP FAIL) - wierd because even with the binary that was working in previous setup i got the same error ... same hardware only new software ... So I connected my oscilloscope to spi pins and to my amazement there was no life on MOSI pin ... I even try with python to send something trough SPI - the same result. Then I compiled the mysgw with BCM driver ... and it worked ! Even better, I recompiled again with SPIDEV driver AND STILL WORKED !!!
So @kkanedaa try to compile with BCM driver - maybe it will work, for me it did.
-
This weekend a had also issues with nrf24 on rpi3. I'm using openhabian image and it was all working ok. But my sd card got corrupted and i had to reinstall openhabian. So I downloaded the newest image burned and ran my setup script - which should give me running and restored setup of OpenHAB, MySensors and couple more. But mysensors didn't work ... I found that the mysgw was failing to initialise nrf module (!TSM:INIT:TSP FAIL) - wierd because even with the binary that was working in previous setup i got the same error ... same hardware only new software ... So I connected my oscilloscope to spi pins and to my amazement there was no life on MOSI pin ... I even try with python to send something trough SPI - the same result. Then I compiled the mysgw with BCM driver ... and it worked ! Even better, I recompiled again with SPIDEV driver AND STILL WORKED !!!
So @kkanedaa try to compile with BCM driver - maybe it will work, for me it did.
-
@rozpruwacz did you use mysensors 2.1 or 2.2?
@gohan I was trying both master and developement branches (I believe ...).
-
@gohan I am sure that the old binary mysgw that was working before openhabian update and was not working after openhabian update was 2.1.
-
I've been running the Ethernet gateway (port 5003) on my raspi without issues for several months now.
@kkanedaa It looks like the development version finally works with your nrf module. Regarding the MQTT connection refused: Are you sure your MQTT broker does not need a username and password?
Hello all,
Thank you for all the replies. It is very much appreciated :)
@reinhold said in Cannot run MySensors on RPI 3:
I've been running the Ethernet gateway (port 5003) on my raspi without issues for several months now.
@kkanedaa It looks like the development version finally works with your nrf module. Regarding the MQTT connection refused: Are you sure your MQTT broker does not need a username and password?
I am starting to think that I am misunderstanding the concept of MySensors. I thought that the RPI would handle both RF24 communication and MQTT. That is not correct...right?
And your Ethernet gateway, did you use an Arduino to make the gateway and connected it to your RPI, or is the RPi itself the gateway?
Can't I just install Mosquitto on my RPI and use it as a gateway? I'm really confused here.
All I did was add MySensors (dev) to a fresh install of Raspbian Stretch Lite.
Could you please tell me what exactly you did, I would appreciate it a lot.
@rozpruwacz Unfortunately I am still fairly new to this, and I do not know what you mean by BCM and SPIDEV... but my ultimate goal is what you are doing: using MySensors in combination with openHABian (but currently I am trying with MyController since it seems easier).
Anyways, I hope some of you guys can help me out setting up MySensors on RPI3 :)
Thanks again for all the replies.