Raspberry Pi Ethernet Gateway



  • Hi all,

    is there a working Raspberry Pi Ethernet Gateway out there somewhere ?



  • Tried EasyIoT server @ericvdb? Not my project, but I'm using it now. Simple to set up and use. Just make sure that you use the correct channel for your server and your nodes. Default is set to 95.

    http://iot-playground.com/download



  • I believe TMRh20 mentions this on his blog, could be worth reading
    http://tmrh20.github.io/RF24Ethernet/



  • @algoritm said:

    Tried EasyIoT server @ericvdb? Not my project, but I'm using it now. Simple to set up and use. Just make sure that you use the correct channel for your server and your nodes. Default is set to 95.

    http://iot-playground.com/download

    Thanks for the reply, but as i understood, EasyIot is a controller, not a gateway. (correct me if i'm wrong)

    @gadu said:

    I believe TMRh20 mentions this on his blog, could be worth reading
    http://tmrh20.github.io/RF24Ethernet/

    I'm talking about a MySensors Ethernet Gateway running on the Pi instead of an Arduino.



  • @ericvdb said:

    I'm talking about a MySensors Ethernet Gateway running on the Pi instead of an Arduino.

    +1 I'm amazed nobody put this together yet. It's absolutely useless to have a gateway when we can easily hook up an NRF24L01 to the Raspberry and use it as the gateway/mqtt publisher. There's even the RF24 library for the Pi.

    I was afraid that this was done before and I'm reinventing the wheel, but it seems I should actually get to it and hack something together. So many pieces are there.



  • Well, as a solution in between I now have a Raspberry Pi as an Ethernet gateway by connecting a MySensor Serial gateway (Arduino Pro Mini 8Mhz 3.3V) to the serial pins of the raspberry pi and using ser2net. Works perfectly.
    This allowed me to connect also the status led's. The Arduino Pro Mini is powered from the 3.3V of the raspberry Pi.

    The only restriction is that you can only connect 1 client (controller).



  • I just started getting interested in having some connectivity with my house and originally just wanted to connect the radio directly to the pi. I figured this was a no brainer. Well people are talking directly to arduinos from the pi with the radio module connected directly to gpio. However, they are not really going much farther than proof of concept and connecting one sensor as a test, and simply using the command prompt to query the arduino directly, which is not quite functional.
    I've been finding stuff that is so close to what I want but not quite there.
    I have found a few scripts that mesh gpio into mqtt, but I don't think it's quite what we want.
    I found a few others that turn serial into mqtt the tranceivers use i2c so maybe this would work since you can assign a serial port to the gpio on the pi.
    Here is a way to have tcp/ip over the nrf24l01 http://tmrh20.github.io/RF24Ethernet/
    which could work to at least have everything be on the network.
    I know the answer is out there somewhere but I just don't have the skillset/time/or patients to figure it out, I was hoping more folks would be interested since it would save having to build a separate gateway.


  • Hero Member

    Seriously... what is the added value of having the radio connected directly to the Pi instead of using an Arduino (serial) gateway. Taking into account:

    • The arduino is very stable: timing wise (it is only processing radio messages). The Pi can be very busy with all sorts of things and therefor easily miss messages.

    • The arduino should not cost you more than a few bucks and has a simple and reliable radio and serial interface.

    • the Gateway gets you started with the MySensors concept (including debugging via serial).

    • (personal) I rather have programming fun with the sensors i.s.o.. spending long hours on getting buggy solutions. but hey everybody needs his own challenge.. πŸ™‚

    • Current controllers have support for the Serial (and/or) Ethernet solution.



  • @AWI said:

    Seriously... what is the added value of having the radio connected directly to the Pi instead of using an Arduino (serial) gateway. Taking into account:

    • The arduino is very stable: timing wise (it is only processing radio messages). The Pi can be very busy with all sorts of things and therefor easily miss messages.

    I think if the Raspberry is too busy to process messages it will be too busy to process them after the Arduino sends them. Also looking forward the new Pi 2 is actually ~6 times more powerful with 4 cores.

    • The arduino should not cost you more than a few bucks and has a simple and reliable radio and serial interface.

    It needs an extra power supply, an extra ethernet cable + one more port on my router, consumes about the same space as a Pi (at least an Uno). And while it's reliable, I already have to rely on the Pi's reliability to run my automation anyway.

    • the Gateway gets you started with the MySensors concept (including debugging via serial).

    The controller is still rather a black box for me because of all the magical translations between RF24 packets and MQTT messages. It also required some SoftSPI thing that was very confusing for me, different wiring than the sensors. I'd say it's the weakest point in the simplicity of the whole mysensors project.

    Also every time I try to connect to the MQTT server Arduino with an MQTT client to debug, it breaks the connection to my openHAB (seems it can only handle 1 client?).

    • (personal) I rather have programming fun with the sensors i.s.o.. spending long hours on getting buggy solutions. but hey everybody needs his own challenge.. πŸ™‚

    I keep my current gateway node as well, I don't think I'll find the way to make this work, because I'm not as good in this system, but I would assume that Pi+openHAB as the brain is a common use case, and for that an extra Gateway is not giving any value. But I guess it's not too wise from my part to argue with it when the code doesn't exist. πŸ™‚



  • There are example gateways for Raspberry Pi in the MySensors Raspberry repo on github. You can easily modify e.g. the serial gateway and instead of creating pseudo terminal you would create a network socket and write/read data to/from the socket. πŸ˜‰



  • Just to toss my $0.02 in, there are some big advantages to running the nrf24l01 modules directly on the RPi.

    The radios themselves have three 32-byte FIFO buffers, and can receive data without any interaction from the RPi. It also has vast amounts of memory and processing power compared to Arduino, so can handle much more complex tasks, and manage data more efficiently.

    IMHO the RPi + RF24 is very stable and robust at this point, and is beginning to support a number of Linux platforms directly via spidev and mraa



  • @TMRh20Projects

    I can ask you some suggestion how use rf24 with RPi? I want to use nodejsController bipassing the arduino gateway, and make an RPi controller\gateway.



  • @lollotek Yup, ask away.



  • https://github.com/marceloaqno/Arduino
    Have a look at this fork. It isn't up to date to the mysensors library yet but the Ethernet gateway is a great and stable improvement, that supports interrupts.
    Just make sure to install the current rf24 library first.


  • Hardware Contributor

    For the past 4 months I have been using an RPI2 with a NRF24 directly connected on the GPIO. My controller is Domoticz and the RPI2 also runs the Mysensors serialgateway software for Raspberry Pi. Domoticz sees this as a serial gateway.

    I have RPI2's connected via ethernet and another via wifi to my networks.

    Very happy with both setups, so I made my little interface board available via the openhardware.io forum.



  • @GertSanders Let me see if I got that right:
    You are using the Raspi as the controller for Domoticz and instead of adding a standard serial gateway You add the nrf24 module to the Raspi directly. True?
    If true that's close, but not close enough to what I need: I'd like to use the Raspi as an Ethernet Gateway that is detected
    as such by Domoticz. Can that be done with Your project or can one adapt Your stuff for that?

    Thanks,
    Christoph


  • Hardware Contributor

    @hyla
    I am using my Raspi's with an NRF24l01 connected to the GPIO via a small board I made.
    If you want to use the raspberry purely as a gateway, where do you plan to run your controller ?
    Also, using a raspberry as a gateway only would be a waste of processing and electrial power, since there is an ethernet gateway based on Arduino possible, which takes less electrical power and is just as capable and more stable.



  • @GertSanders said:

    using a raspberry as a gateway only would be a waste of processing and electrial power, since there is an ethernet gateway based on Arduino possible, which takes less electrical power and is just as capable and more stable.

    It's only a waste of power if there's not already an RPi there doing other jobs.. One reason I came here today looking for RPi gateway code is that I already have a pi sitting where I want to put a MySensors ethernet gateway, and I thought I could do without another arduino, power, etc..


  • Hardware Contributor

    @172pilot
    I think you misunderstood my reaction. If the controller software is running on something else then an RPi, then what is the point of a second RPi running solely as a gateway ?
    I combine bout functions in 1 RPi and I'm quite happy with it.
    If my controller was installed on my NAS, then I would use an arduino based ethernet gateway, not an RPi with a nrf24 or rf69 as a gateway.



  • @GertSanders

    Yep.. misunderstood.., I thought you were basically saying "why would you use a pi instead of an arduino when the arduino uses less power, etc..." πŸ™‚


Log in to reply
 

Suggested Topics

  • 1
  • 10
  • 6
  • 3
  • 1
  • 1

13
Online

11.4k
Users

11.1k
Topics

112.7k
Posts