Navigation

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

    Erik Forsberg

    @Erik Forsberg

    1
    Reputation
    8
    Posts
    475
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    Erik Forsberg Follow

    Best posts made by Erik Forsberg

    • 2.0 beta, compatible with 1.5?

      Hi!

      I wanted to try out Mysensors 2.0 beta (the Arduino library) since I have hit the bug that makes signing + relay nodes not work.

      How ready is 2.0 beta, can I expect it to work? 🙂 Any planned release date?

      What do I need to upgrade? All my nodes, or only the relay? Or the relay + the controller. Is the on-the-wire protocol the same so that multiple versions of mysensors library can cooperate on the same sensor network?

      Cheers!
      \EF

      posted in Development
      Erik Forsberg
      Erik Forsberg

    Latest posts made by Erik Forsberg

    • RE: (Relay) node asks for parent. Gateway forwards (!)

      Hmm.. basically, this node works if signing is disabled. If it's enabled, all the nonce requests fail to transmit (with st=NACK). Disabling signing, it has greater success in transferring its data.

      So I guess it's yet another problem with the radio. I suspected this.

      This is an NRF24L01+PA+LNA module. I have:

      • Tried multiple radio modules to rule out a faulty one.
      • Put the radio module on a dedicated 3.3V power regulator.
      • Tried both high and low PA level.
      • Same thing on gateway - NRF24L01+PA+LNA, on dedicated 3.3V power regulator.

      It seems to succeed in most cases, at least when it's sending just a set request. Presentations and others do not work. It's like it's having trouble transmitting longer messages. Odd.

      The code in this sketch is using an interrupt handler to count pulsess on my energy meter. Could this be related?

      Some debug output from the node, with signing disabled:

      MCO:BGN:INIT REPEATER,CP=RNNRA--,VER=2.0.1-beta
      TSM:INIT
      TSM:INIT:TSP OK
      TSF:ASID:OK,ID=4
      TSM:FPAR
      TSF:MSG:SEND,4-4-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
      TSF:MSG:READ,0-0-4,s=255,c=3,t=8,pt=1,l=1,sg=0:0
      TSF:MSG:FPAR RES,ID=0,D=0
      TSF:MSG:FPAR OK,ID=0,D=1
      TSM:FPAR:OK
      TSM:ID
      TSM:ID:OK,ID=4
      TSM:UPL
      TSF:PING:SEND,TO=0
      TSF:MSG:SEND,4-4-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=OK:1
      TSF:MSG:READ,0-0-4,s=255,c=3,t=25,pt=1,l=1,sg=0:1
      TSF:MSG:PONG RECV,HP=1
      TSF:CHKUPL:OK
      TSM:UPL:OK
      TSM:READY
      TSF:MSG:SEND,4-4-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100
      !TSF:MSG:SEND,4-4-0-0,s=255,c=0,t=18,pt=0,l=10,sg=0,ft=0,st=NACK:2.0.1-beta
      TSF:MSG:SEND,4-4-0-0,s=255,c=3,t=6,pt=1,l=1,sg=0,ft=1,st=OK:0
      TSF:MSG:READ,0-0-4,s=255,c=3,t=15,pt=6,l=2,sg=0:0100
      TSF:MSG:READ,0-0-4,s=255,c=3,t=6,pt=0,l=1,sg=0:M
      !TSF:MSG:SEND,4-4-0-0,s=255,c=3,t=11,pt=0,l=12,sg=0,ft=0,st=NACK:Energy Meter
      TSF:MSG:SEND,4-4-0-0,s=255,c=3,t=12,pt=0,l=3,sg=0,ft=1,st=OK:1.1
      TSF:MSG:SEND,4-4-0-0,s=4,c=0,t=13,pt=0,l=0,sg=0,ft=0,st=OK:
      MCO:REG:REQ
      TSF:MSG:SEND,4-4-0-0,s=255,c=3,t=26,pt=1,l=1,sg=0,ft=0,st=OK:2
      TSF:MSG:READ,0-0-4,s=255,c=3,t=27,pt=1,l=1,sg=0:1
      MCO:PIM:NODE REG=1
      setup(). Radio Channel is 42
      TSF:MSG:SEND,4-4-0-0,s=4,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK:
      MCO:BGN:INIT OK,ID=4,PAR=0,DIS=1,REG=1
      TSF:MSG:READ,0-0-4,s=4,c=1,t=24,pt=0,l=7,sg=0:7418044
      Received last pulse count from gw:7418044
      TSF:MSG:SEND,4-4-0-0,s=4,c=1,t=17,pt=5,l=4,sg=0,ft=0,st=OK:3169
      Watt:3169
      !TSF:MSG:SEND,4-4-0-0,s=4,c=1,t=24,pt=5,l=4,sg=0,ft=0,st=NACK:7418088
      !TSF:MSG:SEND,4-4-0-0,s=4,c=1,t=18,pt=7,l=5,sg=0,ft=1,st=NACK:741.8089
      TSF:MSG:SEND,4-4-0-0,s=4,c=1,t=17,pt=5,l=4,sg=0,ft=2,st=OK:3156
      Watt:3156
      TSF:MSG:SEND,4-4-0-0,s=4,c=1,t=24,pt=5,l=4,sg=0,ft=0,st=OK:7418132
      TSF:MSG:SEND,4-4-0-0,s=4,c=1,t=18,pt=7,l=5,sg=0,ft=0,st=OK:741.8133
      TSF:MSG:SEND,4-4-0-0,s=4,c=1,t=17,pt=5,l=4,sg=0,ft=0,st=OK:3169
      Watt:3169
      TSF:MSG:SEND,4-4-0-0,s=4,c=1,t=24,pt=5,l=4,sg=0,ft=0,st=OK:7418177
      TSF:MSG:SEND,4-4-0-0,s=4,c=1,t=18,pt=7,l=5,sg=0,ft=0,st=OK:741.8177
      TSF:MSG:SEND,4-4-0-0,s=4,c=1,t=17,pt=5,l=4,sg=0,ft=0,st=OK:7311
      Watt:7241
      TSF:MSG:SEND,4-4-0-0,s=4,c=1,t=24,pt=5,l=4,sg=0,ft=0,st=OK:7418249
      TSF:MSG:SEND,4-4-0-0,s=4,c=1,t=18,pt=7,l=5,sg=0,ft=0,st=OK:741.8249```
      posted in Troubleshooting
      Erik Forsberg
      Erik Forsberg
    • RE: (Relay) node asks for parent. Gateway forwards (!)

      @tekka Thankyou! I will need to dig further another day. I will start by upgrading that troublesome node to the latest library version and see if the problem persists.

      After enabling signing debug, it's now complaining a lot about the node not signing messages that should really be signed. So there could be some bug hidden in the combination of a node that makes both get and set requests, is a relay, and use soft signing.

      I'll report back as soon as I find the time to make these experiments.

      posted in Troubleshooting
      Erik Forsberg
      Erik Forsberg
    • RE: (Relay) node asks for parent. Gateway forwards (!)

      @Erik-Forsberg

      So, replying to my own post, after looking a bit closer, it does send a reply telling the node that its parent is 0. So I guess the problem is on the other side some way. Hmm.. Need to investigate further.

      posted in Troubleshooting
      Erik Forsberg
      Erik Forsberg
    • (Relay) node asks for parent. Gateway forwards (!)

      Hi!

      I have a problem with one of my nodes, a sensor that is counting pulses on my power meter and also acts as relay. The relay functionality works fine from what I can see, but I'm not receiving any data from the power meter.

      I don't have the output from the actual node available (it's in the garage..), but I see strange things happening on the gateway. Here's a typical message that reoccurs every 10s:

      16-08-07 19:58:04 mysensors.mysensors: n:0 c:255 t:3 s:9 p:TSF:MSG:READ,4-4-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
      16-08-07 19:58:04 mysensors.mysensors: n:0 c:255 t:3 s:9 p:TSF:MSG:BC
      16-08-07 19:58:04 mysensors.mysensors: n:0 c:255 t:3 s:9 p:TSF:MSG:FPAR REQ,ID=4
      16-08-07 19:58:04 mysensors.mysensors: n:0 c:255 t:3 s:9 p:TSF:CHKUPL:OK,FCTRL
      16-08-07 19:58:04 mysensors.mysensors: n:0 c:255 t:3 s:9 p:TSF:MSG:GWL OK
      16-08-07 19:58:05 mysensors.mysensors: n:0 c:255 t:3 s:9 p:TSF:MSG:SEND,0-0-4-4,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0
      

      Now, I don't have the whole protocol understanding, and I just switched to 2.0.1-beta1 (directly off git) on the gateway to see if that was the problem, but if I read the above right the node (node id 4) is sending a request to get a parent, but the gateway forwards it instead of replying with a message that it is the parent.

      Am I right? What could be the reason of this? Bad routing table in gateway?

      Receiving messages from other nodes works w/o problems - even from nodes that pass through this troublesome node.

      Gateway is running what's on development branch right now (d054c1c0c87d444c2e34e0e49f5e357e401ee209). The node is running a slightly earlier version.

      Thanks!
      \EF

      For reference, here's my gateway code:

      
      // Enable debug prints to serial monitor
      #define MY_DEBUG 
      // Enable and select radio type attached
      #define MY_RADIO_NRF24
      
      // Set LOW transmit power level as default, if you have an amplified NRF-module and
      // power your radio separately with a good regulator you can turn up PA level. 
      #define MY_RF24_PA_LEVEL RF24_PA_HIGH
      #define MY_RF24_CHANNEL  42
      // Enable serial gateway
      #define MY_GATEWAY_SERIAL
      // Flash leds on rx/tx/err
      // #define MY_LEDS_BLINKING_FEATURE
      // Set blinking period
      #define MY_DEFAULT_LED_BLINK_PERIOD 300
      // Set inclusion mode duration (in seconds)
      #define MY_INCLUSION_MODE_DURATION 60 
      // Digital pin used for inclusion mode button
      #define MY_INCLUSION_MODE_BUTTON_PIN  3 
      
      // Uncomment to override default HW configurations
      //#define MY_DEFAULT_ERR_LED_PIN 4  // Error led pin
      //#define MY_DEFAULT_RX_LED_PIN  6  // Receive led pin
      //#define MY_DEFAULT_TX_LED_PIN  5  // the PCB, on board LED
      
      #include <SPI.h>
      #include <MySensors.h>  
      
      void setup() { 
        // Setup locally attached sensors
      }
      
      void presentation() {
       // Present locally attached sensors 
      }
      
      void loop() { 
        // Send locally attached sensor data here 
      }
      
      posted in Troubleshooting
      Erik Forsberg
      Erik Forsberg
    • 2.0 beta, compatible with 1.5?

      Hi!

      I wanted to try out Mysensors 2.0 beta (the Arduino library) since I have hit the bug that makes signing + relay nodes not work.

      How ready is 2.0 beta, can I expect it to work? 🙂 Any planned release date?

      What do I need to upgrade? All my nodes, or only the relay? Or the relay + the controller. Is the on-the-wire protocol the same so that multiple versions of mysensors library can cooperate on the same sensor network?

      Cheers!
      \EF

      posted in Development
      Erik Forsberg
      Erik Forsberg
    • RE: Expected reply from Controller if requesting a variable that does not exist?

      @martinhjelmare

      I tend to agree with that. In the case of the Power Meter, it should instead detect that it has never before booted and adapt to that.

      I'm glad to hear you're working on req message type. I, ehm, did that too: https://github.com/theolind/pymysensors/pull/22 🙂

      Your implementation is probably better since this is my first visit to this codebase, so feel free to reject the pull.

      posted in General Discussion
      Erik Forsberg
      Erik Forsberg
    • Expected reply from Controller if requesting a variable that does not exist?

      I recently built a Pulse Powermeter Sensor and after wiring it up I realized that to start reporting data, it wants the pulse count from the controller. This creates a bit of a chicken/egg situation, as before the sensor has reported its first pulse count, there's no pulse count to report 🙂

      So, is there a documented default value the controller should report whenever it gets a request for a variable that does not exist? Or should it simply not reply in this case?

      My controller, Home Assistant, returns nothing - but I think that's partly because the pymysensors library used underneath seems to lack support for returning values to the sensors.

      So how should this work from the controller's point of view?

      posted in General Discussion
      Erik Forsberg
      Erik Forsberg
    • What does the LED blinking (pin 13) mean?

      I've managed to put together a couple of mysensors with arduino pro mini. I notice that when they startup, they do some blinking with the built-in LED (the one connected to pin 13).

      I tried to find where in the code this happens, but failed. Is there an explanation to this blinking, i.e. any patterns that indicate success or failure connecting to network, etc?

      posted in General Discussion
      Erik Forsberg
      Erik Forsberg