💬 Building a Raspberry Pi Gateway
-
@gohan, Thank you! I got it to work. First I tried with the development branch and it didn't work either, then I used the following instructions https://forum.mysensors.org/topic/1151/tutorial-raspberry-pi-nrf24l01-direct-connection
And when that didn't work either I rechecked the wiring which ended up being the reason for it to fail previously, "faulty wires".
I got it to work with the master branch.pi@raspberrypi:~/MySensors $ sudo ./bin/mysgw -d
mysgw: Starting gateway...
mysgw: Protocol version - 2.1.1
mysgw: MCO:BGN:INIT GW,CP=RNNG---,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 -
Hi.
I have a Raspberry Pi already configured as gateway, but I don't know how to interact with. I means, how can I read incoming data from? I tried open /dev/ttyMySensorsGateway as a common serial port but I got a message error:
cu: open (/dev/ttyMySensorsGateway): Permission denied
cu: /dev/ttyMySensorsGateway: Line in use
With 'ps ax' command I can see only '/usr/local/sbin/PiGatewaySerial -d' running as a deamon.
Could someone explain me what's ne next step for? -
Hi.
I have a Raspberry Pi already configured as gateway, but I don't know how to interact with. I means, how can I read incoming data from? I tried open /dev/ttyMySensorsGateway as a common serial port but I got a message error:
cu: open (/dev/ttyMySensorsGateway): Permission denied
cu: /dev/ttyMySensorsGateway: Line in use
With 'ps ax' command I can see only '/usr/local/sbin/PiGatewaySerial -d' running as a deamon.
Could someone explain me what's ne next step for?Welcome to the MySensors community @Djames-Suhanko
It looks like you are using the Raspberry Pi gateway for MySensors 1.5. If you are just starting out, I suggest you use the gateway for the current version instead. Documentation: https://www.mysensors.org/build/raspberry
That version of the gateway has a debug mode where you can see the messages in the console.
The next step would be to select a controller. Information about this is available at https://www.mysensors.org/about/network
-
I'd compile it as ethernet gateway, follow the guide on how to configure the parameters, then you can use MySController (search the forum, there is a topic with download link) and use that to connect to it
@gohan Thank you to answer! Good tip, I will do that!
-
Welcome to the MySensors community @Djames-Suhanko
It looks like you are using the Raspberry Pi gateway for MySensors 1.5. If you are just starting out, I suggest you use the gateway for the current version instead. Documentation: https://www.mysensors.org/build/raspberry
That version of the gateway has a debug mode where you can see the messages in the console.
The next step would be to select a controller. Information about this is available at https://www.mysensors.org/about/network
@mfalkvidd Yes, I'm using 1.5. Thank you for suggest me the newer version. I will update it today!
-
Hello, all!
I read a lot of comments to find a solution to my problem, but seems it's something that I couldn't understand yet.The old version was working in my Raspberry Pi using Raspbian Wheeze, so, to install the new version i updated my system until the latest version (Raspbian Stetch). I could compile MySensors, but I'm getting the common error when testing with mysgw -d:
"MYSGW: MCD:BGN INIT GW, CP=RNNG---,VER-2.1.1" and so on.I used this parameters in configure:
./configure --my-transport=nrf24 --my-gateway=ethernet
--my-port=5003 --my-controlle-ip-address=192.168.1.2
--my-gateway=mqtt --my-mqtt-publish-topic-prefix=mysensors-out
--my-mqtt-subscribe-topic-prefix=mysensors-in
--my-mqtt-client-id=mygateway1I couldn't find a solution yet. Can someone help me?
-
Hello, all!
I read a lot of comments to find a solution to my problem, but seems it's something that I couldn't understand yet.The old version was working in my Raspberry Pi using Raspbian Wheeze, so, to install the new version i updated my system until the latest version (Raspbian Stetch). I could compile MySensors, but I'm getting the common error when testing with mysgw -d:
"MYSGW: MCD:BGN INIT GW, CP=RNNG---,VER-2.1.1" and so on.I used this parameters in configure:
./configure --my-transport=nrf24 --my-gateway=ethernet
--my-port=5003 --my-controlle-ip-address=192.168.1.2
--my-gateway=mqtt --my-mqtt-publish-topic-prefix=mysensors-out
--my-mqtt-subscribe-topic-prefix=mysensors-in
--my-mqtt-client-id=mygateway1I couldn't find a solution yet. Can someone help me?
-
wow, it's was really fast! Thanks to answer. I'm use an ethernet interface. It's up but have no cable on their. I didn't install a controller yet, so, is there no problem yet, right?
Sorry that, I'm really a newbie using MySensors.[updating]
ysgw: Starting gateway...
mysgw: Protocol version - 2.1.1
mysgw: MCO:BGN:INIT GW,CP=RNNG---,VER=2.1.1
mysgw: TSM:INIT
mysgw: TSF:WUR:MS=0
mysgw: !TSM:INIT:TSP FAIL
mysgw: TSM:FAIL:CNT=1
mysgw: TSM:FAIL:PDT
mysgw: TSM:FAIL:RE-INIT
mysgw: TSM:INIT
mysgw: !TSM:INIT:TSP FAIL
mysgw: TSM:FAIL:CNT=2
mysgw: TSM:FAIL:PDT -
@Djames-Suhanko said in 💬 Building a Raspberry Pi Gateway:
--my-controlle-ip-address
this also is not necessary. Also for now remove all these --my-gateway=mqtt --my-mqtt-publish-topic-prefix=mysensors-out
--my-mqtt-subscribe-topic-prefix=mysensors-in
--my-mqtt-client-id=mygateway1
and use it as ethernet gateway to keep it simple -
Ok, I will try it right now!
-
Hello folks,
my past experience is using nrf24 library at https://github.com/Blavery/lib_nrf24, and i was able to send/receive "text" data (or "string" data) in between Raspi3 (master node) and Arduino (slave). And this is a big issue, because what i need is numerical data (float or integer), not text data, so Raspi 3 can process the numerical data (such as to do the plotting), and based on the processed data to make some decisions. My raspi 3 is controlling a moving robot. Can you advise appropriate nrf24 library for raspberry pi and Arduino, and sample codes for this kind of applicaitons? Thanks -
Hello folks,
my past experience is using nrf24 library at https://github.com/Blavery/lib_nrf24, and i was able to send/receive "text" data (or "string" data) in between Raspi3 (master node) and Arduino (slave). And this is a big issue, because what i need is numerical data (float or integer), not text data, so Raspi 3 can process the numerical data (such as to do the plotting), and based on the processed data to make some decisions. My raspi 3 is controlling a moving robot. Can you advise appropriate nrf24 library for raspberry pi and Arduino, and sample codes for this kind of applicaitons? ThanksWelcome to the MySensors community @erobot !
Not sure how you found us, but the library we use here is...MySensors. It certanly does what you describe. The best way to start is to read how MySensors works at https://www.mysensors.org/about and then go on to the many build examples and build your first node.
-
hi there, somehow my gateway seems to stop receiving data after a day or so from my sensors,
restarting the service seems to solve it for a time, how can i troubleshoot this issue ? -
hi there, somehow my gateway seems to stop receiving data after a day or so from my sensors,
restarting the service seems to solve it for a time, how can i troubleshoot this issue ?Same trouble for me. I use mySensors since 2 years and I have no problem with my Arduino Gateway. But from now 2 weeks, I try to use a pi gateway. It's working well but sometime, don't no why, my nrf24 stop to receive messages. Just restarting mygw service and re-work again. I don't see nothing anormal in my log, stop randomlly after 1 or 2 days.
Maybe a power issue to nrf24, I will try to add capacitor just for testing if can resolve this problem.
-
Same here too. With Rpi3 gateway. Would stop for hours, maybe start agian for a hour or two and then stop.
Have been running debug mode for last day, no idea what happened, but been stable so perhaps something in the update/upgrade made a problem and has now been fixed.
Will keep an eye on here and let you know if I find anything. -
Looks as if it happened after updating Home Assistant, but that should be 2 different things right ?