Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Hardware
  3. Recommended setup for MQTT and RFM69

Recommended setup for MQTT and RFM69

Scheduled Pinned Locked Moved Hardware
5 Posts 4 Posters 2.5k Views 4 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • PhracturedBlueP Offline
    PhracturedBlueP Offline
    PhracturedBlue
    wrote on last edited by
    #1

    What is the recommended setup to use an RFM69 Module with MQTT Gateway?

    I am using an Arduino serial gateway configured for RFM69 hooked directly to the UART of an RPi.
    I would like to use MQTT to communicate with my controller (this makes it easy to send messages to the sensors via multiple sources, which is convenient for me)

    I first did this by modifying the RPi gateway code to speak to the RFM69 and directly wiring the RFM69 module to the RPi. This worked, but I was missing messages, and I wasn't sure if possibly the RPi wasn't servicing the SPI quickly enough.
    So I switched to a serial gateway, and I've had much better reliability of receiving messages (I also changed some other things at the same time, so I'm not going to claim this was actually necessary), but now I have a serial interface to the gateway, and I need a MQTT to Serial converter. the only thing I found was this:

    https://forum.mysensors.org/topic/978/raspberry-pi-mqtt-mosquitto-serial-gateway/12

    But it seems to be abandoned. In the end, I wrote a simple python utility using paho-mqtt which does the same thing as the above script, and works well, so I don't actually have any problem at the moment, but I'm wondering what the preferred way to use an RFM69 with MQTT is given that Mysensors2.1 doesn't yet officially support the RPi gateway with this module (I realize it will be likely be available in 2.2...as I said, I already implemented it myself).

    I have looked at the documentation on gateways as well as the RPi documentation, but I didn't find a clear answer to this.

    FotoFieberF mfalkviddM 2 Replies Last reply
    0
    • PhracturedBlueP PhracturedBlue

      What is the recommended setup to use an RFM69 Module with MQTT Gateway?

      I am using an Arduino serial gateway configured for RFM69 hooked directly to the UART of an RPi.
      I would like to use MQTT to communicate with my controller (this makes it easy to send messages to the sensors via multiple sources, which is convenient for me)

      I first did this by modifying the RPi gateway code to speak to the RFM69 and directly wiring the RFM69 module to the RPi. This worked, but I was missing messages, and I wasn't sure if possibly the RPi wasn't servicing the SPI quickly enough.
      So I switched to a serial gateway, and I've had much better reliability of receiving messages (I also changed some other things at the same time, so I'm not going to claim this was actually necessary), but now I have a serial interface to the gateway, and I need a MQTT to Serial converter. the only thing I found was this:

      https://forum.mysensors.org/topic/978/raspberry-pi-mqtt-mosquitto-serial-gateway/12

      But it seems to be abandoned. In the end, I wrote a simple python utility using paho-mqtt which does the same thing as the above script, and works well, so I don't actually have any problem at the moment, but I'm wondering what the preferred way to use an RFM69 with MQTT is given that Mysensors2.1 doesn't yet officially support the RPi gateway with this module (I realize it will be likely be available in 2.2...as I said, I already implemented it myself).

      I have looked at the documentation on gateways as well as the RPi documentation, but I didn't find a clear answer to this.

      FotoFieberF Offline
      FotoFieberF Offline
      FotoFieber
      Hardware Contributor
      wrote on last edited by
      #2

      @PhracturedBlue
      At the moment I am using a node.js script to publish from serial gateway to mqtt:
      https://forum.mysensors.org/topic/4599/how-to-add-a-serial-device-to-use-in-node-red/10

      1 Reply Last reply
      0
      • PhracturedBlueP PhracturedBlue

        What is the recommended setup to use an RFM69 Module with MQTT Gateway?

        I am using an Arduino serial gateway configured for RFM69 hooked directly to the UART of an RPi.
        I would like to use MQTT to communicate with my controller (this makes it easy to send messages to the sensors via multiple sources, which is convenient for me)

        I first did this by modifying the RPi gateway code to speak to the RFM69 and directly wiring the RFM69 module to the RPi. This worked, but I was missing messages, and I wasn't sure if possibly the RPi wasn't servicing the SPI quickly enough.
        So I switched to a serial gateway, and I've had much better reliability of receiving messages (I also changed some other things at the same time, so I'm not going to claim this was actually necessary), but now I have a serial interface to the gateway, and I need a MQTT to Serial converter. the only thing I found was this:

        https://forum.mysensors.org/topic/978/raspberry-pi-mqtt-mosquitto-serial-gateway/12

        But it seems to be abandoned. In the end, I wrote a simple python utility using paho-mqtt which does the same thing as the above script, and works well, so I don't actually have any problem at the moment, but I'm wondering what the preferred way to use an RFM69 with MQTT is given that Mysensors2.1 doesn't yet officially support the RPi gateway with this module (I realize it will be likely be available in 2.2...as I said, I already implemented it myself).

        I have looked at the documentation on gateways as well as the RPi documentation, but I didn't find a clear answer to this.

        mfalkviddM Offline
        mfalkviddM Offline
        mfalkvidd
        Mod
        wrote on last edited by
        #3

        @PhracturedBlue you could use nodered on the rpi or a mqtt ethernet or esp8266 gateway.

        1 Reply Last reply
        0
        • PhracturedBlueP Offline
          PhracturedBlueP Offline
          PhracturedBlue
          wrote on last edited by
          #4

          Thanks for the input.

          The node.js solution doesn't seem any different than what I already have in python. If mysensors officially supported one of these options it would seem preferable to relying on a forum post somewhere. My concerns would mostly be about long-term support as the Mysensors API may change again in the future. As noted, it seems that the previous incarnation (PerlMQTTGateway) has basically been deprecated. Having already written a serial<->MQTT bridge, there wasn't much to it, so maybe there isn't really much risk for forward compatibility though.

          It seems the ESP8266 option might be a reasonable recommendation, though I personally wanted a hardwired connection to the gateway since wireless signal is not too strong where I'd like to put the gateway.It doesn't appear that there is a serial gw<->ethernet bridge option either. So as far as I can tell, the code distributed with mysensors seems to assume to gateway is directly connected to the radio (with the exception of the 'serial' gateway running on RPi)?

          I guess most users who decide to use RFM69 just use the serial interface?

          1 Reply Last reply
          0
          • gohanG Offline
            gohanG Offline
            gohan
            Mod
            wrote on last edited by
            #5

            Can't you make an mqtt client ethernet gateway with w5100 shield on an Arduino Uno?

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            16

            Online

            11.7k

            Users

            11.2k

            Topics

            113.0k

            Posts


            Copyright 2019 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • MySensors
            • OpenHardware.io
            • Categories
            • Recent
            • Tags
            • Popular