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.8k 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.
  • R Offline
    R Offline
    Rasmus Eneman
    wrote on last edited by
    #84

    Please leave HSV/HSL to the controller. Why complicate the node more that necessary?
    Using LEVEL would be good, 8 bit per color is good, it's also super easy for the node to scale down if only supporting 7 or 6 bits and it's perfect for those digital LED strips.

    Please have a pure RGB without W, most strips and RGB leds don't have a W diode so that would need to be simulated with different result in different nodes.

    JohnJ 1 Reply Last reply
    0
    • R Rasmus Eneman

      Please leave HSV/HSL to the controller. Why complicate the node more that necessary?
      Using LEVEL would be good, 8 bit per color is good, it's also super easy for the node to scale down if only supporting 7 or 6 bits and it's perfect for those digital LED strips.

      Please have a pure RGB without W, most strips and RGB leds don't have a W diode so that would need to be simulated with different result in different nodes.

      JohnJ Offline
      JohnJ Offline
      John
      Plugin Developer
      wrote on last edited by
      #85

      @Rasmus-Eneman

      Please leave HSV/HSL to the controller. Why complicate the node more that necessary?

      That's why i asked for an addition if it would over complicate stuff (and if there is room for it) ;). And well, yeah you're right, S_RGBW with HSB would be complicating things more mixing capabilities with the node naming. There is always S_CUSTOM with V_VAR_1,V_VAR_2,V_VAR_3 combination.

      I agree with leaving out the W. But could be a nice addition for those non calibrated fixtures where you have to supply calibrated values in the node to get "proper" white levels.

      My Domotica project: http://www.pidome.org

      Z 1 Reply Last reply
      0
      • hekH hek

        @epierre said:

        globally I don't understand the min/max/average, are they managed by the sensor or the controller ? if it is the sensor in case of reboot it should get it back from the gateway/controller and should be resettable maybe to have a year/month/week/day min/max. For me that should be controller side to handle this logic...

        The MAX/MIN/AVERAGE are optional to use. My idea was that sensors would manage them. They can choose to store it in eeprom or throw away values when reboot occurs.
        The idea originates from GUST for wind which really is a max value over a certain time. This is just a generalization.
        Usecase: Sensor might not report every wind value to controller but just every 10 minute. But internally it can calculate average/max/min for every 10 seconds without pushing this.

        epierreE Offline
        epierreE Offline
        epierre
        Hero Member
        wrote on last edited by
        #86

        @hek ok I agree. Can we have too an alert that could be sent back to the gateway, or like an armed mode for the air sensors ?

        Today, one of my daughter broke a bottle of perfume, saturating the air and making the sensor go to its max. Even if the sensor is not calibrated, on some kind that (IMHO) must raise an alert for I cannot say infinite or over the maximum value...

        z-wave - Vera -> Domoticz
        rfx - Domoticz <- MyDomoAtHome <- Imperihome
        mysensors -> mysensors-gw -> Domoticz

        YveauxY Z hekH 3 Replies Last reply
        0
        • epierreE epierre

          @hek ok I agree. Can we have too an alert that could be sent back to the gateway, or like an armed mode for the air sensors ?

          Today, one of my daughter broke a bottle of perfume, saturating the air and making the sensor go to its max. Even if the sensor is not calibrated, on some kind that (IMHO) must raise an alert for I cannot say infinite or over the maximum value...

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

          @epierre In 1.4 a binary represetation of a float value can be exchanged with the library. This allows to report e.g. + or - infinite where normally floating point values are sent. Maybe this will serve your purpose?

          http://yveaux.blogspot.nl

          1 Reply Last reply
          0
          • JohnJ John

            @Rasmus-Eneman

            Please leave HSV/HSL to the controller. Why complicate the node more that necessary?

            That's why i asked for an addition if it would over complicate stuff (and if there is room for it) ;). And well, yeah you're right, S_RGBW with HSB would be complicating things more mixing capabilities with the node naming. There is always S_CUSTOM with V_VAR_1,V_VAR_2,V_VAR_3 combination.

            I agree with leaving out the W. But could be a nice addition for those non calibrated fixtures where you have to supply calibrated values in the node to get "proper" white levels.

            Z Offline
            Z Offline
            Zeph
            Hero Member
            wrote on last edited by Zeph
            #88

            If you do have a strip with RGB and W LEDs (rare), this can be handled as an RGB light and a DIMMER.


            A lot of our discussions really hinge on how much smarts to put where in the architecture. My overall philosophy would be to keep the node simple and move functionality to it only when the same thing cannot be easily done centrally. Reasons to move smarts into a node could include:

            • Uses local calibration that central doesn't have
            • Needs updating more often than reports go to central (eg: wind max)
            • Timing, eg: safety features that need to act fast
            • Reliability of data links, eg: safety features that should not depend on RF robustness
            • Providing some logically consistent interface available to all controllers
            • Providing some functionality which cannot be as easily implemented in a controller (eg: closed source)

            The latter two would be one-off custom coding at this time, tho @hek has mentioned the idea of pushing some rules down to the node level in a more automated way someday.


            This probably argues more for using RGB rather than HSV at the node level. What I liked about the HSB was the unification of on/off, dimmable, and HSB functionality as a nested set of expanding functionality. So a script or rule that sets the brightness could work on a DIMMABLE or a HSB light by setting the V_PERCENTAGE value (or V_BRIGHTNESS as someone suggested). But that could be done at the central level.


            I've used the term "central" because I still have the vision that a "hub" or "gateway" could implement some features, rather than having the smarts only in the controller or in the sensactuator nodes. So for example, it could be possible for the gateway to convert HSB to RGB such that the controller doesn't have to implement it. I know that approach is not currently popular so you don't need to register general disapproval. This will either come to seem a worthwhile additional open in coming years or not.

            1 Reply Last reply
            0
            • epierreE epierre

              @hek ok I agree. Can we have too an alert that could be sent back to the gateway, or like an armed mode for the air sensors ?

              Today, one of my daughter broke a bottle of perfume, saturating the air and making the sensor go to its max. Even if the sensor is not calibrated, on some kind that (IMHO) must raise an alert for I cannot say infinite or over the maximum value...

              Z Offline
              Z Offline
              Zeph
              Hero Member
              wrote on last edited by Zeph
              #89

              @epierre said:

              Can we have too an alert that could be sent back to the gateway, or like an armed mode for the air sensors ?

              Today, one of my daughter broke a bottle of perfume, saturating the air and making the sensor go to its max. Even if the sensor is not calibrated, on some kind that (IMHO) must raise an alert for I cannot say infinite or over the maximum value...

              Let's not bring infinity into this...

              How about just returning "the maximum reportable value" (finite). If the node is capable of detecting "above measurable" conditions, have it define the "maximum reportable" as 1 higher than it's internal "maximum measurable".

              The idea is to keep a simple scale of results, where for example we can consistently compute "max/min over 24 hours", or set a trigger on "value >= threshold" without needing to deal with infinity math. Some controller software may not have any concept of infinity, so using it brings in unnecessary incompatibilities.

              This allows the controller to define the alert as it wishes. For example, suppose a sensor reports uncalibrated values of 25 to 173, and the node uses 174 for a detected "over-range". The controller can implement a trigger or event at "value > 160" to test for high values (without having to test for infinite values too). Or it could test for "value >=174" if it specifically wants to test for overrange (which could be way over the max measured value or just barely above it).

              epierreE 1 Reply Last reply
              0
              • epierreE epierre

                @hek ok I agree. Can we have too an alert that could be sent back to the gateway, or like an armed mode for the air sensors ?

                Today, one of my daughter broke a bottle of perfume, saturating the air and making the sensor go to its max. Even if the sensor is not calibrated, on some kind that (IMHO) must raise an alert for I cannot say infinite or over the maximum value...

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

                @epierre said:

                Today, one of my daughter broke a bottle of perfume, saturating the air and making the sensor go to its max. Even if the sensor is not calibrated, on some kind that (IMHO) must raise an alert for I cannot say infinite or over the maximum value...

                LOL

                1 Reply Last reply
                0
                • Z Zeph

                  @epierre said:

                  Can we have too an alert that could be sent back to the gateway, or like an armed mode for the air sensors ?

                  Today, one of my daughter broke a bottle of perfume, saturating the air and making the sensor go to its max. Even if the sensor is not calibrated, on some kind that (IMHO) must raise an alert for I cannot say infinite or over the maximum value...

                  Let's not bring infinity into this...

                  How about just returning "the maximum reportable value" (finite). If the node is capable of detecting "above measurable" conditions, have it define the "maximum reportable" as 1 higher than it's internal "maximum measurable".

                  The idea is to keep a simple scale of results, where for example we can consistently compute "max/min over 24 hours", or set a trigger on "value >= threshold" without needing to deal with infinity math. Some controller software may not have any concept of infinity, so using it brings in unnecessary incompatibilities.

                  This allows the controller to define the alert as it wishes. For example, suppose a sensor reports uncalibrated values of 25 to 173, and the node uses 174 for a detected "over-range". The controller can implement a trigger or event at "value > 160" to test for high values (without having to test for infinite values too). Or it could test for "value >=174" if it specifically wants to test for overrange (which could be way over the max measured value or just barely above it).

                  epierreE Offline
                  epierreE Offline
                  epierre
                  Hero Member
                  wrote on last edited by
                  #91

                  @Zeph I don't share the same view, since we allow logic in the sensor for min/max interval, why not doing it too for the gas level ? all the more that the limit of the sensor is not a "business logic" but an internal logic linked by the physical capacity of the sensor itself (and which varies with each sensor type...).

                  My point was more that if you monitor LPG NO2 / NO3 or smoke that could be really harmfull we should provide safeguards anyway... not a big deal, more a safety net...

                  z-wave - Vera -> Domoticz
                  rfx - Domoticz <- MyDomoAtHome <- Imperihome
                  mysensors -> mysensors-gw -> Domoticz

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

                    Ok,

                    I will change create two device-types S_RGB and S_RGBW and use a level instead of percentage for each color component (0-255).

                    1 Reply Last reply
                    0
                    • DammeD Damme

                      I dont know why we have to limit some S_type to a number of V_types. Why not just let a S_type have 'all' V_types... User can be more flexible

                      If I wanted node could send
                      S_MOTION V_TRIPPED 1 (motion tripped)
                      S_MOTION V_ARMED 0 (no longer armed)
                      S_MOTION V_LEVEL 24 (motion quality 24 of 255) (probobly animal)

                      controller decides S_MOTION V_RESET 1

                      (order not thought of at all, needs to be fixed)

                       #DEFINE S_DOOR	1
                       #DEFINE S_MOTION	2
                       #DEFINE S_SMOKE	3
                       #DEFINE S_BINARY	4
                       #DEFINE S_DIMMABLE	5
                       #DEFINE S_WINDOW_COVER	6
                       #DEFINE S_THERMOMETER	7
                       #DEFINE S_HUMIDITY	8
                       #DEFINE S_BAROMETER	9
                       #DEFINE S_WIND	10
                       #DEFINE S_RAIN	11
                       #DEFINE S_UV	12
                       #DEFINE S_WEIGHT_SCALE	13
                       #DEFINE S_POWER	14
                       #DEFINE S_HEATER	15
                       #DEFINE S_DISTANCE	16
                       #DEFINE S_LIGHT_SENSOR	17
                       #DEFINE S_NODE	18
                       #DEFINE S_LOCK	19
                       #DEFINE S_IR	20
                       #DEFINE S_WATER_METER	21
                       #DEFINE S_AIR_QUALITY	22
                       #DEFINE S_CUSTOM	23
                       #DEFINE S_DUST	24
                       #DEFINE S_PH	25
                       #DEFINE S_SCENE_CONTROLLER	26
                       #DEFINE S_NODE	255
                       
                       #DEFINE V_CONFIG1	1
                       #DEFINE V_CONFIG2	2
                       #DEFINE V_CONFIG3	3
                       #DEFINE V_CONFIG4	4
                       #DEFINE V_CONFIG5	5
                       #DEFINE V_VAR1	6
                       #DEFINE V_VAR2	7
                       #DEFINE V_VAR3	8
                       #DEFINE V_VAR4	9
                       #DEFINE V_VAR5	10
                       #DEFINE V_ARMED	11
                       #DEFINE V_STATUS	12
                       #DEFINE V_WATT	13
                       #DEFINE V_PERCENTAGE	14
                       #DEFINE V_STOP	15
                       #DEFINE V_LEVEL	16
                       #DEFINE V_MAX	17
                       #DEFINE V_MIN	18
                       #DEFINE V_RESET	19
                       #DEFINE V_DEW_POINT	20
                       #DEFINE V_MODE	21
                       #DEFINE V_ANGLE	22
                       #DEFINE V_RATE	23
                       #DEFINE V_VOLTS	24
                       #DEFINE V_AMPS	25
                       #DEFINE V_PRESENTATION	26
                       #DEFINE V_BATTERY_LEVEL	27
                       #DEFINE V_RESET	28
                       #DEFINE V_TIME	29
                       #DEFINE V_ID	30
                       #DEFINE V_LOG_MESSAGE	31
                       #DEFINE V_SKETCH_NAME	32
                       #DEFINE V_SKETCH_VERSION	33
                       #DEFINE V_FIND_PARENT	34
                       #DEFINE V_CHILDREN	35
                       #DEFINE V_VERSION	36
                       #DEFINE V_INCLUSION_MODE	37
                       #DEFINE V_GATEWAY_READY	38
                       #DEFINE V_STATUS	39
                       #DEFINE V_IR_SEND	40
                       #DEFINE V_IR_RECEIVE	41
                      
                      epierreE Offline
                      epierreE Offline
                      epierre
                      Hero Member
                      wrote on last edited by epierre
                      #93

                      For my sound sketch :

                      S_SOUND - Sound sensor

                      V_LEVEL - sound level in db
                      V_LEVEL_MAX - Max sound level
                      V_LEVEL_MIN - Min sound level
                      V_LEVEL_AVERAGE - Average sound level
                      V_LEVEL_RESET - Reset max/min value

                      z-wave - Vera -> Domoticz
                      rfx - Domoticz <- MyDomoAtHome <- Imperihome
                      mysensors -> mysensors-gw -> Domoticz

                      epierreE hekH 2 Replies Last reply
                      0
                      • epierreE epierre

                        For my sound sketch :

                        S_SOUND - Sound sensor

                        V_LEVEL - sound level in db
                        V_LEVEL_MAX - Max sound level
                        V_LEVEL_MIN - Min sound level
                        V_LEVEL_AVERAGE - Average sound level
                        V_LEVEL_RESET - Reset max/min value

                        epierreE Offline
                        epierreE Offline
                        epierre
                        Hero Member
                        wrote on last edited by
                        #94

                        For my vibration sketch :

                        S_VIBRATION -Vibration sensor

                        V_LEVEL - vibration level in Hertz
                        V_LEVEL_MAX - Max vibration level
                        V_LEVEL_MIN - Min vibration level
                        V_LEVEL_AVERAGE - Average vibration level
                        V_LEVEL_RESET - Reset max/min value

                        z-wave - Vera -> Domoticz
                        rfx - Domoticz <- MyDomoAtHome <- Imperihome
                        mysensors -> mysensors-gw -> Domoticz

                        1 Reply Last reply
                        0
                        • epierreE Offline
                          epierreE Offline
                          epierre
                          Hero Member
                          wrote on last edited by
                          #95

                          @zeph the smoke sensor is an Air Quality sensor in fact so we coud decribe it this way too.
                          @hek what about the V_GAS_TYPE proposed below ? that would limit extensing the S and V no ?

                          S_AIR_QUALITY - Air Quality Sensor

                          V_GAS_TYPE - gas type reported by the sensor
                          V_LEVEL - gas concentration in ppm/ppb
                          V_LEVEL_MAX - Max gas concentration level
                          V_LEVEL_MIN - Min gas concentration level
                          V_LEVEL_AVERAGE - Average gas concentration level
                          V_LEVEL_RESET - Reset max/min value
                          V_STATUS - Tripped status of a gas sensor. 1=Tripped, 0=Untripped
                          V_ARMED - Armed status of a security sensor. 1=Armed, 0=Bypassed

                          z-wave - Vera -> Domoticz
                          rfx - Domoticz <- MyDomoAtHome <- Imperihome
                          mysensors -> mysensors-gw -> Domoticz

                          1 Reply Last reply
                          0
                          • epierreE epierre

                            For my sound sketch :

                            S_SOUND - Sound sensor

                            V_LEVEL - sound level in db
                            V_LEVEL_MAX - Max sound level
                            V_LEVEL_MIN - Min sound level
                            V_LEVEL_AVERAGE - Average sound level
                            V_LEVEL_RESET - Reset max/min value

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

                            @epierre said:

                            S_SOUND - Sound sensor

                            Wouldn't it be good to have a uncalibrated variable for S_SOUND also? Like proposed for S_LIGHT_SENSOR. Reported as:

                            V_PERCENTAGE - 0-100%

                            epierreE 1 Reply Last reply
                            0
                            • hekH hek

                              @epierre said:

                              S_SOUND - Sound sensor

                              Wouldn't it be good to have a uncalibrated variable for S_SOUND also? Like proposed for S_LIGHT_SENSOR. Reported as:

                              V_PERCENTAGE - 0-100%

                              epierreE Offline
                              epierreE Offline
                              epierre
                              Hero Member
                              wrote on last edited by
                              #97

                              @hek hopefully all smartphone now have a calibrated microphone that could help calibrate this... what 'Ive not worked out enough is to know if the store sensor is suitable for this...

                              also I don't know what the semantic of "100% sound" would mean... max sensor capabilities ?

                              z-wave - Vera -> Domoticz
                              rfx - Domoticz <- MyDomoAtHome <- Imperihome
                              mysensors -> mysensors-gw -> Domoticz

                              hekH 1 Reply Last reply
                              0
                              • epierreE epierre

                                @hek hopefully all smartphone now have a calibrated microphone that could help calibrate this... what 'Ive not worked out enough is to know if the store sensor is suitable for this...

                                also I don't know what the semantic of "100% sound" would mean... max sensor capabilities ?

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

                                @epierre said:

                                also I don't know what the semantic of "100% sound" would mean... max sensor capabilities ?

                                Yeah, something like (1023-analogRead(ANALOG_PIN))/10.23

                                epierreE 1 Reply Last reply
                                0
                                • hekH hek

                                  @epierre said:

                                  also I don't know what the semantic of "100% sound" would mean... max sensor capabilities ?

                                  Yeah, something like (1023-analogRead(ANALOG_PIN))/10.23

                                  epierreE Offline
                                  epierreE Offline
                                  epierre
                                  Hero Member
                                  wrote on last edited by
                                  #99

                                  @hek hmmm... what about if this is a 3.3V or a 5V arduino board too ? no ? ?

                                  z-wave - Vera -> Domoticz
                                  rfx - Domoticz <- MyDomoAtHome <- Imperihome
                                  mysensors -> mysensors-gw -> Domoticz

                                  1 Reply Last reply
                                  0
                                  • daulagariD Offline
                                    daulagariD Offline
                                    daulagari
                                    Hero Member
                                    wrote on last edited by
                                    #100

                                    Coming from the Can one child-sensor-id have multiple values thread I had a look at the initial post and I am wondering if this is what you can call "the latest proposal".

                                    The rest of this thread seems to be more about which variables but what I am wondering is how all this would be implemented. Looking at the initial post I see:

                                    New header would be:

                                    ChildSensorId | ChildSensorType | ValueType | Payload

                                    My assumption is that there is still a NodeID in the header, so actually:

                                    NodeId | ChildSensorId | ChildSensorType | ValueType | Payload

                                    If so, I think there is too much freedom/overhead in the first three fields.

                                    My expectations as an user is that every sensor, or better "box" is one node and implements one type of sensor with one or more values. In this sense I do not see the use of the ChildSensorId field, so why not use:

                                    NodeId | SensorType | ValueType | Payload

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

                                      Hmm... what if you want to report multiple temperatures from one node?

                                      YveauxY 1 Reply Last reply
                                      0
                                      • hekH hek

                                        Hmm... what if you want to report multiple temperatures from one node?

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

                                        @hek said:

                                        Hmm... what if you want to report multiple temperatures from one node?

                                        Or for actuators, control multiple LEDs/Blinds etc. from a single node...

                                        I think a few bits could at least be saved by limiting the amount of ChildId's per node.

                                        http://yveaux.blogspot.nl

                                        1 Reply Last reply
                                        0
                                        • daulagariD Offline
                                          daulagariD Offline
                                          daulagari
                                          Hero Member
                                          wrote on last edited by daulagari
                                          #103

                                          what if you want to report multiple temperatures from one node?

                                          Does not sound to logical to me and I would be surprised if more than 1% of the implemented sensors have "double values", so the first question is if we want to carry an field for exceptions.

                                          Multiple temperatures/LEDs/Blinds can still be implemented by adding an additional ValueType V_LEVEL_SECONDARY but a much cleaner approach would be to use another NodeId.

                                          Let's also have a look at this from the perspective on how to represent things at the Controller:

                                          • Is it logical to have two values of the same type reported for a node?
                                          • How does the user know which temperature/LED/blind is what?
                                          Z 1 Reply Last reply
                                          0
                                          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.1k

                                          Posts


                                          Copyright 2025 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