Navigation

    • Register
    • Login
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. Alpoy
    3. Posts
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Posts made by Alpoy

    • RE: Feather m0 (SAMD) sleep and interrupt

      I may have solved/found a workaround for this, changing the interrupt to trigger on "LOW" instead of "FALLING" works for some reason 🤷‍♂️

      posted in Troubleshooting
      Alpoy
      Alpoy
    • RE: Feather m0 (SAMD) sleep and interrupt

      I've forgotten to add a digitalRead in the code above on the REEDSWITCHPIN State but it's "1".

      posted in Troubleshooting
      Alpoy
      Alpoy
    • RE: Feather m0 (SAMD) sleep and interrupt

      Indeed you're right 🙂 I have removed more and more coded to eliminate any causes and reduced it all to the bare minimum, nothing changed. Anyways, I added this to the above code:

      #define CHILD_ID_MBXTRIP 52
      MyMessage MbxTrip(CHILD_ID_MBXTRIP, V_TRIPPED);
      void presentation() { 
        sendSketchInfo("Mbx", "2.0");
        present(CHILD_ID_MBXTRIP, S_DOOR);
      }
      

      And here's the debug output:

      11:54:19.036 -> 3084 TSM:FPAR:OK
      11:54:19.036 -> 3084 TSM:ID
      11:54:19.036 -> 3084 TSM:ID:OK
      11:54:19.036 -> 3084 TSM:UPL
      11:54:19.106 -> 3153 TSF:MSG:SEND,11-11-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=OK:1
      11:54:19.748 -> 3399 TSF:MSG:READ,0-0-11,s=255,c=3,t=25,pt=1,l=1,sg=0:1
      11:54:19.748 -> 3399 TSF:MSG:PONG RECV,HP=1
      11:54:19.748 -> 3399 TSM:UPL:OK
      11:54:19.748 -> 3399 TSM:READY:ID=11,PAR=0,DIS=1
      11:54:19.748 -> 3475 TSF:MSG:SEND,11-11-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100
      11:54:19.748 -> 3714 TSF:MSG:READ,0-0-11,s=255,c=3,t=15,pt=6,l=2,sg=0:0100
      11:54:19.763 -> 3801 TSF:MSG:SEND,11-11-0-0,s=255,c=0,t=17,pt=0,l=5,sg=0,ft=0,st=OK:2.3.2
      11:54:20.561 -> 4370 TSF:MSG:SEND,11-11-0-0,s=255,c=3,t=6,pt=1,l=1,sg=0,ft=0,st=OK:0
      11:54:22.599 -> 6437 TSF:MSG:SEND,11-11-0-0,s=255,c=3,t=11,pt=0,l=3,sg=0,ft=0,st=OK:Mbx
      11:54:22.972 -> 7006 TSF:MSG:SEND,11-11-0-0,s=255,c=3,t=12,pt=0,l=3,sg=0,ft=0,st=OK:2.0
      11:54:23.576 -> 7573 TSF:MSG:SEND,11-11-0-0,s=52,c=0,t=0,pt=0,l=0,sg=0,ft=0,st=OK:
      11:54:23.576 -> 7574 MCO:REG:REQ
      11:54:24.110 -> 8142 TSF:MSG:SEND,11-11-0-0,s=255,c=3,t=26,pt=1,l=1,sg=0,ft=0,st=OK:2
      11:54:24.538 -> 8383 TSF:MSG:READ,0-0-11,s=255,c=3,t=27,pt=1,l=1,sg=0:1
      11:54:24.538 -> 8383 MCO:PIM:NODE REG=1
      11:54:24.538 -> 8383 MCO:BGN:STP
      11:54:24.538 -> EO sleepsetup
      11:54:24.538 -> 8484 MCO:BGN:INIT OK,TSP=1
      11:54:29.540 -> Going to sleep in 60 seconds...
      11:55:29.782 -> REEDSWITCHPIN State: 6
      11:55:29.782 -> 73484 TSF:TDI:TSL
      11:55:29.782 -> ZzZ (WFI)
      

      Now, when I make D6 (REEDSWITCHPIN) go LOW by conneting to GND nothing happens (doesn't wake up). But removing all mysensors code makes it work

      posted in Troubleshooting
      Alpoy
      Alpoy
    • Feather m0 (SAMD) sleep and interrupt

      Hi,

      I've been trying everything I know of to get a feather m0 wake up by interrupt after deep sleep but I can't get it working with the mysensors lib.

      if I remove all mysensors related code sleep and wakeup works just fine 😒
      Any help or tip appreciated!

      Here's the code:

      #define MY_DEBUG
      #define MY_RADIO_RFM69
      #define TIME_TO_SLEEP 299  
      #define Battery_HIGH 4.2
      #define Battery_LOW 3.2 
      #define MY_IS_RFM69HW
      #define MY_RFM69_FREQUENCY RFM69_433MHZ
      #define MY_RFM69_NEW_DRIVER
      #define MY_DEFAULT_ERR_LED_PIN 13
      #define MY_RFM69_RST_PIN 4
      #define MY_RFM69_IRQ_PIN 3
      #define MY_RFM69_CS_PIN 8
      #define MY_NODE_ID 11
      #define MY_SIGNAL_REPORT_ENABLED
      #define MY_TRANSPORT_WAIT_READY_MS 15000 
      
      
      #include <MySensors.h>
      
      #define REEDSWITCHPIN 6 
      
      volatile bool SLEEP_FLAG = true; // Use sleeproutines or not
      bool debug = true;
      int bootCycles = 0;
      String wakeupReason = "none";
      
      void setup() {
        pinMode(REEDSWITCHPIN, INPUT_PULLUP);
        attachInterrupt(digitalPinToInterrupt(REEDSWITCHPIN), EIC_ISR, FALLING);
        delay(100);
        sleepSetup();
      }
      
      void presentation() { 
      }
      
      void loop() {
        delay(5000);
        Serial.println("Going to sleep in 60 seconds...");
        delay(60000); 
        if (debug) Serial.print("REEDSWITCHPIN State: ");
        if (debug) Serial.println(REEDSWITCHPIN);
        sleepRoutine();
      }
      
      void sleepRoutine() {
          PORT->Group[g_APinDescription[LED_BUILTIN].ulPort].OUTCLR.reg = (uint32_t)(1<<g_APinDescription[LED_BUILTIN].ulPin); // set pin mode to low
          transportDisable(); // Disable rfm69
          __DSB();                                             
          if (debug) Serial.println("ZzZ (WFI)");
          USBDevice.detach();
          delay(5000);
          __WFI();  // Sleep
          delay(1000);
          PORT->Group[g_APinDescription[LED_BUILTIN].ulPort].OUTTGL.reg = (uint32_t)(1<<g_APinDescription[LED_BUILTIN].ulPin);  // toggle output of built-in LED pin
          USBDevice.attach();
          delay(10000);
          if (debug) Serial.println("Out of ZzZ (WFI)");
          //transportReInitialise(); // Enable rfm69
          delay(100);
      }
      
      void EIC_ISR(void) {
        //SLEEP_FLAG ^= true;  // toggle SLEEP_FLAG by XORing it against true
        wakeupReason = "INTERRUPT";
      }
      
      void sleepSetup() {
        SYSCTRL->XOSC32K.reg |=  (SYSCTRL_XOSC32K_RUNSTDBY | SYSCTRL_XOSC32K_ONDEMAND); // set external 32k oscillator to run when idle or sleep mode is chosen
        REG_GCLK_CLKCTRL  |= GCLK_CLKCTRL_ID(GCM_EIC) |  // generic clock multiplexer id for the external interrupt controller
                             GCLK_CLKCTRL_GEN_GCLK1 |  // generic clock 1 which is xosc32k
                             GCLK_CLKCTRL_CLKEN;       // enable it
        while (GCLK->STATUS.bit.SYNCBUSY);              // write protected, wait for sync
        EIC->WAKEUP.reg |= EIC_WAKEUP_WAKEUPEN4;        // Set External Interrupt Controller to use channel 4 (pin 6)
        PM->SLEEP.reg |= PM_SLEEP_IDLE_CPU;  // Enable Idle0 mode - sleep CPU clock only
        SCB->SCR |= SCB_SCR_SLEEPDEEP_Msk;   // Enable Standby or "deep sleep" mode
        if (debug) Serial.println("EO sleepsetup");
      }
      
      
      posted in Troubleshooting
      Alpoy
      Alpoy
    • RE: Feather M0 RFM60HCW (433Mhz) - can't connect to gw

      I think I've narrowed it down to encryption, disabling it on the GW and the feather seems to make everything work ok. I've double checked that the key is identical but still won't work.
      Encryption works when I use the ESP32 as "client" instead of the Feather M0. I thought the AES encryption was done in the radio (rfm69) and not the microcontroller (ie. ESP32/Arduino etc.).

      Also, there's really no log message that indicates wrong encryption key or anything related to an encryption problem in the communication? 😐

      posted in Troubleshooting
      Alpoy
      Alpoy
    • RE: Feather M0 RFM60HCW (433Mhz) - can't connect to gw

      @alexelite

      Seems the GW receives something, here's the logs:

      Feather:

      13:08:02.321 -> 2996 !TSM:FPAR:NO REPLY
      13:08:02.321 -> 2996 TSM:FPAR
      13:08:02.321 -> 2996 RFM69:SWR:SEND,TO=255,SEQ=1,RETRY=0
      13:08:02.321 -> 2997 RFM69:CSMA:RSSI=-87
      13:08:02.321 -> 2998 RFM69:CSMA:RSSI=-88
      13:08:02.321 -> 2998 RFM69:CSMA:RSSI=-86
      13:08:02.321 -> 2998 RFM69:CSMA:RSSI=-87
      13:08:02.321 -> 2998 RFM69:CSMA:RSSI=-87
      13:08:02.321 -> 2999 RFM69:CSMA:RSSI=-88
      13:08:02.321 -> 2999 RFM69:CSMA:RSSI=-89
      13:08:02.321 -> 2999 RFM69:CSMA:RSSI=-87
      13:08:02.321 -> 3000 RFM69:CSMA:RSSI=-88
      13:08:02.321 -> 3000 RFM69:CSMA:RSSI=-87
      13:08:02.321 -> 3000 RFM69:CSMA:RSSI=-84
      13:08:02.321 -> 3001 RFM69:CSMA:RSSI=-87
      13:08:02.321 -> 3001 RFM69:CSMA:RSSI=-88
      13:08:02.321 -> 3001 RFM69:CSMA:RSSI=-88
      13:08:02.321 -> 3002 RFM69:CSMA:RSSI=-85
      13:08:02.321 -> 3002 RFM69:CSMA:RSSI=-84
      13:08:02.321 -> 3002 RFM69:CSMA:RSSI=-88
      13:08:02.321 -> 3003 RFM69:CSMA:RSSI=-88
      13:08:02.321 -> 3003 RFM69:CSMA:RSSI=-87
      13:08:02.321 -> 3003 RFM69:CSMA:RSSI=-86
      13:08:02.321 -> 3003 RFM69:CSMA:RSSI=-85
      13:08:02.321 -> 3004 RFM69:CSMA:RSSI=-86
      13:08:02.321 -> 3004 RFM69:CSMA:RSSI=-93
      13:08:02.321 -> 3004 RFM69:CSMA:RSSI=-90
      13:08:02.321 -> 3004 RFM69:CSMA:RSSI=-93
      13:08:02.321 -> 3004 RFM69:CSMA:RSSI=-90
      13:08:02.321 -> 3004 RFM69:CSMA:RSSI=-91
      13:08:02.321 -> 3005 RFM69:CSMA:RSSI=-91
      13:08:02.321 -> 3005 RFM69:CSMA:RSSI=-90
      13:08:02.321 -> 3005 RFM69:CSMA:RSSI=-91
      13:08:02.321 -> 3005 RFM69:CSMA:RSSI=-93
      13:08:02.321 -> 3005 RFM69:CSMA:RSSI=-96
      13:08:02.356 -> 3009 ?TSF:MSG:SEND,20-20-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      13:08:04.336 -> 5011 !TSM:FPAR:NO REPLY
      13:08:04.336 -> 5011 TSM:FPAR
      13:08:04.336 -> 5011 RFM69:SWR:SEND,TO=255,SEQ=2,RETRY=0
      13:08:04.336 -> 5012 RFM69:CSMA:RSSI=-99
      13:08:04.336 -> 5016 ?TSF:MSG:SEND,20-20-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      13:08:06.336 -> 7018 !TSM:FPAR:NO REPLY
      13:08:06.336 -> 7018 TSM:FPAR
      13:08:06.336 -> 7018 RFM69:SWR:SEND,TO=255,SEQ=3,RETRY=0
      13:08:06.336 -> 7019 RFM69:CSMA:RSSI=-96
      13:08:06.371 -> 7024 ?TSF:MSG:SEND,20-20-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      13:08:08.365 -> 9025 !TSM:FPAR:FAIL
      13:08:08.365 -> 9025 TSM:FAIL:CNT=1
      13:08:08.365 -> 9025 TSM:FAIL:DIS
      13:08:08.365 -> 9025 TSF:TDI:TSL
      13:08:08.365 -> 9025 RFM69:RSL
      13:08:14.946 -> 15616 MCO:BGN:STP
      13:08:14.946 -> Running setup...
      13:08:18.340 -> 19026 TSM:FAIL:RE-INIT
      13:08:18.340 -> 19026 TSM:INIT
      13:08:18.444 -> 19131 RFM69:INIT
      13:08:18.444 -> 19136 RFM69:INIT:PIN,CS=8,IQP=3,IQN=3,RST=4
      13:08:18.444 -> 19137 RFM69:PTX:LEVEL=5 dBm
      13:08:18.477 -> 19137 RFM69:DUMP:Registers Address | HEX value 
      13:08:18.477 -> 19138 RFM69:DUMP:REG=0x01 Value=0x04
      13:08:18.477 -> 19138 RFM69:DUMP:REG=0x02 Value=0x00
      13:08:18.477 -> 19138 RFM69:DUMP:REG=0x03 Value=0x02
      13:08:18.477 -> 19138 RFM69:DUMP:REG=0x04 Value=0x40
      13:08:18.477 -> 19138 RFM69:DUMP:REG=0x05 Value=0x03
      13:08:18.477 -> 19139 RFM69:DUMP:REG=0x06 Value=0x33
      13:08:18.477 -> 19139 RFM69:DUMP:REG=0x07 Value=0x6c
      13:08:18.477 -> 19139 RFM69:DUMP:REG=0x08 Value=0x7a
      13:08:18.477 -> 19139 RFM69:DUMP:REG=0x09 Value=0xe1
      13:08:18.477 -> 19139 RFM69:DUMP:REG=0x0a Value=0x41
      13:08:18.477 -> 19139 RFM69:DUMP:REG=0x0b Value=0x40
      13:08:18.477 -> 19140 RFM69:DUMP:REG=0x0c Value=0x02
      13:08:18.477 -> 19140 RFM69:DUMP:REG=0x0d Value=0x92
      13:08:18.477 -> 19140 RFM69:DUMP:REG=0x0e Value=0xf5
      13:08:18.477 -> 19140 RFM69:DUMP:REG=0x0f Value=0x20
      13:08:18.477 -> 19140 RFM69:DUMP:REG=0x10 Value=0x24
      13:08:18.477 -> 19141 RFM69:DUMP:REG=0x11 Value=0x57
      13:08:18.477 -> 19141 RFM69:DUMP:REG=0x12 Value=0x09
      13:08:18.477 -> 19141 RFM69:DUMP:REG=0x13 Value=0x1a
      13:08:18.477 -> 19141 RFM69:DUMP:REG=0x14 Value=0x40
      13:08:18.477 -> 19141 RFM69:DUMP:REG=0x15 Value=0xb0
      13:08:18.477 -> 19141 RFM69:DUMP:REG=0x16 Value=0x7b
      13:08:18.477 -> 19142 RFM69:DUMP:REG=0x17 Value=0x9b
      13:08:18.477 -> 19142 RFM69:DUMP:REG=0x18 Value=0x88
      13:08:18.477 -> 19142 RFM69:DUMP:REG=0x19 Value=0xe2
      13:08:18.477 -> 19142 RFM69:DUMP:REG=0x1a Value=0xe2
      13:08:18.477 -> 19142 RFM69:DUMP:REG=0x1b Value=0x40
      13:08:18.477 -> 19143 RFM69:DUMP:REG=0x1c Value=0x80
      13:08:18.477 -> 19143 RFM69:DUMP:REG=0x1d Value=0x06
      13:08:18.477 -> 19143 RFM69:DUMP:REG=0x1e Value=0x10
      13:08:18.477 -> 19143 RFM69:DUMP:REG=0x1f Value=0x00
      13:08:18.477 -> 19143 RFM69:DUMP:REG=0x20 Value=0x00
      13:08:18.477 -> 19143 RFM69:DUMP:REG=0x21 Value=0x00
      13:08:18.477 -> 19144 RFM69:DUMP:REG=0x22 Value=0x00
      13:08:18.477 -> 19144 RFM69:DUMP:REG=0x23 Value=0x02
      13:08:18.477 -> 19144 RFM69:DUMP:REG=0x24 Value=0xff
      13:08:18.477 -> 19144 RFM69:DUMP:REG=0x25 Value=0x00
      13:08:18.477 -> 19144 RFM69:DUMP:REG=0x26 Value=0x07
      13:08:18.477 -> 19145 RFM69:DUMP:REG=0x27 Value=0x80
      13:08:18.477 -> 19145 RFM69:DUMP:REG=0x28 Value=0x00
      13:08:18.477 -> 19145 RFM69:DUMP:REG=0x29 Value=0xe4
      13:08:18.477 -> 19145 RFM69:DUMP:REG=0x2a Value=0x00
      13:08:18.477 -> 19145 RFM69:DUMP:REG=0x2b Value=0x00
      13:08:18.477 -> 19145 RFM69:DUMP:REG=0x2c Value=0x00
      13:08:18.477 -> 19146 RFM69:DUMP:REG=0x2d Value=0x03
      13:08:18.477 -> 19146 RFM69:DUMP:REG=0x2e Value=0x88
      13:08:18.477 -> 19146 RFM69:DUMP:REG=0x2f Value=0x2d
      13:08:18.477 -> 19146 RFM69:DUMP:REG=0x30 Value=0x64
      13:08:18.477 -> 19146 RFM69:DUMP:REG=0x31 Value=0x00
      13:08:18.477 -> 19147 RFM69:DUMP:REG=0x32 Value=0x00
      13:08:18.477 -> 19147 RFM69:DUMP:REG=0x33 Value=0x00
      13:08:18.477 -> 19147 RFM69:DUMP:REG=0x34 Value=0x00
      13:08:18.477 -> 19147 RFM69:DUMP:REG=0x35 Value=0x00
      13:08:18.477 -> 19147 RFM69:DUMP:REG=0x36 Value=0x00
      13:08:18.477 -> 19148 RFM69:DUMP:REG=0x37 Value=0xd4
      13:08:18.477 -> 19148 RFM69:DUMP:REG=0x38 Value=0x40
      13:08:18.477 -> 19148 RFM69:DUMP:REG=0x39 Value=0xff
      13:08:18.477 -> 19148 RFM69:DUMP:REG=0x3a Value=0xff
      13:08:18.477 -> 19148 RFM69:DUMP:REG=0x3b Value=0x00
      13:08:18.477 -> 19149 RFM69:DUMP:REG=0x3c Value=0x05
      13:08:18.477 -> 19149 RFM69:DUMP:REG=0x3d Value=0x10
      13:08:18.477 -> 19149 RFM69:DUMP:REG=0x3e Value=0x00
      13:08:18.477 -> 19149 RFM69:DUMP:REG=0x3f Value=0x00
      13:08:18.477 -> 19149 RFM69:DUMP:REG=0x40 Value=0x00
      13:08:18.477 -> 19149 RFM69:DUMP:REG=0x41 Value=0x00
      13:08:18.477 -> 19150 RFM69:DUMP:REG=0x42 Value=0x00
      13:08:18.477 -> 19150 RFM69:DUMP:REG=0x43 Value=0x00
      13:08:18.477 -> 19150 RFM69:DUMP:REG=0x44 Value=0x00
      13:08:18.477 -> 19150 RFM69:DUMP:REG=0x45 Value=0x00
      13:08:18.477 -> 19150 RFM69:DUMP:REG=0x46 Value=0x00
      13:08:18.477 -> 19151 RFM69:DUMP:REG=0x47 Value=0x00
      13:08:18.477 -> 19151 RFM69:DUMP:REG=0x48 Value=0x00
      13:08:18.477 -> 19151 RFM69:DUMP:REG=0x49 Value=0x00
      13:08:18.477 -> 19151 RFM69:DUMP:REG=0x4a Value=0x00
      13:08:18.477 -> 19151 RFM69:DUMP:REG=0x4b Value=0x00
      13:08:18.477 -> 19152 RFM69:DUMP:REG=0x4c Value=0x00
      13:08:18.477 -> 19152 RFM69:DUMP:REG=0x4d Value=0x00
      13:08:18.477 -> 19152 RFM69:DUMP:REG=0x4e Value=0x01
      13:08:18.477 -> 19152 RFM69:DUMP:REG=0x4f Value=0x00
      13:08:18.545 -> 19205 TSM:INIT:TSP OK
      13:08:18.545 -> 19206 TSM:INIT:STATID=20
      13:08:18.745 -> 19418 TSF:SID:OK,ID=20
      13:08:18.745 -> 19418 TSM:FPAR
      13:08:18.745 -> 19418 RFM69:SWR:SEND,TO=255,SEQ=0,RETRY=0
      13:08:18.745 -> 19420 RFM69:CSMA:RSSI=-96
      13:08:18.745 -> 19424 ?TSF:MSG:SEND,20-20-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      13:08:19.991 -> done!
      13:08:19.991 -> 20676 MCO:BGN:INIT OK,TSP=0
      13:08:19.991 -> Running loop...
      13:08:19.991 -> Battery Voltage: 4.31 V
      13:08:19.991 -> Battery percent: 100 %
      13:08:19.991 -> 20677 !MCO:SND:NODE NOT REG
      13:08:20.736 -> 21425 !TSM:FPAR:NO REPLY
      

      Gateway:

      13238361 RFM69:SAC:SEND ACK,TO=5,RSSI=-19
      13238366 RFM69:CSMA:RSSI=-92
      13238369 RFM69:CSMA:RSSI=-92
      13238374 RFM69:CSMA:RSSI=-94
      13238379 RFM69:CSMA:RSSI=-94
      13238383 RFM69:CSMA:RSSI=-93
      13238388 RFM69:CSMA:RSSI=-99
      13242373 RFM69:SAC:SEND ACK,TO=63,RSSI=-20
      13242378 RFM69:CSMA:RSSI=-97
      13254767 RFM69:SAC:SEND ACK,TO=243,RSSI=-27
      13254772 RFM69:CSMA:RSSI=-99
      13256772 RFM69:SAC:SEND ACK,TO=138,RSSI=-27
      13256777 RFM69:CSMA:RSSI=-104
      

      NB: the GW and the feather are 20-30 cm apart so there shouldn't be any signal problem

      posted in Troubleshooting
      Alpoy
      Alpoy
    • RE: Feather M0 RFM60HCW (433Mhz) - can't connect to gw

      @electrik Yepp, using the new driver on the feather and GW
      @alexelite yeah I just tried it to see if it made any difference, and it didn't 😉

      posted in Troubleshooting
      Alpoy
      Alpoy
    • Feather M0 RFM60HCW (433Mhz) - can't connect to gw

      Hi,

      I've used a setup of ESP32 + Adafruit RFM69HCW modules to do some sensor logging and it's been working fine.
      Now, I'm trying to replace one of my ESP32 nodes for a Feather M0 RFM69HCW but I can't get it working with my GW (the GW work fine with other nodes).
      I've tried 2 separate Feather nodes as well, to eliminate any HW problem.
      Any help appreciated 😐

      Here's the log output:

      14:44:06.822 -> 19157 TSM:FAIL:RE-INIT
      14:44:06.822 -> 19157 TSM:INIT
      14:44:07.095 -> 19458 RFM69:INIT
      14:44:07.129 -> 19463 RFM69:INIT:PIN,CS=8,IQP=3,IQN=3,RST=4
      14:44:07.129 -> 19464 RFM69:PTX:LEVEL=5 dBm
      14:44:07.163 -> 19516 TSM:INIT:TSP OK
      14:44:07.163 -> 19516 TSM:INIT:STATID=20
      14:44:07.369 -> 19720 TSF:SID:OK,ID=20
      14:44:07.369 -> 19720 TSM:FPAR
      14:44:07.369 -> 19720 RFM69:SWR:SEND,TO=255,SEQ=0,RETRY=0
      14:44:07.369 -> 19722 RFM69:CSMA:RSSI=-99
      14:44:07.369 -> 19726 ?TSF:MSG:SEND,20-20-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      14:44:09.385 -> 21727 !TSM:FPAR:NO REPLY
      14:44:09.385 -> 21727 TSM:FPAR
      14:44:09.385 -> 21727 RFM69:SWR:SEND,TO=255,SEQ=1,RETRY=0
      14:44:09.385 -> 21728 RFM69:CSMA:RSSI=-101
      14:44:09.385 -> 21732 ?TSF:MSG:SEND,20-20-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      14:44:11.394 -> 23734 !TSM:FPAR:NO REPLY
      14:44:11.394 -> 23734 TSM:FPAR
      14:44:11.394 -> 23734 RFM69:SWR:SEND,TO=255,SEQ=2,RETRY=0
      14:44:11.394 -> 23735 RFM69:CSMA:RSSI=-92
      14:44:11.394 -> 23735 RFM69:CSMA:RSSI=-96
      14:44:11.394 -> 23739 ?TSF:MSG:SEND,20-20-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      14:44:13.249 -> Battery Voltage: 4.31 V
      14:44:13.249 -> Battery percent: 100 %
      14:44:13.249 -> 25607 !MCO:SND:NODE NOT REG
      14:44:13.386 -> 25741 !TSM:FPAR:NO REPLY
      14:44:13.386 -> 25741 TSM:FPAR
      14:44:13.386 -> 25741 RFM69:SWR:SEND,TO=255,SEQ=3,RETRY=0
      14:44:13.386 -> 25742 RFM69:CSMA:RSSI=-95
      14:44:13.386 -> 25746 ?TSF:MSG:SEND,20-20-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      14:44:15.388 -> 27748 !TSM:FPAR:FAIL
      14:44:15.388 -> 27748 TSM:FAIL:CNT=2
      14:44:15.388 -> 27748 TSM:FAIL:DIS
      14:44:15.388 -> 27748 TSF:TDI:TSL
      14:44:15.388 -> 27748 RFM69:RSL
      14:44:23.232 -> Battery Voltage: 4.31 V
      14:44:23.232 -> Battery percent: 100 %
      14:44:23.232 -> 35607 !MCO:SND:NODE NOT REG
      14:44:25.386 -> 37749 TSM:FAIL:RE-INIT
      

      ...and loop.

      here's the code:

      #define MY_DEBUG
      #define MY_DEBUG_VERBOSE_RFM69
      #define MY_RADIO_RFM69
      #define MY_IS_RFM69HW
      #define MY_RFM69_FREQUENCY RFM69_433MHZ
      #define MY_RFM69_NEW_DRIVER
      #define MY_DEFAULT_ERR_LED_PIN 13
      #define MY_RFM69_RST_PIN 4
      #define MY_RFM69_IRQ_PIN 3
      #define MY_RFM69_IRQ_NUM 3
      #define MY_RFM69_CS_PIN 8
      #define MY_NODE_ID 20
      #define MY_SIGNAL_REPORT_ENABLED
      #define MY_RFM69_ENABLE_ENCRYPTION
      #define MY_AES_KEY 0X01,0X54,0X8D,0XFD,0XCF,0X82,0XE9,0XDF,0X33,0XE7,0X50,0XE,0X62,0X9D,0X9C,0X09
      #define MY_TRANSPORT_WAIT_READY_MS 15000 
      
      #include <MySensors.h>
      #include "Arduino.h"
      
      #define TIME_TO_SLEEP 60  
      #define BATTERY_SENSE_PIN A7 
      #define CHILD_ID_RSSILEVEL 1
      #define CHILD_ID_BATTPCT 50
      #define CHILD_ID_BATTVOLT 51
      #define CHILD_ID_MBXTRIP 52
      #define MAX_BATTERY_V 4.2 
      #define MIN_BATTERY_V 2.5 
      
      
      bool debug = true;
      
      MyMessage battPctMsg(CHILD_ID_BATTPCT, V_PERCENTAGE);
      MyMessage battVoltMsg(CHILD_ID_BATTVOLT, V_VOLTAGE);
      MyMessage RSSILevel(CHILD_ID_RSSILEVEL, V_LEVEL);
      MyMessage MbxTrip(CHILD_ID_MBXTRIP, V_TRIPPED);
      
      void setup() {
        while (!Serial);
      }
      
        
      void presentation() {
        Serial.println("Sending presentation...");
        // Send the sketch version information to the gateway and Controller
        sendSketchInfo("Mbx", "1.2");
        present(CHILD_ID_BATTPCT, S_CUSTOM);
        present(CHILD_ID_BATTVOLT, S_MULTIMETER);
        present(CHILD_ID_RSSILEVEL, S_CUSTOM);
        present(CHILD_ID_MBXTRIP, S_DOOR);
      }
      
      void loop() {
        float batteryVoltage = analogRead(BATTERY_SENSE_PIN);
        batteryVoltage *= 2;    
        batteryVoltage *= 3.3;  
        batteryVoltage /= 1024;
        float range = MAX_BATTERY_V - MIN_BATTERY_V;
        int batteryPcnt = ((batteryVoltage - MIN_BATTERY_V) * 100) / range;
        if (batteryPcnt > 100) {
          batteryPcnt = 100;
        }
        if (debug) {
          Serial.print("Battery Voltage: ");
          Serial.print(batteryVoltage);
          Serial.println(" V");
          Serial.print("Battery percent: ");
          Serial.print(batteryPcnt);
          Serial.println(" %");
        }  
      
        send(battPctMsg.set(batteryPcnt,0));
        //send(battVoltMsg.set(batteryVoltage,2));
        float rssiReceive = RFM69_getReceivingRSSI();
        //send(RSSILevel.set(rssiReceive,0));
        wait(10000);
      }
      
      
      posted in Troubleshooting
      Alpoy
      Alpoy
    • RE: ESP32 - Change MOSI/MISO pins ?

      @mfalkvidd ah! Thank you! 🙂

      posted in Troubleshooting
      Alpoy
      Alpoy
    • ESP32 - Change MOSI/MISO pins ?

      Hi,

      I'm trying to get a Huzzah32 working with my RF69HCW module but where can I change the MISO/MISO/SCK pins ? I can't figure out where in the code they are set.

      The Huzzah32 has MOSI/MISO/SCK on pins 18/19/5 but the pins seems to be defined static somewhere as 23/19/18 based on this.

      posted in Troubleshooting
      Alpoy
      Alpoy
    • RE: Sensebender pinout

      Nice, thanks for helping guys! 👍

      posted in Hardware
      Alpoy
      Alpoy
    • RE: Sensebender pinout

      Apply face to palm ...., I must have read it completely wrong. 😕

      Oh, can I mount it directly on the backside...interesting! Can a RFM69HW module communicate with a RFM69HCW ? 🙂

      posted in Hardware
      Alpoy
      Alpoy
    • Sensebender pinout

      Hi,

      I just got my sensebender gateway, added the w5100 module and was about to add a RFM69HCW module but I got confused by the pinout on the Mysx 2.6.
      By reading the mysx docs I assumed Pin1 was the "square one", but according to the docs it's 3.3V but I measured 5V between Pin1 and 4...??

      Are there any "simple" pinout images of the mysx/Sensebender like there's for Arduino's?

      posted in Hardware
      Alpoy
      Alpoy
    • RE: openHAB 2.0 binding

      Thanks for making this binding! 🙂

      One question, is there a specific reason motion (tripped) sensors have to be Contact items?
      In OH2 all the Z-wave motion sensors are Switches (AFAIK) so it would be nice if the mysensor PIR's could also be Switches so I can just add these to my existing motion sensor groups and rules.

      (I tried setting a triggered channel as Switch but it didn't work)

      posted in OpenHAB
      Alpoy
      Alpoy
    • RE: Anyone got a few 47uf 0805 capacitors to sell (in Sweden)?

      Elfa.se ?

      posted in General Discussion
      Alpoy
      Alpoy
    • RE: Problem with RFM69 on Arduino nano...

      @DavidZH
      I finally figured it out, after some forum digging. Check https://forum.mysensors.org/topic/5806/solved-adafruit-rfm69hcw-breakout-doesnt-respond.

      These things should be sticky'ed somewhere, would have saved me a lot of time 😉

      posted in Hardware
      Alpoy
      Alpoy
    • RE: Problem with RFM69 on Arduino nano...

      @fcflopes did you ever figure this one out? I'm having the same problem on an UNO.
      I'm using a RFM69HCW from Adafruit, which works fine with the Radiohead/Adafruit test lib but I only get TSP FAIL when using a mysensor serial GW sketch.

      posted in Hardware
      Alpoy
      Alpoy
    • RE: RFM69 Supported on RPi Serial gateway?

      The only thing I've found on this is support in 2.2.0 beta, check these PR's:
      https://github.com/mysensors/MySensors/pull/728
      https://github.com/mysensors/MySensors/pull/624
      (don't know why there's two of them but one seems to be merged)

      I've been waiting for this to build my system on rfm69's ...hopefully one day soon (tm) I will have the time to test it 🙂

      posted in General Discussion
      Alpoy
      Alpoy