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. Troubleshooting
  3. RFM69HCW Feather M0 MQTT

RFM69HCW Feather M0 MQTT

Scheduled Pinned Locked Moved Troubleshooting
23 Posts 3 Posters 2.0k Views 1 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.
  • Andrew MaynardA Offline
    Andrew MaynardA Offline
    Andrew Maynard
    wrote on last edited by
    #1

    Im trying to combine the GatewayEsp8266MQTTClient and lafleurs soil moisture sketch. i keep getting this error when compiling

    MyTransportRFM69.cpp: In function 'bool transportInit()':

    MyTransportRFM69.cpp:171:42: error: expected primary-expression before ',' token

    if (_radio.initialize(MY_RFM69_FREQUENCY, _address, MY_RFM69_NETWORKID))

    anyone have some suggestions? am i declaring the frequency wrong?

    mfalkviddM 1 Reply Last reply
    0
    • Andrew MaynardA Andrew Maynard

      Im trying to combine the GatewayEsp8266MQTTClient and lafleurs soil moisture sketch. i keep getting this error when compiling

      MyTransportRFM69.cpp: In function 'bool transportInit()':

      MyTransportRFM69.cpp:171:42: error: expected primary-expression before ',' token

      if (_radio.initialize(MY_RFM69_FREQUENCY, _address, MY_RFM69_NETWORKID))

      anyone have some suggestions? am i declaring the frequency wrong?

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

      @andrew-maynard welcome to the MySensors community!
      You may have declared the frequency wrong, but it is hard to tell without knowing how you declared it. Could you share how you declare the frequency?

      If you haven't already, take a look at the documentation: https://www.mysensors.org/apidocs/group__RFM69SettingGrpPub.html#ga3abb7e6bc4ad07943afe0ce3e381c9ec

      1 Reply Last reply
      0
      • Andrew MaynardA Offline
        Andrew MaynardA Offline
        Andrew Maynard
        wrote on last edited by
        #3

        ive been reading your responses everywhere. lol i had hoped you would respond.

            #define MY_DEBUG                                  // used by MySensor (Print debug messages via serial)
            #define MY_RADIO_RFM69                            // Select Radio-Module RFM69
            #define MY_RFM69_FREQUENCY 
            #define RF69_433MHZ            // Define our Frequency of 433 MHz
            #define MY_IS_RFM69HW                             // Module is high power (HW/HCW)
            //#define MY_RFM69_NETWORKID 100                  // leave out for gateway selection
            #define MY_RF69_SPI_CS 8                          // SPI CS PIN
            #define MY_RF69_IRQ_PIN 3                         // IRQ PIN
            #define MY_RF69_IRQ_NUM 3                         // IRQ PIN NUM (for M0 it is the same as IRQ PIN. Will be obsolete in  
            //#define MY_NODE_ID 162                            // Node ID
            #define MY_DEFAULT_TX_LED_PIN 13                  // LED Pin for "Blink while sending"```
        mfalkviddM 1 Reply Last reply
        0
        • Andrew MaynardA Andrew Maynard

          ive been reading your responses everywhere. lol i had hoped you would respond.

              #define MY_DEBUG                                  // used by MySensor (Print debug messages via serial)
              #define MY_RADIO_RFM69                            // Select Radio-Module RFM69
              #define MY_RFM69_FREQUENCY 
              #define RF69_433MHZ            // Define our Frequency of 433 MHz
              #define MY_IS_RFM69HW                             // Module is high power (HW/HCW)
              //#define MY_RFM69_NETWORKID 100                  // leave out for gateway selection
              #define MY_RF69_SPI_CS 8                          // SPI CS PIN
              #define MY_RF69_IRQ_PIN 3                         // IRQ PIN
              #define MY_RF69_IRQ_NUM 3                         // IRQ PIN NUM (for M0 it is the same as IRQ PIN. Will be obsolete in  
              //#define MY_NODE_ID 162                            // Node ID
              #define MY_DEFAULT_TX_LED_PIN 13                  // LED Pin for "Blink while sending"```
          mfalkviddM Offline
          mfalkviddM Offline
          mfalkvidd
          Mod
          wrote on last edited by mfalkvidd
          #4

          @andrew-maynard this is how the frequency is defined:

          #define MY_RFM69_FREQUENCY   (RFM69_433MHZ)
          

          Remove these two lines:

          #define MY_RFM69_FREQUENCY 
          #define RF69_433MHZ            // Define our Frequency of 433 MHz
          

          In addition to the documentation I linked before, you can also see the section "Configuring MySensors for RFM69" at https://www.mysensors.org/build/connect_radio#rfm6995-&-arduino

          Andrew MaynardA 2 Replies Last reply
          1
          • mfalkviddM mfalkvidd

            @andrew-maynard this is how the frequency is defined:

            #define MY_RFM69_FREQUENCY   (RFM69_433MHZ)
            

            Remove these two lines:

            #define MY_RFM69_FREQUENCY 
            #define RF69_433MHZ            // Define our Frequency of 433 MHz
            

            In addition to the documentation I linked before, you can also see the section "Configuring MySensors for RFM69" at https://www.mysensors.org/build/connect_radio#rfm6995-&-arduino

            Andrew MaynardA Offline
            Andrew MaynardA Offline
            Andrew Maynard
            wrote on last edited by
            #5
            This post is deleted!
            1 Reply Last reply
            0
            • Andrew MaynardA Offline
              Andrew MaynardA Offline
              Andrew Maynard
              wrote on last edited by
              #6
              This post is deleted!
              1 Reply Last reply
              0
              • mfalkviddM mfalkvidd

                @andrew-maynard this is how the frequency is defined:

                #define MY_RFM69_FREQUENCY   (RFM69_433MHZ)
                

                Remove these two lines:

                #define MY_RFM69_FREQUENCY 
                #define RF69_433MHZ            // Define our Frequency of 433 MHz
                

                In addition to the documentation I linked before, you can also see the section "Configuring MySensors for RFM69" at https://www.mysensors.org/build/connect_radio#rfm6995-&-arduino

                Andrew MaynardA Offline
                Andrew MaynardA Offline
                Andrew Maynard
                wrote on last edited by Andrew Maynard
                #7
                This post is deleted!
                mfalkviddM 1 Reply Last reply
                0
                • Andrew MaynardA Andrew Maynard

                  This post is deleted!

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

                  @andrew-maynard what board and board version are you using? Check the beginning of the output when compiling, it should look like this:

                  Using board 'd1_mini' from platform in folder: C:\Users\Micke\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.1
                  Using core 'esp8266' from platform in folder: C:\Users\Micke\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.1
                  

                  The ESP8266MQTTClient example compiles fine for me, using MySensors 2.3.0.

                  Andrew MaynardA 1 Reply Last reply
                  0
                  • mfalkviddM mfalkvidd

                    @andrew-maynard what board and board version are you using? Check the beginning of the output when compiling, it should look like this:

                    Using board 'd1_mini' from platform in folder: C:\Users\Micke\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.1
                    Using core 'esp8266' from platform in folder: C:\Users\Micke\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.1
                    

                    The ESP8266MQTTClient example compiles fine for me, using MySensors 2.3.0.

                    Andrew MaynardA Offline
                    Andrew MaynardA Offline
                    Andrew Maynard
                    wrote on last edited by Andrew Maynard
                    #9

                    @mfalkvidd Im sorry I was being dummy and overthinking it. I'm using a feather M0 with rfm69hcw. I was under the impression even the client would need some MQTT info. I managed to get the sketch compiling and getting some output from serial monitor but its not consistent at all. I can see through domoticz log that its connected to mysensor. The sketch is a basic Temperatureandhumidity nothing changed except radio type. Thank you for the documentation! helped to clear things up.

                    // Enable debug prints to serial monitor
                    #define MY_SERIALDEVICE Serial  // this will override Serial port define in MyHwSAMD.h file
                    #define MY_DEBUG                                  // used by MySensor (Print debug messages via serial)
                    #define MY_RFM69_NEW_DRIVER
                    #define MY_RADIO_RFM69                            // Select Radio-Module RFM69
                    #define MY_RFM69_FREQUENCY   (RFM69_433MHZ)
                    #define MY_IS_RFM69HW                             // Module is high power (HW/HCW)
                    //#define MY_RFM69_NETWORKID 100                  // leave out for gateway selection
                    #define MY_RF69_SPI_CS 8                          // SPI CS PIN
                    #define MY_RF69_IRQ_PIN 3                         // IRQ PIN
                    #define MY_RF69_IRQ_NUM 3                         // IRQ PIN NUM (for M0 it is the same as IRQ PIN. Will be obsolete in upcoming MySensors.h) 
                    //#define MY_NODE_ID 162                            // Node ID
                    #define MY_DEFAULT_TX_LED_PIN 13                  // LED Pin for "Blink while sending"
                    
                    
                    91177 TSM:FAIL:CNT=6
                    91187 TSM:FAIL:DIS
                    91197 TSF:TDI:TSL
                    101208 TSM:FAIL:RE-INIT
                    101219 TSM:INIT
                    101309 TSM:INIT:TSP OK
                    101320 TSM:FPAR
                    101335 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
                    103348 !TSM:FPAR:NO REPLY
                    103358 TSM:FPAR
                    103372 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
                    105384 !TSM:FPAR:NO REPLY
                    105394 TSM:FPAR
                    105408 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
                    107420 !TSM:FPAR:NO REPLY
                    107430 TSM:FPAR
                    107445 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
                    109457 !TSM:FPAR:FAIL
                    109468 TSM:FAIL:CNT=7
                    109479 TSM:FAIL:DIS
                    109490 TSF:TDI:TSL
                    
                    mfalkviddM 1 Reply Last reply
                    0
                    • Andrew MaynardA Andrew Maynard

                      @mfalkvidd Im sorry I was being dummy and overthinking it. I'm using a feather M0 with rfm69hcw. I was under the impression even the client would need some MQTT info. I managed to get the sketch compiling and getting some output from serial monitor but its not consistent at all. I can see through domoticz log that its connected to mysensor. The sketch is a basic Temperatureandhumidity nothing changed except radio type. Thank you for the documentation! helped to clear things up.

                      // Enable debug prints to serial monitor
                      #define MY_SERIALDEVICE Serial  // this will override Serial port define in MyHwSAMD.h file
                      #define MY_DEBUG                                  // used by MySensor (Print debug messages via serial)
                      #define MY_RFM69_NEW_DRIVER
                      #define MY_RADIO_RFM69                            // Select Radio-Module RFM69
                      #define MY_RFM69_FREQUENCY   (RFM69_433MHZ)
                      #define MY_IS_RFM69HW                             // Module is high power (HW/HCW)
                      //#define MY_RFM69_NETWORKID 100                  // leave out for gateway selection
                      #define MY_RF69_SPI_CS 8                          // SPI CS PIN
                      #define MY_RF69_IRQ_PIN 3                         // IRQ PIN
                      #define MY_RF69_IRQ_NUM 3                         // IRQ PIN NUM (for M0 it is the same as IRQ PIN. Will be obsolete in upcoming MySensors.h) 
                      //#define MY_NODE_ID 162                            // Node ID
                      #define MY_DEFAULT_TX_LED_PIN 13                  // LED Pin for "Blink while sending"
                      
                      
                      91177 TSM:FAIL:CNT=6
                      91187 TSM:FAIL:DIS
                      91197 TSF:TDI:TSL
                      101208 TSM:FAIL:RE-INIT
                      101219 TSM:INIT
                      101309 TSM:INIT:TSP OK
                      101320 TSM:FPAR
                      101335 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
                      103348 !TSM:FPAR:NO REPLY
                      103358 TSM:FPAR
                      103372 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
                      105384 !TSM:FPAR:NO REPLY
                      105394 TSM:FPAR
                      105408 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
                      107420 !TSM:FPAR:NO REPLY
                      107430 TSM:FPAR
                      107445 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
                      109457 !TSM:FPAR:FAIL
                      109468 TSM:FAIL:CNT=7
                      109479 TSM:FAIL:DIS
                      109490 TSF:TDI:TSL
                      
                      mfalkviddM Offline
                      mfalkviddM Offline
                      mfalkvidd
                      Mod
                      wrote on last edited by
                      #10

                      @andrew-maynard you can use the log parser to get more information about what the log says. In your case, the sensor node is not getting a reply from your gateway. Could you post the gateway log as well?

                      1 Reply Last reply
                      0
                      • Andrew MaynardA Offline
                        Andrew MaynardA Offline
                        Andrew Maynard
                        wrote on last edited by
                        #11

                        I'm thinking of switching to esp8266 gateway. maybe get that working then try again with raspberry pi? I'm not ready to give up. I dont see as much documentation though.

                        mfalkviddM 1 Reply Last reply
                        0
                        • Andrew MaynardA Andrew Maynard

                          I'm thinking of switching to esp8266 gateway. maybe get that working then try again with raspberry pi? I'm not ready to give up. I dont see as much documentation though.

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

                          @andrew-maynard what type of documentation are you looking for?

                          • Debugging FAQ, shows the most common problems and how to troubleshoot them
                          • The Getting started guide describes how MySensors is designed to work
                          • We have build pages that describe how to build a lot of different sensors and gateways
                          • The Download/API page has links to documentation for the serial API, the Sensor API and the technical documentation.
                          • The forum (search) has over 90,000 posts covering experience from thousands of MySensors users.
                          1 Reply Last reply
                          1
                          • Andrew MaynardA Offline
                            Andrew MaynardA Offline
                            Andrew Maynard
                            wrote on last edited by
                            #13

                            oh I didnt mean it as not enough documentation in total. you guys put some serious hard work in this project and I really do appreciate it. I would think you guys are paid! I just meant in terms of raspberry pi as a gateway with rfm69hcw. Am I wrong? btw this is one of the liveliest communities I've experienced! once again thank you and I do appreciate it!

                            1 Reply Last reply
                            1
                            • Andrew MaynardA Offline
                              Andrew MaynardA Offline
                              Andrew Maynard
                              wrote on last edited by
                              #14

                              I'm on the beginner side so it seems a little easier to change a few things in the esp8266gateway sketch and go.

                              mfalkviddM 1 Reply Last reply
                              0
                              • Andrew MaynardA Andrew Maynard

                                I'm on the beginner side so it seems a little easier to change a few things in the esp8266gateway sketch and go.

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

                                @andrew-maynard I'd say that if you have Linux experience, the Raspberry Pi gateway is probably easier to configure and troubleshoot (since it will be a familiar environment). But if you're not already familiar with Linux, learning Linix+MySensors at the same time will be harder than using the esp8266 gateway.

                                1 Reply Last reply
                                1
                                • Andrew MaynardA Offline
                                  Andrew MaynardA Offline
                                  Andrew Maynard
                                  wrote on last edited by
                                  #16

                                  This is the debug from the gateway.
                                  If for some reason the transceiver isn't working it should say in debug, correct?

                                  Aug 02 01:17:32 INFO  Starting gateway...
                                  Aug 02 01:17:32 INFO  Protocol version - 2.3.1-alpha
                                  Aug 02 01:17:32 DEBUG MCO:BGN:INIT GW,CP=RPNGL---,VER=2.3.1-alpha
                                  Aug 02 01:17:32 DEBUG TSF:LRT:OK
                                  Aug 02 01:17:32 DEBUG TSM:INIT
                                  Aug 02 01:17:32 DEBUG TSF:WUR:MS=0
                                  Aug 02 01:17:32 DEBUG TSM:INIT:TSP OK
                                  Aug 02 01:17:32 DEBUG TSM:INIT:GW MODE
                                  Aug 02 01:17:32 DEBUG TSM:READY:ID=0,PAR=0,DIS=0
                                  Aug 02 01:17:32 DEBUG MCO:REG:NOT NEEDED
                                  Aug 02 01:17:32 DEBUG MCO:BGN:STP
                                  Aug 02 01:17:32 DEBUG MCO:BGN:INIT OK,TSP=1
                                  Aug 02 01:17:32 DEBUG GWT:RMQ:MQTT RECONNECT
                                  Aug 02 01:17:32 DEBUG connected to 192.168.1.110
                                  Aug 02 01:17:32 DEBUG GWT:RMQ:MQTT CONNECTED
                                  Aug 02 01:17:32 DEBUG GWT:TPS:TOPIC=domoticz/out/MyMQTT/0/255/0/0/18,MSG SENT
                                  
                                  1 Reply Last reply
                                  0
                                  • scalzS Offline
                                    scalzS Offline
                                    scalz
                                    Hardware Contributor
                                    wrote on last edited by
                                    #17

                                    the debug can tell you if spi is working ok.
                                    when you get FPAR NO REPLY it could be because of bad rfm69 interrupt. but your define looks ok..
                                    could you try to add in your sketch define this one:

                                    #define MY_RFM69_RST_PIN 4
                                    

                                    As your rfm69 reset signal is routed to D4..

                                    Andrew MaynardA 1 Reply Last reply
                                    1
                                    • mfalkviddM Offline
                                      mfalkviddM Offline
                                      mfalkvidd
                                      Mod
                                      wrote on last edited by
                                      #18

                                      Could the problems be related to https://github.com/mysensors/MySensors/issues/1155 ?

                                      Andrew MaynardA 1 Reply Last reply
                                      1
                                      • scalzS scalz

                                        the debug can tell you if spi is working ok.
                                        when you get FPAR NO REPLY it could be because of bad rfm69 interrupt. but your define looks ok..
                                        could you try to add in your sketch define this one:

                                        #define MY_RFM69_RST_PIN 4
                                        

                                        As your rfm69 reset signal is routed to D4..

                                        Andrew MaynardA Offline
                                        Andrew MaynardA Offline
                                        Andrew Maynard
                                        wrote on last edited by
                                        #19

                                        @scalz YES!!! I think that was the problem on the Feather m0 side. still not receiving messages though. i did test it out with

                                        pi@raspberrypi3:~ $ mosquitto_pub -t 'domoticz/in/MyMQTT' -m '0,29'
                                        

                                        I see it in the domoticz log.

                                        2018-08-05 02:17:49.130 Status: MySensorsMQTT: connected to: 192.168.1.110:1883
                                        2018-08-05 02:17:49.230 Status: MQTT: Subscribed
                                        2018-08-05 02:17:55.937 Status: MQTT: Worker stopped...
                                        2018-08-05 02:17:56.939 Status: MQTT: Connecting to 192.168.1.110:1883
                                        2018-08-05 02:17:57.040 Status: MQTT: connected to: 192.168.1.110:1883
                                        2018-08-05 02:17:57.040 Status: MySensorsMQTT: connected to: 192.168.1.110:1883
                                        2018-08-05 02:17:57.141 Status: MQTT: Subscribed
                                        2018-08-05 02:45:42.707 MySensorsMQTT: Topic: domoticz/in/MyMQTT, Message: 0,29
                                        

                                        I figure it cant hurt to show my ./configure.

                                        pi@raspberrypi3:~ $ ./configure --my-gateway=mqtt --my-controller-ip-address=192.168.1.110 --my-mqtt-publish-topic-prefix=domoticz/out/MyMQTT --my-mqtt-subscribe-topic-prefix=domoticz/in/MyMQTT --my-mqtt-client-id=pi  --my-transport=rfm69 --my-rfm69-frequency=433 --my-is-rfm69hw^C
                                        

                                        Am I missing something? Is there a something specific I should enter below for my client id?

                                        --my-mqtt-client-id=pi 
                                        

                                        Thanks again for responding. I appreciate it!

                                        1 Reply Last reply
                                        0
                                        • mfalkviddM mfalkvidd

                                          Could the problems be related to https://github.com/mysensors/MySensors/issues/1155 ?

                                          Andrew MaynardA Offline
                                          Andrew MaynardA Offline
                                          Andrew Maynard
                                          wrote on last edited by Andrew Maynard
                                          #20

                                          @mfalkvidd I will try it on an esp8266 tomorrow and see if anything changes. When going back versions is there anything else i need to do besides deleting directory and going through ./configure again? I will try the 2.2 version first. I already went from 2.3.1 to 2.3.0.

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


                                          24

                                          Online

                                          11.7k

                                          Users

                                          11.2k

                                          Topics

                                          113.1k

                                          Posts


                                          Copyright 2025 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