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. Feature Requests
  3. V_ID/V_SERIAL to send sensors natural/built in ID's to controller.

V_ID/V_SERIAL to send sensors natural/built in ID's to controller.

Scheduled Pinned Locked Moved Feature Requests
9 Posts 4 Posters 3.8k Views 4 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.
  • F Offline
    F Offline
    fot
    wrote on last edited by
    #1

    Hi!

    For sensors that have natural/built in ID's for example DS1820 temp sensors it would be nice to have an V_ID or V_SERIAL to send to the controller to identify the sensor. This can be done via for example one of the V_VAR* or any other for that matter but an common V_ for sending this kind of information over the air.

    /Magnus

    hekH 1 Reply Last reply
    0
    • F fot

      Hi!

      For sensors that have natural/built in ID's for example DS1820 temp sensors it would be nice to have an V_ID or V_SERIAL to send to the controller to identify the sensor. This can be done via for example one of the V_VAR* or any other for that matter but an common V_ for sending this kind of information over the air.

      /Magnus

      hekH Offline
      hekH Offline
      hek
      Admin
      wrote on last edited by
      #2

      @fot

      Not a bad idea. I think V_ID would be a good candidate.

      1 Reply Last reply
      1
      • F Offline
        F Offline
        fot
        wrote on last edited by
        #3

        @hek

        Yes, and if you have an controller that can give you the latest value for V_ID it can be used to remember the sensor ID on start up without having it in the EEPROM of the node.

        This will be very useful if you have multiple DS1820-sensors on the same bus and one goes bad. If you remove the sensor from the controller a new ID will be assigned next start up.

        Pseudo code (yes I know that request does not respond with the data):

        listOfSensors = findAllSensors()
        for(1..MAX_SENSOR_ID as i) {
            id = gw.request(i,V_ID);
            if(id in listOfSensors) {
                sensor[id] = i;
                gw.present(sensor[id],S_TEMP);
            }
        }
        for(listOfSensors as id) {
            if(not exist sensor[id]) {
                sensor[id] = find_free_id();
                gw.present(sensor[id],V_TEMP);
            }
        }
        
        hekH 1 Reply Last reply
        0
        • F fot

          @hek

          Yes, and if you have an controller that can give you the latest value for V_ID it can be used to remember the sensor ID on start up without having it in the EEPROM of the node.

          This will be very useful if you have multiple DS1820-sensors on the same bus and one goes bad. If you remove the sensor from the controller a new ID will be assigned next start up.

          Pseudo code (yes I know that request does not respond with the data):

          listOfSensors = findAllSensors()
          for(1..MAX_SENSOR_ID as i) {
              id = gw.request(i,V_ID);
              if(id in listOfSensors) {
                  sensor[id] = i;
                  gw.present(sensor[id],S_TEMP);
              }
          }
          for(listOfSensors as id) {
              if(not exist sensor[id]) {
                  sensor[id] = find_free_id();
                  gw.present(sensor[id],V_TEMP);
              }
          }
          
          hekH Offline
          hekH Offline
          hek
          Admin
          wrote on last edited by
          #4

          @fot

          Yes, will add it in development tonight.

          1 Reply Last reply
          2
          • F Offline
            F Offline
            fot
            wrote on last edited by
            #5

            Just like to add that I now have a working node that fetched the sensor id from the controller and it does not matter how the sensors are connected to the node.

            Need som cleaning up before going public :-)

            /Magnus

            1 Reply Last reply
            0
            • hekH Offline
              hekH Offline
              hek
              Admin
              wrote on last edited by
              #6

              I'd be happy if you create a PR when you feel ready.

              1 Reply Last reply
              0
              • F Offline
                F Offline
                flopp
                wrote on last edited by
                #7

                I read that V_ID is implemented now.

                @fot do you have any sketch that can be public?

                F 1 Reply Last reply
                0
                • F flopp

                  I read that V_ID is implemented now.

                  @fot do you have any sketch that can be public?

                  F Offline
                  F Offline
                  fot
                  wrote on last edited by
                  #8

                  @flopp

                  I do have..

                  I just need to find it in the pile..

                  I'm not using it at the moment for production use but it worked well for my when I tested it.

                  /M

                  1 Reply Last reply
                  0
                  • dk_iotD Offline
                    dk_iotD Offline
                    dk_iot
                    wrote on last edited by
                    #9

                    I am actually using the DS2401s to generate IDs within my Mysensor network.
                    I have created two arrays, one with the DS2401 ID, the other with the location (text) of the sensor.
                    (it should be possible to do this in a single array BTW)

                    In this way I can label my Node with the location name at boot, but more important it labels the children with the location.
                    (in addition in my Arduino script I am labeling the Arduino hardware platform as part of the node name)

                    Imagine having a list of 15 DHT22's in Domoticz, it is quite challening to find the right DHT22 for a certain location.
                    (I am using Domoticz)

                    But I acutally should include the Node-ID in my script, in that way I don't need to query it at boot time :)

                    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