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. 2.0 Discussion: Units, sensor types and protocol

2.0 Discussion: Units, sensor types and protocol

Scheduled Pinned Locked Moved Announcements
170 Posts 23 Posters 83.7k Views 7 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.
  • hekH Offline
    hekH Offline
    hek
    Admin
    wrote on last edited by hek
    #1

    To simplify sketches even further we've discussed and decided to let sensors send in standard SI units and let controller convert them to the appropriate format.

    This will also remove the need for a unit-config exchange with controller at sensor startup.

    The new over-the-air messages has changed quite much with a more logical structure that can handle extension and even a completely different network layer if needed.

    The ongoing work can be found here:
    https://github.com/henrikekblad/Arduino/blob/development/libraries/MySensors/MyMessage.h

    Will not bring this into development until it actually compiles.

    Feel free to give feedback and report any missed sensor-types.

    In parallell we should probably discuss the serial-protocol for 2.0. Is it time for json perhaps?

    greglG Z DammeD 5 Replies Last reply
    1
    • RJ_MakeR Offline
      RJ_MakeR Offline
      RJ_Make
      Hero Member
      wrote on last edited by
      #2

      How about

      V_RELAY_STATUS 1=Active, 0=Deactive

      RJ_Make

      hekH 1 Reply Last reply
      0
      • A Offline
        A Offline
        a-lurker
        wrote on last edited by a-lurker
        #3

        @HEK I'll bite:

        Use under scores consistently ? eg V_RAINRATE and V_LIGHT_LEVEL

        The units to be used here can be clearer:
        V_VOLTAGE ---> V_VOLTS
        V_CURRENT ---> V_AMPS

        Where the base unit is not used - should the name reflect that? eg V_DISTANCE --> V_DISTANCE_CM

        Electrical impedance and resistance are not the same thing- suspect resistance is intended here?
        V_IMPEDANCE --> V_RESISTANCE

        HUM is a bit vague - suggest: V_HUM --> V_HUMIDITY

        V_DIRECTION may be confused with an angle or up/down. Could use V_COMPASS_POINT, but that may be confused with magnetic or true north!
        V_LIGHT could be confused with V_LIGHT_LEVEL. Could use V_LIGHT_STATUS
        V_TEMP while often used, can be confused with a temporary variable? Could use V_TEMPERATURE
        V_VOLUME could be confused with audio volume? Could use V_CUBIC_MEASURE
        V_HEATER_MODE for V_HEATER?

        Could add V_DEW_POINT

        STATUS always be used for binary values eg on/off, locked/unlocked?
        V_LOCK_STATUS
        V_LIGHT_STATUS
        V_HEATER_STATUS

        hekH 1 Reply Last reply
        0
        • hekH hek

          To simplify sketches even further we've discussed and decided to let sensors send in standard SI units and let controller convert them to the appropriate format.

          This will also remove the need for a unit-config exchange with controller at sensor startup.

          The new over-the-air messages has changed quite much with a more logical structure that can handle extension and even a completely different network layer if needed.

          The ongoing work can be found here:
          https://github.com/henrikekblad/Arduino/blob/development/libraries/MySensors/MyMessage.h

          Will not bring this into development until it actually compiles.

          Feel free to give feedback and report any missed sensor-types.

          In parallell we should probably discuss the serial-protocol for 2.0. Is it time for json perhaps?

          greglG Offline
          greglG Offline
          gregl
          Hero Member
          wrote on last edited by
          #4

          @hek could we pleas add a V_pH. Or V_PH_LEVEL

          hekH 1 Reply Last reply
          0
          • YveauxY Offline
            YveauxY Offline
            Yveaux
            Mod
            wrote on last edited by
            #5

            @hek said:

            V_HUM - Humidity percentage 0-100% <int>

            No reason to limit to int, can also be float.
            Why do you mention the data types for some and not for most? Mysensors doesn't really care....

            http://yveaux.blogspot.nl

            1 Reply Last reply
            0
            • YveauxY Offline
              YveauxY Offline
              Yveaux
              Mod
              wrote on last edited by
              #6

              @hek said:

              V_WIND - m/s (average wind speed during last hour)
              V_GUST - m/s (highest wind speed during last hour)

              Why average/highest over last hour? My weather station reports wind speed every minute and I like to see the minute detail instead of averaging everything over an hour.

              http://yveaux.blogspot.nl

              hekH 1 Reply Last reply
              0
              • YveauxY Offline
                YveauxY Offline
                Yveaux
                Mod
                wrote on last edited by
                #7

                @hek said:

                Do we need another one for lux?

                Yes please.

                http://yveaux.blogspot.nl

                1 Reply Last reply
                0
                • YveauxY Offline
                  YveauxY Offline
                  Yveaux
                  Mod
                  wrote on last edited by Yveaux
                  #8

                  @hek said:

                  V_DUST_LEVEL - ug/m3

                  g/m3 if you standardize on SI
                  Same for distance BTW. Might be more...

                  http://yveaux.blogspot.nl

                  hekH 1 Reply Last reply
                  0
                  • YveauxY Offline
                    YveauxY Offline
                    Yveaux
                    Mod
                    wrote on last edited by Yveaux
                    #9

                    @hek said:

                    V_DIRECTION

                    Maybe just return angle ( in radians and call it V_ANGLE) then textual indication. This way higher resolutions can also be supported.

                    Sorry for all the separate messages. Works more convenient on a tablet...

                    http://yveaux.blogspot.nl

                    1 Reply Last reply
                    0
                    • YveauxY Offline
                      YveauxY Offline
                      Yveaux
                      Mod
                      wrote on last edited by
                      #10

                      I would like a way to configure a sensor from the gateway, to e.g calibrate a sensor or store some ID. Maybe a V_CONFIG can be added, where childid indicates the actual variable written. Or define a few V_CONFIG0,V_CONFIG1 etc.
                      What do you think?

                      http://yveaux.blogspot.nl

                      hekH 1 Reply Last reply
                      0
                      • YveauxY Yveaux

                        @hek said:

                        V_DUST_LEVEL - ug/m3

                        g/m3 if you standardize on SI
                        Same for distance BTW. Might be more...

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

                        @Yveaux said:

                        g/m3 if you standardize on SI
                        Same for distance BTW. Might be more...

                        I choose to scale the SI units to something relevant for thing getting measured. E.g. g/m3 would give a VERY small small value for dust.

                        Distance is mainly for the distance sensor now, which only has a small range.

                        Rain - measure in meters would also render very small numbers.

                        So, until we have a scaling factor in the protocol or something similar we'll have select a proper scaling at the source and agree on it between sensor and controller.

                        YveauxY 1 Reply Last reply
                        1
                        • YveauxY Yveaux

                          I would like a way to configure a sensor from the gateway, to e.g calibrate a sensor or store some ID. Maybe a V_CONFIG can be added, where childid indicates the actual variable written. Or define a few V_CONFIG0,V_CONFIG1 etc.
                          What do you think?

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

                          @Yveaux said:

                          V_CONFIG0,V_CONFIG1

                          A few config-placeholders would be a nice.

                          1 Reply Last reply
                          0
                          • greglG gregl

                            @hek could we pleas add a V_pH. Or V_PH_LEVEL

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

                            @gregl said:

                            V_PH_LEVEL

                            Added.

                            1 Reply Last reply
                            0
                            • YveauxY Yveaux

                              @hek said:

                              V_WIND - m/s (average wind speed during last hour)
                              V_GUST - m/s (highest wind speed during last hour)

                              Why average/highest over last hour? My weather station reports wind speed every minute and I like to see the minute detail instead of averaging everything over an hour.

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

                              @Yveaux said:

                              Why average/highest over last hour? My weather station reports wind speed every minute and I like to see the minute detail instead of averaging everything over an hour.

                              I'll change the definition to "over the last report period".

                              1 Reply Last reply
                              0
                              • A Offline
                                A Offline
                                a-lurker
                                wrote on last edited by
                                #15

                                V_ANGLE sounds good. With a bit of (floating point) maths, all can be calculated.

                                1 Reply Last reply
                                0
                                • RJ_MakeR RJ_Make

                                  How about

                                  V_RELAY_STATUS 1=Active, 0=Deactive

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

                                  @ServiceXp said:

                                  V_RELAY_STATUS 1=Active, 0=Deactive

                                  Not sure what differs this form V_LIGHT_STATUS.
                                  Maybe we need a better word than LIGHT that describes a thing-that-can-be-turned-on-or-off?

                                  YveauxY 1 Reply Last reply
                                  1
                                  • hekH hek

                                    @Yveaux said:

                                    g/m3 if you standardize on SI
                                    Same for distance BTW. Might be more...

                                    I choose to scale the SI units to something relevant for thing getting measured. E.g. g/m3 would give a VERY small small value for dust.

                                    Distance is mainly for the distance sensor now, which only has a small range.

                                    Rain - measure in meters would also render very small numbers.

                                    So, until we have a scaling factor in the protocol or something similar we'll have select a proper scaling at the source and agree on it between sensor and controller.

                                    YveauxY Offline
                                    YveauxY Offline
                                    Yveaux
                                    Mod
                                    wrote on last edited by
                                    #17

                                    @hek said:

                                    So, until we have a scaling factor in the protocol or something similar we'll have select a proper scaling at the source and agree on it between sensor and controller.

                                    When values are sent as floats it doesn't matter. Scaling is implicitly store in the floating point value when sent as binary float. When transfered as ASCII you're right, but that isn't required with 1.4 anymore...

                                    http://yveaux.blogspot.nl

                                    hekH 1 Reply Last reply
                                    0
                                    • hekH hek

                                      @ServiceXp said:

                                      V_RELAY_STATUS 1=Active, 0=Deactive

                                      Not sure what differs this form V_LIGHT_STATUS.
                                      Maybe we need a better word than LIGHT that describes a thing-that-can-be-turned-on-or-off?

                                      YveauxY Offline
                                      YveauxY Offline
                                      Yveaux
                                      Mod
                                      wrote on last edited by
                                      #18

                                      @hek said:

                                      a thing-that-can-be-turned-on-or-of

                                      Hmmmm.... Let me think.... a switch ? ;-)

                                      http://yveaux.blogspot.nl

                                      hekH 1 Reply Last reply
                                      0
                                      • A a-lurker

                                        @HEK I'll bite:

                                        Use under scores consistently ? eg V_RAINRATE and V_LIGHT_LEVEL

                                        The units to be used here can be clearer:
                                        V_VOLTAGE ---> V_VOLTS
                                        V_CURRENT ---> V_AMPS

                                        Where the base unit is not used - should the name reflect that? eg V_DISTANCE --> V_DISTANCE_CM

                                        Electrical impedance and resistance are not the same thing- suspect resistance is intended here?
                                        V_IMPEDANCE --> V_RESISTANCE

                                        HUM is a bit vague - suggest: V_HUM --> V_HUMIDITY

                                        V_DIRECTION may be confused with an angle or up/down. Could use V_COMPASS_POINT, but that may be confused with magnetic or true north!
                                        V_LIGHT could be confused with V_LIGHT_LEVEL. Could use V_LIGHT_STATUS
                                        V_TEMP while often used, can be confused with a temporary variable? Could use V_TEMPERATURE
                                        V_VOLUME could be confused with audio volume? Could use V_CUBIC_MEASURE
                                        V_HEATER_MODE for V_HEATER?

                                        Could add V_DEW_POINT

                                        STATUS always be used for binary values eg on/off, locked/unlocked?
                                        V_LOCK_STATUS
                                        V_LIGHT_STATUS
                                        V_HEATER_STATUS

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

                                        @a-lurker said:

                                        Electrical impedance and resistance are not the same thing- suspect resistance is intended here?
                                        V_IMPEDANCE --> V_RESISTANCE

                                        I think the impedance-variable comes from the RFXTRX plugin. And it is related to body fat measurements for body scales.

                                        http://code.mios.com/trac/mios_rfxtrx/browser/trunk/L_RFXtrx.lua

                                        If I understand it correctly Impedace is used for AC and resistance for DC. Not sure what would be most useful in this setup.

                                        DammeD Z 2 Replies Last reply
                                        0
                                        • YveauxY Yveaux

                                          @hek said:

                                          So, until we have a scaling factor in the protocol or something similar we'll have select a proper scaling at the source and agree on it between sensor and controller.

                                          When values are sent as floats it doesn't matter. Scaling is implicitly store in the floating point value when sent as binary float. When transfered as ASCII you're right, but that isn't required with 1.4 anymore...

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

                                          @Yveaux said:

                                          When transfered as ASCII you're right, but that isn't required with 1.4 anymore.

                                          Most users still use the serial protocol. Which means strings like "0.000003423" must be generated and transferred to the controller from gateway.

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


                                          16

                                          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