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. Development
  3. NodeManager
  4. Integrating NodeManager with Sketch Generator

Integrating NodeManager with Sketch Generator

Scheduled Pinned Locked Moved NodeManager
26 Posts 3 Posters 7.0k Views 5 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.
  • U Offline
    U Offline
    user2684
    Contest Winner
    wrote on last edited by
    #11

    PS. I think the ascii art is coming from https://github.com/mysensors/MySensors/blob/development/core/MySplashScreen.cpp

    1 Reply Last reply
    0
    • rakeshpaiR rakeshpai

      Sorry for the lack of detail. You can get the latest gateway sketch from the app itself at https://rakeshpai.github.io/mysensors-network-manager/

      The sketch is just a barebones sketch, wiring up the before, presentation, etc. functions to node manager. The config.h is as follows, though nothing stands out to me as being out of place.

      
      #ifndef config_h
      #define config_h
      
      // Message signing
      #define MY_SIGNING_SOFT
      #define MY_SIGNING_SOFT_RANDOMSEED_PIN 7
      #define MY_SIGNING_REQUEST_SIGNATURES
      
      
      /**********************************
       * Sketch configuration
       */
      
      #define SKETCH_NAME "Gateway"
      #define SKETCH_VERSION "1.0"
      #define MY_REPEATER_FEATURE
      
      
      /**********************************
       * MySensors node configuration
       */
      
      // General settings
      #define MY_BAUD_RATE 9600
      //#define MY_DEBUG
      
      
      // NRF24 radio settings
      #define MY_RADIO_NRF24
      #define MY_RF24_ENABLE_ENCRYPTION
      #define MY_RF24_CHANNEL 76
      #define MY_RF24_PA_LEVEL RF24_PA_LOW
      //#define MY_DEBUG_VERBOSE_RF24
      
      
      // Serial gateway settings
      #define MY_GATEWAY_SERIAL
      
      
      /***********************************
       * NodeManager configuration
       */
      
      // if enabled, enable debug messages on serial port
      //#define DEBUG 1
      
      #define POWER_MANAGER 0
      #define BATTERY_MANAGER 0
      // if enabled, allow modifying the configuration remotely by interacting with the configuration child id
      #define REMOTE_CONFIGURATION 1
      // if enabled, persist the configuration settings on EEPROM
      #define PERSIST 0
      // if enabled, a battery sensor will be created at BATTERY_CHILD_ID and will report vcc voltage together with the battery level percentage
      #define BATTERY_SENSOR 0
      // if enabled, send a SLEEPING and AWAKE service messages just before entering and just after leaving a sleep cycle and STARTED when starting/rebooting
      #define SERVICE_MESSAGES 0
      
      // Enable this module to use one of the following sensors: SENSOR_ANALOG_INPUT, SENSOR_LDR, SENSOR_THERMISTOR, SENSOR_MQ, SENSOR_ML8511, SENSOR_ACS712, SENSOR_RAIN_GAUGE
      #define MODULE_ANALOG_INPUT 0
      // Enable this module to use one of the following sensors: SENSOR_DIGITAL_INPUT
      #define MODULE_DIGITAL_INPUT 0
      // Enable this module to use one of the following sensors: SENSOR_DIGITAL_OUTPUT, SENSOR_RELAY, SENSOR_LATCHING_RELAY
      #define MODULE_DIGITAL_OUTPUT 0
      // Enable this module to use one of the following sensors: SENSOR_DHT11, SENSOR_DHT22
      #define MODULE_DHT 0
      // Enable this module to use one of the following sensors: SENSOR_SHT21
      #define MODULE_SHT21 0
      // Enable this module to use one of the following sensors: SENSOR_SWITCH, SENSOR_DOOR, SENSOR_MOTION
      #define MODULE_SWITCH 0
      // Enable this module to use one of the following sensors: SENSOR_DS18B20
      #define MODULE_DS18B20 0
      // Enable this module to use one of the following sensors: SENSOR_BH1750
      #define MODULE_BH1750 0
      // Enable this module to use one of the following sensors: SENSOR_MLX90614
      #define MODULE_MLX90614 0
      // Enable this module to use one of the following sensors: SENSOR_BME280
      #define MODULE_BME280 0
      // Enable this module to use one of the following sensors: SENSOR_SONOFF
      #define MODULE_SONOFF 0
      // Enable this module to use one of the following sensors: SENSOR_BMP085
      #define MODULE_BMP085 0
      // Enable this module to use one of the following sensors: SENSOR_HCSR04
      #define MODULE_HCSR04 0
      // Enable this module to use one of the following sensors: SENSOR_MCP9808
      #define MODULE_MCP9808 0
      
      #endif
      
      U Offline
      U Offline
      user2684
      Contest Winner
      wrote on last edited by
      #12

      @rakeshpai I cannot reproduce the issue, with your config.h looks like it is working fine here :-/

      NodeManager v1.6-dev
      LIB R=N E=X T=R A=A S=S B=-
      INT P=3 M=255
      INT P=2 M=255
      0;255;3;0;14;Gateway startup complete.
      0;255;0;0;18;2.2.0-beta
      RADIO OK
      0;255;3;0;11;Gateway
      0;255;3;0;12;1.0
      PRES I=200, T=23
      0;200;0;0;23;
      READY
      
      MY I=0 M=1
      
      1 Reply Last reply
      0
      • U user2684

        That's correct, for a motion sensor or a switch, reporting inteval does not make sense (even if technically the loop() function is called every 10 minutes which is the default reporting interval if a custom one is not provided but this does not make any difference). I'd keep per-sensor reporting inteval as you suggest, it seems easier for a new user to me as well.

        • Regarding that amazing piece of ascii art, unfortunately it is not coming from me :) No idea where it comes from! I'll look into this gateway issue (https://github.com/mysensors/NodeManager/issues/187)
        • When opening https://rakeshpai.github.io/mysensors-network-manager/ after clicking on the "there is an update please click here" message, I have now a "Just a moment..." message fixed on the screen and I couldn't recover the app even after clearing the cache of my browser. In an incognito window of course works just fine
        • I'd probably add a global setting (maybe in advanced) for enabling MySensors and/or NodeManager debug since this may be a common task even of a new user when requested
        • Having soft signing defined in config.h is in my backlog as well and will be added soon
        • We probably need a way to select which MySensors API version we are using. MY_RFM69_NEW_DRIVER is only available in v2.2-beta and the old RF69_868MHZ will become RFM69_868MHZ which may cause compilation errors if the wrong library version is installed
        • Are you sure MY_RF69_IRQ_PIN, MY_RF69_IRQ_NUM and MY_RF69_SPI_CS have to be defined with a pro mini board? I thought they were only to be set when using a ESP8266
        • You may want to use the updated config.h which now includes a few more common directives. Even if they are commented out can be useful for a user to have those example available
        • When adding a PIR sensor, the pin in the code is always 0
        • You can add automatically in config.h a #define MAX_SENSORS 10 where the number is automatically calculated based on the number of sensors configured. This will help in saving storage if defining just a few sensors or allowing multiple sensors to be allocated
        • We can probably start adding all the other built-in sensors left out so far, now that the available functions are not subject of big changes. Let me know if you need any help with it

        Thanks and once again excellent job!

        rakeshpaiR Offline
        rakeshpaiR Offline
        rakeshpai
        wrote on last edited by
        #13

        @user2684 Woops, if you only see the loading message, I've dun goofed. Can you please look in your JS console (Ctrl+Shift+I) and tell me what is the error you see?

        To fix the problem, you can delete your existing data. You can do that within the devtools itself. Click on the Application tab in the devtools, and in the left pane, under Storage, select Localstorage > https://rakeshpai.github.io, and delete the key called 'app-data'. Please make sure you copy your error messages before you do this though, so that I know what went wrong.

        U 1 Reply Last reply
        0
        • rakeshpaiR rakeshpai

          @user2684 Woops, if you only see the loading message, I've dun goofed. Can you please look in your JS console (Ctrl+Shift+I) and tell me what is the error you see?

          To fix the problem, you can delete your existing data. You can do that within the devtools itself. Click on the Application tab in the devtools, and in the left pane, under Storage, select Localstorage > https://rakeshpai.github.io, and delete the key called 'app-data'. Please make sure you copy your error messages before you do this though, so that I know what went wrong.

          U Offline
          U Offline
          user2684
          Contest Winner
          wrote on last edited by
          #14

          @rakeshpai You're right! there was a js error:

          TypeError: Cannot read property 'pinType' of undefined
              at https://rakeshpai.github.io/mysensors-network-manager/static/js/main.1fdf5f27.js:1:238265
              at Array.map (native)
              at https://rakeshpai.github.io/mysensors-network-manager/static/js/main.1fdf5f27.js:1:238221
              at Array.map (native)
              at o (https://rakeshpai.github.io/mysensors-network-manager/static/js/main.1fdf5f27.js:1:238079)
              at https://rakeshpai.github.io/mysensors-network-manager/static/js/main.1fdf5f27.js:1:238546
              at Array.reduce (<anonymous>)
              at i (https://rakeshpai.github.io/mysensors-network-manager/static/js/main.1fdf5f27.js:1:238518)
              at Array.map (native)
              at a (https://rakeshpai.github.io/mysensors-network-manager/static/js/main.1fdf5f27.js:1:238659)
          
          rakeshpaiR 1 Reply Last reply
          0
          • U user2684

            @rakeshpai You're right! there was a js error:

            TypeError: Cannot read property 'pinType' of undefined
                at https://rakeshpai.github.io/mysensors-network-manager/static/js/main.1fdf5f27.js:1:238265
                at Array.map (native)
                at https://rakeshpai.github.io/mysensors-network-manager/static/js/main.1fdf5f27.js:1:238221
                at Array.map (native)
                at o (https://rakeshpai.github.io/mysensors-network-manager/static/js/main.1fdf5f27.js:1:238079)
                at https://rakeshpai.github.io/mysensors-network-manager/static/js/main.1fdf5f27.js:1:238546
                at Array.reduce (<anonymous>)
                at i (https://rakeshpai.github.io/mysensors-network-manager/static/js/main.1fdf5f27.js:1:238518)
                at Array.map (native)
                at a (https://rakeshpai.github.io/mysensors-network-manager/static/js/main.1fdf5f27.js:1:238659)
            
            rakeshpaiR Offline
            rakeshpaiR Offline
            rakeshpai
            wrote on last edited by
            #15

            @user2684 Thanks. If you haven't already deleted the app_data key, could you please share the value of that key with me? If you've already deleted it, do you remember which sensors you had configured across your nodes in your settings?

            This was an error in the migration process, where the old data is ported over to the new format, if I make changes in the format of the data. I've obviously done something wrong in that porting logic.

            U 1 Reply Last reply
            0
            • rakeshpaiR rakeshpai

              @user2684 Thanks. If you haven't already deleted the app_data key, could you please share the value of that key with me? If you've already deleted it, do you remember which sensors you had configured across your nodes in your settings?

              This was an error in the migration process, where the old data is ported over to the new format, if I make changes in the format of the data. I've obviously done something wrong in that porting logic.

              U Offline
              U Offline
              user2684
              Contest Winner
              wrote on last edited by
              #16

              @rakeshpai sure here it is:

              {"networks":[{"radio":"NRF24L01+","nrfChannel":76,"rfmFrequency":868,"id":"3yu5c1pv","nodes":[{"name":"Gateway","type":"gateway","key":"554766e4d3b69590e5","pa":true,"hw":false,"battery":{"powered":false,"min":2.5,"max":3.3,"measure":"internal","measurePin":"A0","voltsPerBit":0.003363075},"sleepTime":60,"sleepUnit":"minutes","sensors":[],"signing":"software","softSigningPin":"A7","atshaSigningPin":"A3","id":"vv4cn7l3","gatewayType":"ethernet","ethernet":{"dhcp":true,"module":"w5100","ip":"192.168.1.10","gateway":"192.168.1.1","subnet":"255.255.255.0"},"wifi":{"ssid":"adsad","password":"asdsad"},"conn":{"type":"client","serverPort":5003,"serverMaxClients":1,"controllerIp":"1111","controllerPort":5003,"mqttHost":"","mqttPort":1883}},{"id":"anzgjjrk","name":"MyNode","type":"node","key":"22cb1534bdec90d3bf","pa":true,"hw":false,"battery":{"powered":true,"min":2.5,"max":3.3,"measure":"internal","measurePin":"A0","voltsPerBit":0.003363075},"sleepTime":60,"sleepUnit":"minutes","sensors":[{"type":"ldr","pin":"A0","usePowerPin":true,"reportPercentage":true,"reverse":true,"powerPin":"D9","percentageRangeMin":0,"percentageRangeMax":1024},{"type":"rain","pin":"A1","usePowerPin":true,"reportPercentage":true,"reverse":true,"powerPin":"D0","percentageRangeMin":0,"percentageRangeMax":1024},{"type":"relay","pin":"D0","onValue":"high","initialValue":"low","autoTurnOff":true,"turnOffTime":1},{"type":"motion","pin":"D1","interruptMode":"rising"},{"type":"switch","pin":"D2","interruptMode":"change","debounceTime":30,"normalValue":"high"},{"type":"latchingRelay","pin":"D3","onValue":"high","initialValue":"low","autoTurnOff":false,"turnOffTime":1,"pulseOutput":false,"pulseDuration":100}],"signing":"software","softSigningPin":"A7","atshaSigningPin":"A3"}],"hmac":"e7f21811523c4e8e463843367bf5f415c9c8cf776eebf4e1fbfd7ae3135fcbc8","aes":"b07372524a15001e092200550200a15b"},{"radio":"NRF24L01+","nrfChannel":76,"rfmFrequency":868,"id":"fi253u7o","nodes":[{"name":"Gateway","type":"gateway","key":"f98623fd783becc370","pa":false,"hw":false,"battery":{"powered":false,"min":2.5,"max":3.3,"measure":"internal","measurePin":"A0","voltsPerBit":0.003363075},"sleepTime":60,"sleepUnit":"minutes","sensors":[],"signing":"software","softSigningPin":"A7","atshaSigningPin":"A3","id":"015okgk","gatewayType":"serial","ethernet":{"dhcp":true,"module":"w5100","ip":"192.168.1.10","gateway":"192.168.1.1","subnet":"255.255.255.0"},"wifi":{"ssid":"","password":""},"conn":{"type":"server","serverPort":5003,"serverMaxClients":1,"controllerIp":"","controllerPort":5003,"mqttHost":"","mqttPort":1883}},{"id":"v6301ydk","name":"MyNode","type":"node","key":"5785ead033fe668a9e","pa":false,"hw":false,"battery":{"powered":false,"min":2.5,"max":3.3,"measure":"internal","measurePin":"A0","voltsPerBit":0.003363075},"sleepTime":60,"sleepUnit":"minutes","sensors":[{"type":"relay","pin":"D0","onValue":"high","initialValue":"low","autoTurnOff":false,"turnOffTime":1}],"signing":"software","softSigningPin":"A7","atshaSigningPin":"A3"}],"hmac":"1108c29e98d1274aa5a4e0a0c23de71053584fbda39ffe68a3c1477415fd9aab","aes":"3c44673691a361ae3f22c15f50dce5b9"}],"version":1}

              rakeshpaiR 1 Reply Last reply
              0
              • U user2684

                @rakeshpai sure here it is:

                {"networks":[{"radio":"NRF24L01+","nrfChannel":76,"rfmFrequency":868,"id":"3yu5c1pv","nodes":[{"name":"Gateway","type":"gateway","key":"554766e4d3b69590e5","pa":true,"hw":false,"battery":{"powered":false,"min":2.5,"max":3.3,"measure":"internal","measurePin":"A0","voltsPerBit":0.003363075},"sleepTime":60,"sleepUnit":"minutes","sensors":[],"signing":"software","softSigningPin":"A7","atshaSigningPin":"A3","id":"vv4cn7l3","gatewayType":"ethernet","ethernet":{"dhcp":true,"module":"w5100","ip":"192.168.1.10","gateway":"192.168.1.1","subnet":"255.255.255.0"},"wifi":{"ssid":"adsad","password":"asdsad"},"conn":{"type":"client","serverPort":5003,"serverMaxClients":1,"controllerIp":"1111","controllerPort":5003,"mqttHost":"","mqttPort":1883}},{"id":"anzgjjrk","name":"MyNode","type":"node","key":"22cb1534bdec90d3bf","pa":true,"hw":false,"battery":{"powered":true,"min":2.5,"max":3.3,"measure":"internal","measurePin":"A0","voltsPerBit":0.003363075},"sleepTime":60,"sleepUnit":"minutes","sensors":[{"type":"ldr","pin":"A0","usePowerPin":true,"reportPercentage":true,"reverse":true,"powerPin":"D9","percentageRangeMin":0,"percentageRangeMax":1024},{"type":"rain","pin":"A1","usePowerPin":true,"reportPercentage":true,"reverse":true,"powerPin":"D0","percentageRangeMin":0,"percentageRangeMax":1024},{"type":"relay","pin":"D0","onValue":"high","initialValue":"low","autoTurnOff":true,"turnOffTime":1},{"type":"motion","pin":"D1","interruptMode":"rising"},{"type":"switch","pin":"D2","interruptMode":"change","debounceTime":30,"normalValue":"high"},{"type":"latchingRelay","pin":"D3","onValue":"high","initialValue":"low","autoTurnOff":false,"turnOffTime":1,"pulseOutput":false,"pulseDuration":100}],"signing":"software","softSigningPin":"A7","atshaSigningPin":"A3"}],"hmac":"e7f21811523c4e8e463843367bf5f415c9c8cf776eebf4e1fbfd7ae3135fcbc8","aes":"b07372524a15001e092200550200a15b"},{"radio":"NRF24L01+","nrfChannel":76,"rfmFrequency":868,"id":"fi253u7o","nodes":[{"name":"Gateway","type":"gateway","key":"f98623fd783becc370","pa":false,"hw":false,"battery":{"powered":false,"min":2.5,"max":3.3,"measure":"internal","measurePin":"A0","voltsPerBit":0.003363075},"sleepTime":60,"sleepUnit":"minutes","sensors":[],"signing":"software","softSigningPin":"A7","atshaSigningPin":"A3","id":"015okgk","gatewayType":"serial","ethernet":{"dhcp":true,"module":"w5100","ip":"192.168.1.10","gateway":"192.168.1.1","subnet":"255.255.255.0"},"wifi":{"ssid":"","password":""},"conn":{"type":"server","serverPort":5003,"serverMaxClients":1,"controllerIp":"","controllerPort":5003,"mqttHost":"","mqttPort":1883}},{"id":"v6301ydk","name":"MyNode","type":"node","key":"5785ead033fe668a9e","pa":false,"hw":false,"battery":{"powered":false,"min":2.5,"max":3.3,"measure":"internal","measurePin":"A0","voltsPerBit":0.003363075},"sleepTime":60,"sleepUnit":"minutes","sensors":[{"type":"relay","pin":"D0","onValue":"high","initialValue":"low","autoTurnOff":false,"turnOffTime":1}],"signing":"software","softSigningPin":"A7","atshaSigningPin":"A3"}],"hmac":"1108c29e98d1274aa5a4e0a0c23de71053584fbda39ffe68a3c1477415fd9aab","aes":"3c44673691a361ae3f22c15f50dce5b9"}],"version":1}

                rakeshpaiR Offline
                rakeshpaiR Offline
                rakeshpai
                wrote on last edited by
                #17

                @user2684 Thanks. That helped identify the problem. I've changed the key switch to inputSwitch to avoid clashes with C keywords, which is causing the issue. I had done this long ago, when I wasn't caring about data migrations. Looks like your data still has that old bit in it.

                Sorry for the trouble. The easiest thing to do is to delete that value, and start afresh. I'll be more diligent about making modifications in the future.

                U 1 Reply Last reply
                0
                • rakeshpaiR rakeshpai

                  @user2684 Thanks. That helped identify the problem. I've changed the key switch to inputSwitch to avoid clashes with C keywords, which is causing the issue. I had done this long ago, when I wasn't caring about data migrations. Looks like your data still has that old bit in it.

                  Sorry for the trouble. The easiest thing to do is to delete that value, and start afresh. I'll be more diligent about making modifications in the future.

                  U Offline
                  U Offline
                  user2684
                  Contest Winner
                  wrote on last edited by
                  #18

                  @rakeshpai thanks, not a big issue, I'm just running a few tests so I'm not losing anything significant by deleting that key :)

                  1 Reply Last reply
                  0
                  • U user2684

                    That's correct, for a motion sensor or a switch, reporting inteval does not make sense (even if technically the loop() function is called every 10 minutes which is the default reporting interval if a custom one is not provided but this does not make any difference). I'd keep per-sensor reporting inteval as you suggest, it seems easier for a new user to me as well.

                    • Regarding that amazing piece of ascii art, unfortunately it is not coming from me :) No idea where it comes from! I'll look into this gateway issue (https://github.com/mysensors/NodeManager/issues/187)
                    • When opening https://rakeshpai.github.io/mysensors-network-manager/ after clicking on the "there is an update please click here" message, I have now a "Just a moment..." message fixed on the screen and I couldn't recover the app even after clearing the cache of my browser. In an incognito window of course works just fine
                    • I'd probably add a global setting (maybe in advanced) for enabling MySensors and/or NodeManager debug since this may be a common task even of a new user when requested
                    • Having soft signing defined in config.h is in my backlog as well and will be added soon
                    • We probably need a way to select which MySensors API version we are using. MY_RFM69_NEW_DRIVER is only available in v2.2-beta and the old RF69_868MHZ will become RFM69_868MHZ which may cause compilation errors if the wrong library version is installed
                    • Are you sure MY_RF69_IRQ_PIN, MY_RF69_IRQ_NUM and MY_RF69_SPI_CS have to be defined with a pro mini board? I thought they were only to be set when using a ESP8266
                    • You may want to use the updated config.h which now includes a few more common directives. Even if they are commented out can be useful for a user to have those example available
                    • When adding a PIR sensor, the pin in the code is always 0
                    • You can add automatically in config.h a #define MAX_SENSORS 10 where the number is automatically calculated based on the number of sensors configured. This will help in saving storage if defining just a few sensors or allowing multiple sensors to be allocated
                    • We can probably start adding all the other built-in sensors left out so far, now that the available functions are not subject of big changes. Let me know if you need any help with it

                    Thanks and once again excellent job!

                    rakeshpaiR Offline
                    rakeshpaiR Offline
                    rakeshpai
                    wrote on last edited by
                    #19

                    @user2684 We will need to decide which version of MySensors to use. I've been using the latest version from the development branch. In fact, the ascii-art splash screen is the latest commit, as of 5 days ago. Since you aren't seeing the ascii-art, you are probably on a slightly older commit.

                    I'm not sure if we can start supporting from the current stable 2.1.1 onwards? I don't know about the advantages that the new driver for RFM69 brings. If it's any effort at all to get it to work with older versions, it's probably not worth it. I don't mind waiting till 2.2 is released.

                    I've simply copy-pasted the MY_RFM_* defines from somewhere in the MySensors examples. They are currently hardcoded :D and probably are just the defaults. I'll clean that up.

                    Thanks for pointing out the other issues. I'll get on it. Thanks!

                    U 1 Reply Last reply
                    0
                    • rakeshpaiR rakeshpai

                      @user2684 We will need to decide which version of MySensors to use. I've been using the latest version from the development branch. In fact, the ascii-art splash screen is the latest commit, as of 5 days ago. Since you aren't seeing the ascii-art, you are probably on a slightly older commit.

                      I'm not sure if we can start supporting from the current stable 2.1.1 onwards? I don't know about the advantages that the new driver for RFM69 brings. If it's any effort at all to get it to work with older versions, it's probably not worth it. I don't mind waiting till 2.2 is released.

                      I've simply copy-pasted the MY_RFM_* defines from somewhere in the MySensors examples. They are currently hardcoded :D and probably are just the defaults. I'll clean that up.

                      Thanks for pointing out the other issues. I'll get on it. Thanks!

                      U Offline
                      U Offline
                      user2684
                      Contest Winner
                      wrote on last edited by
                      #20

                      @rakeshpai I think you're right, making it compatible with too many versions can become challenging. The only remarkable difference between 2.1.1 and 2.2.0 is the RF69_868MHZ turned into RFM69_868MHZ. MY_RFM69_NEW_DRIVER if set in 2.1.1 has no impact and the radio signal level child id I've just introduced is not enabled unless MY_SIGNAL_REPORT_ENABLED is defined (only in 2.2.0). So the issue apparently is only on RF69_868MHZ which is probably minor since the user can add or delete a single letter. So we can definitely target 2.1.1.
                      Just a note on the MAX_SENSORS: what I wrote before is wrong, MAX_SENSORS defines the maximum number of child ids, not the maximum number of sensors so if you want to set it up, you need to take into account for each sensor how many child ids are created (which is static but to take into account). Thanks!

                      rakeshpaiR 1 Reply Last reply
                      0
                      • U user2684

                        @rakeshpai I think you're right, making it compatible with too many versions can become challenging. The only remarkable difference between 2.1.1 and 2.2.0 is the RF69_868MHZ turned into RFM69_868MHZ. MY_RFM69_NEW_DRIVER if set in 2.1.1 has no impact and the radio signal level child id I've just introduced is not enabled unless MY_SIGNAL_REPORT_ENABLED is defined (only in 2.2.0). So the issue apparently is only on RF69_868MHZ which is probably minor since the user can add or delete a single letter. So we can definitely target 2.1.1.
                        Just a note on the MAX_SENSORS: what I wrote before is wrong, MAX_SENSORS defines the maximum number of child ids, not the maximum number of sensors so if you want to set it up, you need to take into account for each sensor how many child ids are created (which is static but to take into account). Thanks!

                        rakeshpaiR Offline
                        rakeshpaiR Offline
                        rakeshpai
                        wrote on last edited by
                        #21

                        MAX_SENSORS defines the maximum number of child ids

                        How can I know how many child ids exist in total? Is there a way to arrive at it from the sensors? Sorry for my ignorance.

                        Fixed most of the other bugs you pointed out. Thanks!

                        U 1 Reply Last reply
                        0
                        • rakeshpaiR rakeshpai

                          MAX_SENSORS defines the maximum number of child ids

                          How can I know how many child ids exist in total? Is there a way to arrive at it from the sensors? Sorry for my ignorance.

                          Fixed most of the other bugs you pointed out. Thanks!

                          U Offline
                          U Offline
                          user2684
                          Contest Winner
                          wrote on last edited by
                          #22

                          @rakeshpai not your fault, it is just not easy to see :) When you register a sensor this could create one or more child IDs. How many, depends on the sensor. If you have a look at https://github.com/mysensors/NodeManager/blob/development/NodeManager.cpp#L3139 you can see for each sensor_type how many. As a rule of thumb, add 1 every time _getAvailableChildId() is called. If you need a summary table I can make it for you.
                          Defining MAX_SENSORS is not mandatory but since we may risk to have precious storage wasted, better to address this at the first run I think :)

                          1 Reply Last reply
                          0
                          • U Offline
                            U Offline
                            user2684
                            Contest Winner
                            wrote on last edited by
                            #23

                            Hi @rakeshpai, I'm finalizing v1.6 and I was wondering if you had any other issue with NM along the way so I can fix it timely. Also, are you still experiencing the gateway issue (https://github.com/mysensors/NodeManager/issues/187) which I couldn't reproduce? Thanks!

                            rakeshpaiR 1 Reply Last reply
                            0
                            • U user2684

                              Hi @rakeshpai, I'm finalizing v1.6 and I was wondering if you had any other issue with NM along the way so I can fix it timely. Also, are you still experiencing the gateway issue (https://github.com/mysensors/NodeManager/issues/187) which I couldn't reproduce? Thanks!

                              rakeshpaiR Offline
                              rakeshpaiR Offline
                              rakeshpai
                              wrote on last edited by
                              #24

                              @user2684 Sorry, I'm not at a computer. IIRC, the issue I've been facing is that when I used the latest version of NodeManager with the latest version of MySensors dev branch, with signing and encryption, the gateway would crash on startup. This has been preventing me from proceeding.

                              Sorry for the lack of detail - I can't verify things at the moment. Looking forward to 1.6!

                              U 1 Reply Last reply
                              0
                              • rakeshpaiR rakeshpai

                                @user2684 Sorry, I'm not at a computer. IIRC, the issue I've been facing is that when I used the latest version of NodeManager with the latest version of MySensors dev branch, with signing and encryption, the gateway would crash on startup. This has been preventing me from proceeding.

                                Sorry for the lack of detail - I can't verify things at the moment. Looking forward to 1.6!

                                U Offline
                                U Offline
                                user2684
                                Contest Winner
                                wrote on last edited by
                                #25

                                @rakeshpai no hurry thanks! The gateway issue sounds like a show stopper to me though but maybe I've been able to reproduce it: with both encryption AND signing enabled I got 94% of storage utilization on a pro mini hence causing the crash. If I eg disable debug so saving some storage I get no issues. Whenever you can this is probably something you can test: if this is the issue we would need to find something else to disable in order to have the gw running fine.

                                Also I'd recommend to disable repeater mode by default otherwise I guess you can get some issues if every node is acting as a repeater on the network

                                1 Reply Last reply
                                0
                                • rakeshpaiR rakeshpai

                                  I'm trying to compile a serial gateway, no sensors, against the development branch of NodeManager, which works fine. However, when I open the serial monitor, I get the following output:

                                  $ pio device monitor --port /dev/ttyUSB2
                                  --- Miniterm on /dev/ttyUSB2  9600,8,N,1 ---
                                  --- Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
                                   __  __       ____
                                  |  \/  |_   _/ ___|  ___ _ __  ___  ___  _ __ ___
                                  | |\/| | | | \___ \ / _ \ `_ \/ __|/ _ \| `__/ __|
                                  | |  | | |_| |___| |  __/ | | \__ \  _  | |  \__ \
                                  |_|  |_|\__, |____/ \___|_| |_|___/��
                                  

                                  ...and it hangs.

                                  Any idea what the issue might be?

                                  PS: As a self-confessed connoisseur of ASCII-art, I tip my hat in your general direction. Well done, good sir.

                                  R Offline
                                  R Offline
                                  ru64
                                  wrote on last edited by
                                  #26

                                  @rakeshpai I've got the same problem. Occasionally found out that this reproduces if DEBUG is off (#define DEBUG 0). As soon as I turned it on - it works.

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


                                  10

                                  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