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

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

@marceloaqno WOWWW
now I understood... but I think this is not clear on the build steps...
I choose a Serial Gateway, but on that lines, they say:
"If for some reason you can't use the GPIO pins of the Raspberry Pi, you could connect the radio to a arduino with the GatewaySerial sketch and feed the pi through a serial port:"

So I assumed the serial gateway is the same I already use...
So, where do I get directions to config a serial gateway with the radio attached to the GPIO?

I have a question regarding the --my-serial-groupname option: since I start the gateway under an user account with sudo, the gateway device ([EDIT] symlink) will be created with ownership root:root. Shouldn't it be created with root:dialout (as I chose dialout as group in my case)?

I was wrong from the beginning on, since I thought my configuration for the gateway was correct because of --my-serial-groupname=dialout - but that was not compiled. I edited now the mysgw.cpp manually (there was tty instead of dialout; and of course there was all the time the warning when compiling...). Now it works! Without chmod, or chowning anything later!

@marceloaqno Thank's for you help. I have other question.. general I try configure my gateway to work with security & signing, but they doesn't work. Where is problem? On the bottom i send point what it do it:

0 MCO:BGN:INIT REPEATER,CP=RNNRAS-,VER=2.1.1
4 TSM:INIT
5 TSF:WUR:MS=0
11 TSM:INIT:TSP OK
13 TSF:SID:OK,ID=105
15 TSM:FPAR
16 Will not sign message for destination 255 as it does not require it
58 TSF:MSG:SEND,105-105-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
2065 !TSM:FPAR:NO REPLY
2067 TSM:FPAR
2068 Will not sign message for destination 255 as it does not require it
2110 TSF:MSG:SEND,105-105-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
4117 !TSM:FPAR:NO REPLY
4119 TSM:FPAR
4120 Will not sign message for destination 255 as it does not require it
4162 TSF:MSG:SEND,105-105-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
6169 !TSM:FPAR:NO REPLY
6171 TSM:FPAR
6172 Will not sign message for destination 255 as it does not require it
6214 TSF:MSG:SEND,105-105-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
8221 !TSM:FPAR:FAIL
8222 TSM:FAIL:CNT=1
8224 TSM:FAIL:PDT

@Teknor I tend to agree something is wrong, but I think it really on depends how many nodes and how often you're sending data.
rpi3 + GPIO nrf24l01 + openhab2 + 8 nodes + packet received, on average 1 / 5s :

After updating domoticz to beta version I finally have the MQTT working with controller and I can see the sensor node seding in data: my question now is how to I debug the gateway if it is running as a service on the RPI without messing things up?

@marceloaqno I am trying to get a Pi 3 working with MySensors 2.1.1 and nrf24l01 and using your updated wire guide, but all I get as output is the following:
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 FAIL
mysgw: TSM:FAIL:CNT=1
mysgw: TSM:FAIL:PDT
[The output repeats itself, increasing the CNT every time, while at the same time one of the cores on the Pi 3 is running at full CPU utilization.]

By reading earlier comments I assume this is a wiring problem. One possible cause is inconsistency between

and

where the first picture indicates that pin 24 and pin 26 should be used, while the second indicates pins 22 and 24 should be used. However, I have tried both options but I still get the same output (I used different nrf24's for the different setups, in case the nrf24 got burned from the first setup).

I have VCC from nrf24 connected to pin 17 on the Pi 3 and GND connect to pin 25.

Any suggestions on what to try next?
[The Pi 3 is running Raspbian with Pixel. For information, I already have a running Arduino with MySensors MQTT GW and a simple node with MySensors and DHT22. From this I know that by nrf24 chips works when being fed with 3.3V.]

I have connected my nrf24 like the secon table you posted and it is working but I am using an "adapter" for nrf24 with a socket and has voltage regulator + capacitors, so if you don't have any cap on the radio module, I'd suggest you put one on (try from a 4.7 uF up to 47 and see if anything changes)

After updating domoticz to beta version I finally have the MQTT working with controller and I can see the sensor node seding in data: my question now is how to I debug the gateway if it is running as a service on the RPI without messing things up?

I have my gateway on a headless pi 3, no monitor, GUI or keyboard. (I don't care for the nest of wires connection to the pi.) I also use MQTT which is very reliable.

An easy way to see the full MQTT traffic is to not start (or kill if it starts on boot) the MQTT server in the background, and start it in the console you can monitor. This won't impact Domotics one bit. In my case I do this by invoking "mosquitto -d" in the terminal

A simple way to monitor MQTT once its up and running is to look at the Domotics Log on the Setup menu.

Another way to watch it is to, in a terminal window such as running ssh from your computer, use MQTT "sub" in your terminal to see the MQTT traffic both ways to and from Domotics. If this isn't familiar, you need to learn it, (read the MQTT docs) and it's quite simple. Example might be "ssh pi@rpi.local" or "ssh <IP address>" from a computer on the local network, assuming the user is named pi and the pi is named "rpi"

Your MQTT topic must match what is in the sensor node sketch, the gateway sketch, and the domotics MQTT config. In my case I use "mosquitto_sub -d -v -t domoticz" and everything starts showing in real time in the terminal window.

MQTT is a bit more fiddly to set up but it's nice that different environments can push sensor data into the same MQTT server, in my case MySensors and ESP Easy.

@Grubstake
I am using mqtt fx from pc and subscribing to topic # so I get the full traffic of what is going on, but I haven't had time lately to compare if you get same log details as the myscontroller connected to ethernet gateway or starting the gateway on rpi with debug flag

I am trying to connect NRF24L01+ and Raspberry Pi 2 (Model B+). I am confuse about pin 22/24 too. In the diagram it shows "SPI0 CS0" and "SPI0 CS1" but these two pins aren't exist in NRF24L01+. How should I connect the pin? I connect Pi2 pin 24 to CS and Pi2 pin 26 to CE (Not sure it is correct)? Here is the message from mysgw:

@ccy Look at the chart below "NRF24L01+ Radio". That shows the PIN numbers on the Pi and the pin labels on the radio to interconnect. Pay no attention to the labels on the RPi generic pinout diagram except the PIN numbers. The RPi SPIO labels are not what you are looking for. And be sure to use the chart for the correct RPi model.

@ccy
Being 2.4G RF doesn't mean it is NRF24L01 compatible also without knowing what channel is using will make it even more difficult. So, unless you want to make a Mysensors LED Controller, I think you are out of luck if you want to directly control your existing one with a RPI and the mysensors gateway. Either way this is OT.

Has anyone experience with using the NRF module on different pins than default? I'm asking because I wonder if I can connect a GPIO-connected touch TFT (which would use the 2 CE lines for the touch and display interfaces) together with the NRF - by hooking the MISO/MOSI/SCLK to the default pins (and thus sharing them between the TFT and NRF) and defining free pins for the CE and CS lines in the ./configure script when compiling the gateway code...?!

Or maybe using the SPI1 by first enabling it as laid out in this blog post - but how to proceed from there? (How to tell the gateway code to use SPI1?)

Hi
Is anyone else having this same problem on Rpi3?: Gateway works ok after "sudo make install" with openHAB. With "sudo ./bin/mysgw -d" I can get debug log visible and log works ok.
But if I run "sudo systemctl enable mysgw.service" after "sudo make install", debug log start showing endlessly "mysgw: accept: Bad file descriptor". So debug log function gets destroyed and it can't be used anymore. I have made several clean installations and every time this same happens.
Br
Tommi

Silly questions, I'm a little bit confuse.
I have a serial Gateway running with arduino nano + nrf24 and a raspberry pi with domoticz on board. The link between domoticz & Gateway is done via USB <=> serial port (/dev/ttyUSB0). This setup runs like a charm.

Now, I would like to access to my Gateway via the network because I would like to use "Over The Air " functionnality with MYSController.

Can I install MySensors Gateway on the raspberry and keep the arduino + nrf24 connected via usb ?? For the moment, I can not use GPIO port.

If for some reason you can't use the GPIO pins of the Raspberry Pi, you could connect the radio to a arduino with the GatewaySerial sketch and feed the pi through a serial port:

@romeo01 I think that connecting nrf24 directly to arduino and compile mysgw as ethernet gateway is the cleanest solution (I have it as MQTT and it is working fine, but ethernet is the same). Keep in mind that you'd better use one of those adapters 5v-3.3v for nrf24 chips + capacitor because the 3v output of raspberry isn't very suited for the task.

When talking about this Raspberry Pi Gateway, I suppose, that its just connecting the NFR24L01+ to the Raspberry Pi GPIO and run

./bin/mysgw -d

right? On my Pi it does not work this way, maybe the NFR24L01+ is not ok. Instead I am running an external esp-wifi-gateway, but a direct gateway seems the better solution to me.
So did I get it right, that I can use a NFR24L01+ connected to the Raspberry PI GPIO without any external gateway? If so, what are the parameters for building the mysgw daemon? I tried this one:

@gohan Been trying to find my old post to tell you all how it got with my rpi and nodes that did not register. I bougt some voltage regulators LM350. used the 5v output insted of 3.3 V but still no luck to get node to register. when messauring volatage when GW send awnser it drops way below 3.3v. I think voltage output from rpi just is to bad. So I bought a nodemcu for GW instead and it works like a sharm

@dirkc I don't know where you got those pin numbers but they don't look like the ones on the guide. In addition you don't have to use spi driver. The PA version of nrf24 are quite a pain to get them working, so I suggest you first test with regular modules and then upgrade to PA

I'm having issues with the LED setup as shown on the page. The LEDs are just constantly on even though everything looks like it's setup just like the picture. I'm new at this so I could be doing something stupid.

However, I found out that the DI00 (=IRQ) on the RFM69 never gives a rising edge...
I'm suspecting that the RFM69 is not being initialised properly... I added some debugging in the RFM69 code to see what registers are being written and read:

I installed on an old RPI1 (clean Rasbian install). Same results as on my Domoticz RPI-3.

Setup the original RPI3 as a node, using the 2.2.0-beta code. I verified that in this case the RFM69HW actually transmits (I can hear it burst on 868.000 MHz). However, it is unable to connect to an existing Arduino 2.1.1 gateway.

I built an Arduino 2.2.0-beta serial gateway. Even then, the RPI as a node fails to connect to the 2.2.0-beta serial gateway.

I built an Arduino 2.2.0-beta node. This node is able to connect to the above gateway.

There seems to be something different in the radio network between the RFM69HW on the RPI and the RFM69HW on the Arduino. But I'm unable to find out what the difference is :-(.

The RPI RFM69HW will not communicate with the Arduino RFM69HW. When the RPI is a gateway, the RFM69HW will not physically interrupt when another node is trying to connect. When the RPI is a node, the RFM69HW on the ARduino does not interrupt either.

Did anyone get the RFM69HW working on the RPI? I'd really like to get this beautiful piece of code working!

@gohan There are no stupid questions, right :-)? But perhaps a stupid answer: no, I did not use any logic convertors. The RFM69 is 3.3V and as far as I know, so are the GPIO pins on the RPI. But I might be mistaken, of course... Should I use logic convertors?

At the moment I have no idea where it fails. Perhaps I need to give it a rest for a couple of days to think it over...

I followed the steps as given on the web site (git branch development). Connected the RFM radio (7 wires: Vcc, GND, MOSI, MISO, SCK, NSS, DI00). Only modified MyConfig.h with regard to the NETWORKID (100 --> 101; my 'production' MySensors runs at 100) and enabling "MY_DEBUG_VERBOSE_RFM69". I configured with: