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. Announcements
  3. 💬 Door, Window and Push-button Sensor

💬 Door, Window and Push-button Sensor

Scheduled Pinned Locked Moved Announcements
110 Posts 36 Posters 22.5k Views 32 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.
  • P Offline
    P Offline
    Pavel Polititsky
    wrote on last edited by
    #81
    This post is deleted!
    1 Reply Last reply
    0
    • P Offline
      P Offline
      Pavel Polititsky
      wrote on last edited by Pavel Polititsky
      #82

      I was build a new button node with new arduino (8mhz) and new nrf24, then update to 2.3.0 gateway and all other devices
      But now have a worse result than before

      16 MCO:BGN:INIT NODE,CP=RNNNA---,VER=2.3.0
      26 TSM:INIT
      28 TSF:WUR:MS=0
      34 TSM:INIT:TSP OK
      36 TSF:SID:OK,ID=11
      38 TSM:FPAR
      75 TSF:MSG:SEND,11-11-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      403 TSF:MSG:READ,0-0-11,s=255,c=3,t=8,pt=1,l=1,sg=0:0
      409 TSF:MSG:FPAR OK,ID=0,D=1
      2084 TSM:FPAR:OK
      2084 TSM:ID
      2086 TSM:ID:OK
      2088 TSM:UPL
      2093 TSF:MSG:SEND,11-11-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=OK:1
      2099 TSF:MSG:READ,0-0-11,s=255,c=3,t=25,pt=1,l=1,sg=0:1
      2105 TSF:MSG:PONG RECV,HP=1
      2109 TSM:UPL:OK
      2111 TSM:READY:ID=11,PAR=0,DIS=1
      2129 TSF:MSG:SEND,11-11-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100
      2138 TSF:MSG:READ,0-0-11,s=255,c=3,t=15,pt=6,l=2,sg=0:0100
      2168 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.0
      2179 TSF:MSG:SEND,11-11-0-0,s=255,c=3,t=6,pt=1,l=1,sg=0,ft=0,st=OK:0
      2187 TSF:MSG:READ,0-0-11,s=255,c=3,t=6,pt=0,l=1,sg=0:M
      2220 TSF:MSG:SEND,11-11-0-0,s=255,c=3,t=11,pt=0,l=11,sg=0,ft=0,st=OK:Door button
      2230 TSF:MSG:SEND,11-11-0-0,s=255,c=3,t=12,pt=0,l=3,sg=0,ft=0,st=OK:1.5
      2240 TSF:MSG:SEND,11-11-0-0,s=3,c=0,t=0,pt=0,l=0,sg=0,ft=0,st=OK:
      2246 MCO:REG:REQ
      2252 TSF:MSG:SEND,11-11-0-0,s=255,c=3,t=26,pt=1,l=1,sg=0,ft=0,st=OK:2
      2260 TSF:MSG:READ,0-0-11,s=255,c=3,t=27,pt=1,l=1,sg=0:1
      2267 MCO:PIM:NODE REG=1
      2269 MCO:BGN:STP
      2271 MCO:BGN:INIT OK,TSP=1
      2275 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255
      2279 TSF:TDI:TSL
      2281 MCO:SLP:WUP=-1
      2283 TSF:TRI:TSB
      2287 TSF:MSG:SEND,11-11-0-0,s=3,c=1,t=16,pt=1,l=1,sg=0,ft=0,st=OK:0
      2295 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255
      2299 TSF:TDI:TSL
      

      the pressing button twice

      30343 MCO:SLP:WUP=0
      30345 TSF:TRI:TSB
      30347 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255
      30353 TSF:TDI:TSL
      30355 MCO:SLP:WUP=-1
      30357 TSF:TRI:TSB
      32043 !TSF:MSG:SEND,11-11-0-0,s=3,c=1,t=16,pt=1,l=1,sg=0,ft=3,st=NACK:1
      32049 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255
      32055 TSF:TDI:TSL
      32057 MCO:SLP:WUP=0
      32059 TSF:TRI:TSB
      32061 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255
      32067 TSF:TDI:TSL
      32069 MCO:SLP:WUP=-1
      32071 TSF:TRI:TSB
      32073 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255
      32079 TSF:TDI:TSL
      32081 MCO:SLP:WUP=0
      32083 TSF:TRI:TSB
      32086 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255
      32092 TSF:TDI:TSL
      32094 MCO:SLP:WUP=-1
      32096 TSF:TRI:TSB
      33779 !TSF:MSG:SEND,11-11-0-0,s=3,c=1,t=16,pt=1,l=1,sg=0,ft=4,st=NACK:0
      33787 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255
      33794 TSF:TDI:TSL
      

      But no incoming messages at the gateway. Only several random messages coming to controller from one hundred button clicks
      Sometimes after fast series of clicks I get this:

      23179 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255
      23183 !MCO:SLP:TNR
      23185 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255
      23191 !MCO:SLP:TNR
      23218 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255
      23222 !MCO:SLP:TNR
      23224 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255
      23230 !MCO:SLP:TNR
      23257 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255
      23261 !MCO:SLP:TNR
      23263 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255
      23269 !MCO:SLP:TNR
      23296 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255
      23300 !MCO:SLP:TNR
      23302 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255
      23308 !MCO:SLP:TNR
      23336 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255
      23341 !MCO:SLP:TNR
      23343 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255
      23349 !MCO:SLP:TNR
      23377 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255
      23382 !MCO:SLP:TNR
      23384 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255
      23390 !MCO:SLP:TNR
      23418 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255
      23422 !MCO:SLP:TNR
      23425 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255
      23431 !MCO:SLP:TNR
      23459 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255
      23463 !MCO:SLP:TNR
      23465 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255
      23472 !MCO:SLP:TNR
      23500 !TSF:SND:TNR
      23502 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255
      23506 !MCO:SLP:TNR
      23508 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255
      23515 !MCO:SLP:TNR
      23543 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255
      23547 !MCO:SLP:TNR
      23549 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255
      23556 !MCO:SLP:TNR
      23584 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255
      23588 !MCO:SLP:TNR
      23590 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255
      23597 !MCO:SLP:TNR
      23625 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255
      23629 !MCO:SLP:TNR
      23631 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255
      23638 !MCO:SLP:TNR
      23666 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255
      23670 !MCO:SLP:TNR
      23672 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255
      23678 !MCO:SLP:TNR
      23707 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255
      23711 !MCO:SLP:TNR
      23713 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255
      23719 !MCO:SLP:TNR
      23746 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255
      23750 !MCO:SLP:TNR
      23752 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255
      23758 !MCO:SLP:TNR
      23785 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255
      23789 !MCO:SLP:TNR
      23791 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255
      23797 !MCO:SLP:TNR
      23824 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255
      23828 !MCO:SLP:TNR
      23830 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255
      23836 !MCO:SLP:TNR
      23863 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255
      23867 !MCO:SLP:TNR
      23869 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255
      23875 !MCO:SLP:TNR
      23902 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255
      23906 !MCO:SLP:TNR
      23908 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255
      23914 !MCO:SLP:TNR
      23941 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255
      23945 !MCO:SLP:TNR
      23947 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255
      23953 !MCO:SLP:TNR
      23980 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255
      23984 !MCO:SLP:TNR
      23986 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255
      23992 !MCO:SLP:TNR
      24014 TSF:MSG:READ,0-0-11,s=255,c=3,t=8,pt=1,l=1,sg=0:0
      24020 TSF:MSG:FPAR OK,ID=0,D=1
      24025 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255
      24029 !MCO:SLP:TNR
      24031 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255
      24037 !MCO:SLP:TNR
      24064 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255
      24068 !MCO:SLP:TNR
      24070 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255
      24076 !MCO:SLP:TNR
      24104 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255
      24109 !MCO:SLP:TNR
      24111 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255
      24117 !MCO:SLP:TNR
      24145 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255
      24150 !MCO:SLP:TNR
      24152 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255
      24158 !MCO:SLP:TNR
      24186 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255
      24190 !MCO:SLP:TNR
      24193 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255
      24199 !MCO:SLP:TNR
      24227 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255
      24231 !MCO:SLP:TNR
      24233 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255
      24240 !MCO:SLP:TNR
      24268 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255
      24272 !MCO:SLP:TNR
      24274 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255
      24281 !MCO:SLP:TNR
      24309 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255
      24313 !MCO:SLP:TNR
      24315 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255
      24322 !MCO:SLP:TNR
      24350 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255
      24354 !MCO:SLP:TNR
      24356 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255
      24363 !MCO:SLP:TNR
      24391 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255
      24395 !MCO:SLP:TNR
      24397 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255
      24403 !MCO:SLP:TNR
      24432 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255
      24436 !MCO:SLP:TNR
      24438 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255
      24444 !MCO:SLP:TNR
      24471 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255
      24475 !MCO:SLP:TNR
      24477 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255
      24483 !MCO:SLP:TNR
      24510 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255
      24514 !MCO:SLP:TNR
      24516 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255
      24522 !MCO:SLP:TNR
      24549 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255
      24553 !MCO:SLP:TNR
      24555 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255
      24561 !MCO:SLP:TNR
      24588 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255
      24592 !MCO:SLP:TNR
      24594 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255
      24600 !MCO:SLP:TNR
      24627 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255
      24631 !MCO:SLP:TNR
      24633 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255
      24639 !MCO:SLP:TNR
      24666 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255
      24670 !MCO:SLP:TNR
      24672 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255
      24678 !MCO:SLP:TNR
      24705 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255
      24709 !MCO:SLP:TNR
      24711 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255
      24717 !MCO:SLP:TNR
      24745 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255
      24750 !MCO:SLP:TNR
      24752 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255
      24758 !MCO:SLP:TNR
      24786 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255
      24791 !MCO:SLP:TNR
      24793 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255
      24799 !MCO:SLP:TNR
      24827 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255
      24832 !MCO:SLP:TNR
      24834 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255
      24840 !MCO:SLP:TNR
      24868 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255
      24872 !MCO:SLP:TNR
      24875 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255
      24881 !MCO:SLP:TNR
      24909 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255
      24913 !MCO:SLP:TNR
      24915 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255
      24922 !MCO:SLP:TNR
      24950 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255
      24954 !MCO:SLP:TNR
      24956 MCO:SLP:MS=25,SMS=0,I1=255,M1=255,I2=255,M2=255
      24963 !MCO:SLP:TNR
      24991 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255
      24995 !MCO:SLP:TNR
      24997 MCO:SLP:MS=25,
      

      Then it continue works as before

      Actually I have problems only with fu@ing button, most simplest device. Several month I can't to start use it.
      All other devices are working properly even on 2.3.0 ver. :stuck_out_tongue_winking_eye:

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

        Have you tried with a debouce? Just in case...

        P 2 Replies Last reply
        0
        • gohanG gohan

          Have you tried with a debouce? Just in case...

          P Offline
          P Offline
          Pavel Polititsky
          wrote on last edited by
          #84
          This post is deleted!
          1 Reply Last reply
          0
          • gohanG gohan

            Have you tried with a debouce? Just in case...

            P Offline
            P Offline
            Pavel Polititsky
            wrote on last edited by
            #85

            @gohan the default sketch with debounce library works better, but now i see my primary problem.
            Occasionally I have an ACK errors

            4231 TSF:MSG:SEND,21-21-0-0,s=3,c=1,t=16,pt=2,l=2,sg=0,ft=0,st=OK:0
            4239 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255
            4245 TSF:TDI:TSL
            4247 MCO:SLP:WUP=0
            4249 TSF:TRI:TSB
            4290 !TSF:MSG:SEND,21-21-0-0,s=3,c=1,t=16,pt=2,l=2,sg=0,ft=0,st=NACK:1
            4298 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255
            4302 TSF:TDI:TSL
            4304 MCO:SLP:WUP=0
            4306 TSF:TRI:TSB
            4313 TSF:MSG:SEND,21-21-0-0,s=3,c=1,t=16,pt=2,l=2,sg=0,ft=1,st=OK:0
            4321 MCO:SLP:MS=0,SMS=0,I1=0,M1=1,I2=255,M2=255
            

            I tried to icrease the time ack on my controller - it does not help
            Ithink that I need to ckeck ack state on the node and send the message again, but have no idea how to do

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

              you are at the limit of the radio range I'd say so randomly it looses a message, so you need to either increase power or get a better antenna (I hope you aren't using any buck/boost converter as power supply)

              P 1 Reply Last reply
              0
              • gohanG gohan

                you are at the limit of the radio range I'd say so randomly it looses a message, so you need to either increase power or get a better antenna (I hope you aren't using any buck/boost converter as power supply)

                P Offline
                P Offline
                Pavel Polititsky
                wrote on last edited by
                #87

                @gohan how you know?
                Id 21 from range 0..255. Are you sure that is limit?

                Same with any different IDs, I tried sending message 3 times, this guarantees delivery of payload, but it using too much power

                Now I use power supply with 1117

                But my other nodes powered by CR2032 with boost 0.8-3.3V dc/dc with inductor coil on the NRF24 supply pin without any troubles

                Nca78N 1 Reply Last reply
                0
                • P Pavel Polititsky

                  @gohan how you know?
                  Id 21 from range 0..255. Are you sure that is limit?

                  Same with any different IDs, I tried sending message 3 times, this guarantees delivery of payload, but it using too much power

                  Now I use power supply with 1117

                  But my other nodes powered by CR2032 with boost 0.8-3.3V dc/dc with inductor coil on the NRF24 supply pin without any troubles

                  Nca78N Offline
                  Nca78N Offline
                  Nca78
                  Hardware Contributor
                  wrote on last edited by
                  #88

                  @pavel-polititsky said in 💬 Door, Window and Push-button Sensor:

                  @gohan how you know?
                  Id 21 from range 0..255. Are you sure that is limit?

                  He means radio range (distance) not ID of node ;)

                  P 1 Reply Last reply
                  0
                  • Nca78N Nca78

                    @pavel-polititsky said in 💬 Door, Window and Push-button Sensor:

                    @gohan how you know?
                    Id 21 from range 0..255. Are you sure that is limit?

                    He means radio range (distance) not ID of node ;)

                    P Offline
                    P Offline
                    Pavel Polititsky
                    wrote on last edited by
                    #89

                    @nca78 oke, undestood
                    Problem stiil not resolved. I want to send message again to the gateway if NACK but dont know how to do it.

                    send(msg.set(value == HIGH), true); 
                    

                    in this case i have additional ack log in the serial debug, nothing more

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

                      The send function returns a value, so you can check if it was successfully sent or not and in case retry

                      1 Reply Last reply
                      0
                      • alowhumA Offline
                        alowhumA Offline
                        alowhum
                        Plugin Developer
                        wrote on last edited by alowhum
                        #91

                        A quick ACK example:

                                static boolean tryAgainLater = false; // should we resend?
                        
                                if(send(msgDust.setSensor(CHILD_ID_DUST_PM25).set(sensorValue),1)){
                                  Serial.println(F("Received ACK"));
                                  tryAgainLater = false;
                                }else {
                                  Serial.println(F("Connection problem, try again"));
                                  tryAgainLater = true;
                                }
                        
                        1 Reply Last reply
                        0
                        • mfalkviddM Offline
                          mfalkviddM Offline
                          mfalkvidd
                          Mod
                          wrote on last edited by mfalkvidd
                          #92

                          There is no need to set the second parameter to send() to true. That parameter is unrelated to the return value (except very unfortunate similar naming). More info: https://github.com/mysensors/MySensors/issues/1103

                          1 Reply Last reply
                          1
                          • alowhumA Offline
                            alowhumA Offline
                            alowhum
                            Plugin Developer
                            wrote on last edited by alowhum
                            #93

                            @mfalkvidd said in 💬 Door, Window and Push-button Sensor:

                            https://github.com/mysensors/MySensors/issues/1103

                            Ah, thanks. So ACK basically always happens?

                            in that case, do you have any better example code on how to check if the ACK is received?

                            mfalkviddM 1 Reply Last reply
                            0
                            • alowhumA alowhum

                              @mfalkvidd said in 💬 Door, Window and Push-button Sensor:

                              https://github.com/mysensors/MySensors/issues/1103

                              Ah, thanks. So ACK basically always happens?

                              in that case, do you have any better example code on how to check if the ACK is received?

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

                              @alowhum on nrf24, "hardware" ack is always on. "Software" ack is controlled by the second parameter in the send() function. Read https://forum.mysensors.org/post/34267 for an attempt to sort out the details. It is still quite confusing for me.

                              1 Reply Last reply
                              0
                              • tianaT Offline
                                tianaT Offline
                                tiana
                                wrote on last edited by
                                #95

                                What will happen if i cut the power OFF of the radio after each transmission? is it needed to be initialize again before next transmission?

                                mfalkviddM 1 Reply Last reply
                                0
                                • tianaT tiana

                                  What will happen if i cut the power OFF of the radio after each transmission? is it needed to be initialize again before next transmission?

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

                                  @tiana yes.

                                  But don't cut the power. Use transportDisable and transportReInitialize instead.

                                  1 Reply Last reply
                                  0
                                  • tianaT Offline
                                    tianaT Offline
                                    tiana
                                    wrote on last edited by
                                    #97

                                    Do you know how much will be power usage in transportDisable mode?

                                    mfalkviddM 1 Reply Last reply
                                    0
                                    • tianaT tiana

                                      Do you know how much will be power usage in transportDisable mode?

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

                                      @tiana depends on which transport you are using, and if using genuine or clone chips. The nrf24 is rated for 900nA.

                                      1 Reply Last reply
                                      0
                                      • tianaT Offline
                                        tianaT Offline
                                        tiana
                                        wrote on last edited by
                                        #99

                                        Thanks for fast reply, actually 900nA is to big number and i prefer to use xxx_POWER_PIN to cut the power of the NRF module.
                                        I am building switch powered with CR2032 battery and i want to extend battery live as much as possible, for a switch is not needed to keep radio alive, i need it ON only when transmit signal

                                        mfalkviddM 1 Reply Last reply
                                        0
                                        • tianaT tiana

                                          Thanks for fast reply, actually 900nA is to big number and i prefer to use xxx_POWER_PIN to cut the power of the NRF module.
                                          I am building switch powered with CR2032 battery and i want to extend battery live as much as possible, for a switch is not needed to keep radio alive, i need it ON only when transmit signal

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

                                          @tiana 900nA on a cr2032 is 27.9 years battery life. The self discharge of a cr2032 is around 250nA.
                                          But yes, use the power pin setting if you want to.

                                          Would be interesting to see how long sleep times are needed to make up for the extra time needed to wake up the radio from power off compared to sleep. The mcu and the radio will need to be awake for 100ms longer time when starting from power off than when starting from sleep.

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


                                          13

                                          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