Ethernet vs Serial gateway performance.



  • Hello

    It is kind of a silly question but does anyone have any lesson learned regarding which gateway can handle packets better and also regarding serial port stability.

    For example if some packets were missed when using serial and after switching to ethernet everything was fine.

    Personally I have used serial for a short period with OpenHab. My problem was that sometimes the usb port in the laptop (windows) stops working and I had to disable and enable it again. Thus I was afraid to face the same problem usinh Raspberry pi. Thus I am using Ethernet.

    But Currently for ease of hardware assembly I want to use Serial again but would like you to share your experience with using Serial gateway and whether it is stable i.e. won't stop, and also can handle packets (maybe someome can define the minimum number of packets per second which the Serial can handle)

    Thanks.



  • you have any experience to tell me which is better please ? @mfalkvidd


  • Mod



  • @mfalkvidd Thanks for the links.

    So this means that you have no trouble using serial gateway or you mean your setup is using raspberry pi + nrf like the second link ?


  • Mod

    I am using the direct gpio connection on my 5 Raspberry Pi's.



  • @ahmedadelhosni I think it is a matter of taste. You can either emulate GW with a software or have it separate (Ethernet). With the latest RPi 3 performance is not an issue.

    Personally, I like Ethernet GW for several reasons. 1) Serial GW was lacking development (MYS 1.4 ver) 2) If there are software issues (like 100% processor usage) you won't be able to receive/send anything.



  • @mfalkvidd 5 ? What 5 πŸ™‚ ?



  • @alexsh1 I have not used MYS yet. Isnt it for OTA updates ?



  • @ahmedadelhosni said:

    @alexsh1 I have not used MYS yet. Isnt it for OTA updates ?

    It is not MYS connector, it is MySensors v1.4 ;-0


  • Mod

    @ahmedadelhosni said:

    @mfalkvidd 5 ? What 5 πŸ™‚ ?

    Yes πŸ™‚ One at home, four at work in different offices (GΓΆteborg, Stockholm, MΓΌnich and Tulsa)



  • @mfalkvidd since your first answer I was wondering what could you do at home with 5 GW !!!
    Thanks for clearifying things up πŸ™‚


  • Mod

    @mfalkvidd that's a lot of plants to monitor :bowtie:


  • Mod

    @Yveaux Indeed. I've got requests from one partner in New York and one in California as well, will configure gw's for them and ship next week. Next up is Bangalore, India. It is a really fun project πŸ™‚
    Status for the plants can be seen live here if anyone is curious. Just click the big "PRESS HERE TO ACCESS THE DEMO SYSTEM" button and you'll be logged in.

    Screen dump:
    0_1457125970743_demo.png


  • Mod

    @mfalkvidd nice! Thanks for the link!



  • WOOOW πŸ™‚ This is really great.

    I do really want to switch to pi + nrf like in your tutorial, but I need to add signing ( as I have asked before ) πŸ™‚
    Maybe I will begin first with running it and then see how to enable the singing.

    THanks for your help.



  • I have Domoticz with a RFlink (433mhz kit with aurel transiever on a arduino mega). Its connected to my raspberry pi 2 with Jessie trough USB. This works great. Domoticz always sees the RFlink kit, and communication works flawless.

    After reading al lot about mysensors i ordered a whole lot of of arduino and nRF24L01stuff. After reading this topic, i still dont see any real reasons for choosing USB(serial) or Ethernet.

    • I will place my mysensors gateway next to my Raspberry with Jessie
    • For not i only want to acces my nRF24L01 mysensor network with Domoticz
    • Power usage should be as low as possible
    • Connecting the gateway with Domoticz should be as plug and play as possible
    • I dont care about the extra costs of a ethernet gateway

    Next to the above, i have a small preference for a USB gateway, so i dont have to be carefull with IP addresses, configs, etc.

    What are the advantages or disadvantages between a USB(serial) gateway, and a Ethernet gateway? I'm planning to use a Arduino nano, or a UNO.

    Your advice is very welcome!



  • @Kristiaan-Nugteren said:

    What are the advantages or disadvantages between a USB(serial) gateway, and a Ethernet gateway? I'm planning to use a Arduino nano, or a UNO.

    This is really a loaded question. I suppose there are pros and cons - personally I wanted to have a separate GW with an IP address. Additionally, the Ethernet GW is updated regularly. Pros of a serial GW are 1) simplicity 2) all in one design 3) no need for a separate box/PSU. On the other hand, it is not updated regularly. I think the latest software when I looked at it in December 2015 was MySensors v1.4


  • Admin

    On the other hand, it is not updated regularly

    I don't really understand the argumentation here, why should the serial gateway be updated regularity? It's a good sign you don't have to do frequent updates of it.

    The serial gateway is much simpler than the ethernet variant => Less can go wrong. πŸ™‚



  • @hek

    I am not suggesting this is good or bad. This is the fact that one has got 1.5 or 1.6 (dev) and the other one only 1.4 unless anything changed.

    I did experience issues with the serial set-up. I think it is due to the fact that I have multiple scripts running on my RPi and it was more due to one of those scripts taking too much processing power and not due to the serial software.



  • @alexsh1 What do you mean by not updates regulary ? You mean it updates on serial interrupts while ethernet is always running in a loop ?



  • @alexsh1

    So what kind of updates do these gateways get? Are these needed to improve stability and security? If yes, its understandable that the ethernet gateway needs more updates.

    If the updates bring new functionality and compatibility for the gateways, it's of course a very good reason to those the version that gets the most updates.

    If i design a new sensor, or copy a new design, what part of the software will be responsible for the sensor to show up in domoticz?

    • Does the gateway runs software that needs to be compatible with the sensor? So if i design a new sensor, lets say a weight scale, will the gateway process units in KG?
    • I run domoticz on my Raspberry with Jessie. Do i need to add new code or software to the Raspberry to work, or doesn't the raspberry run any mysensor software at all? (Just the serial USB software)
    • Will domotics be responsible to recognize the type of sensor? So will new type of sensor require a update or heavy customization on the build-in mysensor software?

    Depending on what part of the software handles what, it can be very important to take the gateway with the most updates.


  • Mod

    Gateways don't have much intelligence. They forward all information. The 1.4 gateway works perfectly with sensors running 1.5.x. You can see it a bit like your home router. You don't need to upgrade your router if you upgrade your computer from Windows XP to Windows 10.

    If there are upgrades to the MySensors serial protocol, the gateway might need to be upgraded, just like you might need to upgrade your home router if you want to use ipv6. One such example is signing, which requires 1.5. If you want to use signing, you need a 1.5 gateway. If you don't use signing, 1.4 works fine even with the new sensor/variable types that were introduced in 1.5 (V_TEXT/S_INFO for example).

    Hope this helps.



  • @Kristiaan-Nugteren said:

    @alexsh1

    So what kind of updates do these gateways get? Are these needed to improve stability and security?

    No, this is just MySensors protocol version.
    As @mfalkvidd said If there are upgrades to the MySensors protocol, the gateway may or may not need to be upgraded.



  • @Kristiaan-Nugteren said:

    If i design a new sensor, or copy a new design, what part of the software will be responsible for the sensor to show up in domoticz?

    • Does the gateway runs software that needs to be compatible with the sensor? So if i design a new sensor, lets say a weight scale, will the gateway process units in KG?
    • I run domoticz on my Raspberry with Jessie. Do i need to add new code or software to the Raspberry to work, or doesn't the raspberry run any mysensor software at all? (Just the serial USB software)
    • Will domotics be responsible to recognize the type of sensor? So will new type of sensor require a update or heavy customization on the build-in mysensor software?

    Depending on what part of the software handles what, it can be very important to take the gateway with the most updates.

    To answer your questions:

    1. this is your sketch which is responsible to present the correct values to the controller (Domoticz)
    2. yes, there has to be a general compatibility between GW and nodes.
    3. For the RPi to work, you do not have to do anything πŸ™‚ for MySensors to work on RPi you need to run PiGatewaySerial software. Just follow this guide through below. Took me a few weeks to overcome a compiling issue in librf24-bcm as it was not documented on the forum at that time.

    http://forum.mysensors.org/topic/2437/step-by-step-procedure-to-connect-the-nrf24l01-to-the-gpio-pins-and-use-the-raspberry-as-a-serial-gateway
    4) Again Domoricz will only assign node id, but it totally depends on your sketch how the node is recognised (switch or sensor etc).

    I hope the above helps.



  • I received most most of the hardware i ordered and did a couple of simple builds this evening.

    First i build the serial gateway. I used a nano clone with a standard nRF24L01+ module. Installed the regular arduino software with the MySensors 1.5.4 library, and used the standard serial gateway example. It was a very easy 5 seconds install in Domoticz, and the gateway was directly recognized as "MySensors Gateway USB Version: 1.5.4"

    Next i build a humidity sensor and a relay actuator. Both on nano clones with a standard example sketch. At first they dint show up, but i made a couple of faults and had a bad quality power supply. After correcting them they showed up in domoticz, and seem to work really well.

    I have no experience with Arduino, or MySensors, but i managed to build the gateway and 2 sensors in about 2 hours. I'm really very impressed with the quality and simplicity of the system so far!

    But to get back to the discussion; As i mentioned the serial gateway shows up as version 1.5.4. Maybe i understand this wrong, but this seems to be the most up to date version right? If so maybe the serial gateway is updated pretty well too, and the updating is no longer a issue.

    It seems to work very good on the USB of my raspberry, so currently i dont see any downside compared to a ethernet gateway. Am i overlooking something?

    The way i see it, the serial gateway is:

    • Much cheaper (Just a nano and a nRF24L01+ module)
    • Much smaller
    • Used less energie
    • Needs much less configuration

    I have a a W5100 ethernet shield and a Uno laying on my desk here, so if there is any advantage, i can build it in a sec.

    Any advise here?


  • Admin

    The Serial gateway is the most simple solution, less can go wrong (software/hardware wise).

    So if the location of the gateway in your house is good, just use it and don't bother with the Ethernet variant.


Log in to reply
 

Suggested Topics

  • 5
  • 1
  • 1
  • 5
  • 2
  • 1

15
Online

11.4k
Users

11.1k
Topics

112.7k
Posts