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.
  • daulagariD daulagari

    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 Offline
    Z Offline
    Zeph
    Hero Member
    wrote on last edited by
    #104

    @daulagari said:

    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?

    This seems to depend on how you conceptualize the system. In @hek 's proposal and the current system, the core concept of an endpoint is the child aka "sensor". (I'm going to cal this the child/sensor; elsewhere it's often called a "sensor' which as you say can be confusing, but what we mean is the conceptual element addressed using a child id within a node)

    The node is a device with an RF transceiver (addressed by node id which is part of the transceiver address), which contains and makes accessible one or more child/sensors, each identified by the node id and child id. The controller receives reports from child/sensors and sends commands to child/sensors. The node is just part of the transportation system.

    The controller is configured to know what each child/sensor consists of..

    In that context, your first question could be split:
    Is it logical to have two values of the same type reported for a child/sensor?
    Is it logical to have more than one child/sensor supported by a single transceiver+uC (ie: node)?

    @hek made the point a while back that a child/sensor can be thought of as a semantic container for one (or sometimes more) closely related values. A node can contain one or more of those.

    Yes, there would be an alternative, in skipping the child/sensor container layer. One approach would be to support only a single sensor per node, but there is clearly interest in multi-sensor nodes. Another would be to dissolve the child layer of this heirarchy use rules something like:

    • a node can report on (or accept control for) more than one sensor, with more than one value
    • no multi-sensor node can have more than one sensor which reports the same kind of value
    • the controller will be responsible for logically grouping related sensor/control values within a node

    I think one could get by with this for now, but I'm not sure it's a clean conceptual architecture to continue to expand for the future. And I wonder if it puts too much onto the controller - not a big deal if there was only one controller type supported (eg: Vera only), but with an expanding list of controllers, any functionality (like conceptual grouping of the values within a node into "sensor" containers) which is moved to the controller, requires that functionality to be programmed into every controller's architecture in whatever languages that requires - a lot of parallel maintenance to keep in sync for any changes. The less functionality is moved into the controllers, the easier it will be to maintain.

    • How does the user know which temperature/LED/blind is what?

    Exactly. Is this configured per value, or per child/sensor? (If no sensor ever had more than one value, this would be moot).

    Currently the "what" is configured per child/sensor.

    Suppose next year one wanted to measure the effectiveness of a swamp cooler with intake temperature and output temperature. Does that need to require two nodes, because the architecture was designed such that no node can report two temperatures?

    If the goal is just to create an architecture which can get by for most systems today, there's not need for a big rethinking or the labor of rewriting the code - version 1.4 already does that. I think the point of this thread is to define a flexible conceptual base that's likely to be more cleanly extensible for a few years of growth. I think that hek's child/sensor concept is somewhat helpful in creating that flexibility. Perhaps there's an even better approach to serve that function, but just omitting the child/sensor container level doesn't currently strike me as such.

    1 Reply Last reply
    0
    • RJ_MakeR Offline
      RJ_MakeR Offline
      RJ_Make
      Hero Member
      wrote on last edited by
      #105

      I would agree, I rely heavily on the child/sensor container level. I typically build nodes that poll multiple types of sensors.

      RJ_Make

      1 Reply Last reply
      0
      • marceltrapmanM Offline
        marceltrapmanM Offline
        marceltrapman
        Mod
        wrote on last edited by
        #106

        Look at how other systems do this (for those that do not agree with the current setup).

        Multi sensors are used all over the place.

        The very well known temp/humid/lux/motion sensors but also tilt sensors combined with a tamper alarm.
        And when it comes down to using more of the same sensors on one node: i am going to build a sensor that has two IR sensors for 2 directions.

        Fulltime Servoy Developer
        Parttime Moderator MySensors board

        I use Domoticz as controller for Z-Wave and MySensors (previously Indigo and OpenHAB).
        I have a FABtotum to print cases.

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

          @Zeph , @ServiceXp, @marceltrapman Thanks for the feedback.

          I would agree, I rely heavily on the child/sensor container level. I typically build nodes that poll multiple types of sensors.

          and

          The very well known temp/humid/lux/motion sensors but also tilt sensors combined with a tamper alarm.

          Both are still perfectly possible.

          And when it comes down to using more of the same sensors on one node: i am going to build a sensor that has two IR sensors for 2 directions.

          That is what I think is the "less than 1% of the implemented sensors"

          Note that the current proposal:

          NodeId | ChildSensorId | ChildSensorType | ValueType | Payload

          has one more field than the 1.4 protocol.

          My proposal is basically to merge the ChildSensorId and ChildSensorType into one, being the ChildSensorType, so:

          NodeId | ChildSensorType | ValueType | Payload

          If the goal is just to create an architecture which can get by for most systems today, there's not need for a big rethinking or the labor of rewriting the code - version 1.4 already does that. I think the point of this thread is to define a flexible conceptual base that's likely to be more cleanly extensible for a few years of growth.

          See above, the proposal adds an additional field and yes, that gives additional flexibility but with the price of one additional byte (or at least field) for every message and additional implementation problems for Controllers on how to represent this.

          My question still is how a controller should represent this. Most controllers work with devices that can have one or multiple values. Device can map to node but how to map the remaining fields?

          Z 1 Reply Last reply
          0
          • daulagariD daulagari

            @Zeph , @ServiceXp, @marceltrapman Thanks for the feedback.

            I would agree, I rely heavily on the child/sensor container level. I typically build nodes that poll multiple types of sensors.

            and

            The very well known temp/humid/lux/motion sensors but also tilt sensors combined with a tamper alarm.

            Both are still perfectly possible.

            And when it comes down to using more of the same sensors on one node: i am going to build a sensor that has two IR sensors for 2 directions.

            That is what I think is the "less than 1% of the implemented sensors"

            Note that the current proposal:

            NodeId | ChildSensorId | ChildSensorType | ValueType | Payload

            has one more field than the 1.4 protocol.

            My proposal is basically to merge the ChildSensorId and ChildSensorType into one, being the ChildSensorType, so:

            NodeId | ChildSensorType | ValueType | Payload

            If the goal is just to create an architecture which can get by for most systems today, there's not need for a big rethinking or the labor of rewriting the code - version 1.4 already does that. I think the point of this thread is to define a flexible conceptual base that's likely to be more cleanly extensible for a few years of growth.

            See above, the proposal adds an additional field and yes, that gives additional flexibility but with the price of one additional byte (or at least field) for every message and additional implementation problems for Controllers on how to represent this.

            My question still is how a controller should represent this. Most controllers work with devices that can have one or multiple values. Device can map to node but how to map the remaining fields?

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

            @daulagari said:

            My proposal is basically to merge the ChildSensorId and ChildSensorType into one, being the ChildSensorType, so:

            OK. That touches on one of my critiques of the direction it's going. (Maybe "critique" would sound stronger than I intend, I'm not disparaging the current direction, just suggesting another one).

            I think that ChildSensorID is an appropriate concept for identification and addressing (ie: included in packets), while "ChildSensorType" is static metadata which should be collected during configuration but does not need to be passed in every packet. So I would simplify in the other direction - get rid of ChildSensorType in the packet addressing heirarchy, rather than getting rid of ChildSensorID.

            This idea is not currently popular, in large part I think because the metadata describing a given ChildSensor would have to be collected/stored by each Controller plugin, as the currently favored architecture is to have a very thin gateway node which just passes packets between controller plugins and the OTA packets. My alternative vision would be to have a thicker gateway which could, for example, store the metadata for each ChildSensor (eg: ChildSensorType, but expandable) gathered from nodes during config, and provide it to the controller plugins.

            With this approach there is no barrier to having multiple children of the same type (but with different ChildIDs) because the concept of addressing & identity have not been conflated with the ideas of types and metadata. In my preferred alternatives, the normal OTA packet for routine reports and commands omits the semantics and includes only addressing/identity, while the initial configuration passes semantics, types and names that are relatively static and do not change per-packet. Moving ChildSensorType from per-packet addressing to static metadata would be one of the implications of this design principle. (If you apply this to values, then we also include a numeric ValueIndex in the packet and move the ValueType info to the metadata.)

            (I went even further and suggested omitting the ChildID from the regular OTA packet by having only NodeID | ValueIndex for addressing, and treating ChildID as static metadata which can be associated with each ValueIndex. Thus for example we could say that ValueIndex 3 contains a temperature value associated with child 2, and ValueIndex 4 contains a humidty value also associated with child 2. The central system (thick gateway or controller plugin) would use saved metadata to know which values come from or go to a given child ID container, but the OTA packet doesn't have to include that every time. Not surprisingly, this was a bit too radical a revamping and has not gained traction. And that's OK too, I'm only one voice with only part of the picture here).

            Just to be complete, EncodingFormat (eg: 1, 2, or 4 byte integer or unsigned interger, or 4 byte float, or float encoded a text string etc) could be either config time metadata if it's always the same, or could be included in the OTA packet if it changes dynamically. I can see a case for either design.

            I'm mentioning this because you seem interested in looking into deeper changes to the architecture, but I'm not pushing these concepts here now - my ideas on such things have been heard and a few have influenced the direction hek is going, but the overall design concept has not been persuasive enough. That's fair.

            The system here is pretty good already, so it's not critical to make such changes. So rather the push MySensor too much, I've been (intermittantly) working on my own protocol ideas (at the spec level) which incorporates these and other concepts, and which could co-exist with MySensors. However my tentative design has additional design goals including high bandwidth distribution of pixel control data and medium high bandwidth collection of rapidly changing "sensor" data (eg: joysticks used for low latency pattern. It would be able to handle the MySensors use case of low bandwidth sensor networking as a less challenging subset. However my design is an off-and-on project on paper so far, while MySensors is a working system, so I give a lot of weight to the latter.

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

              Yes, we should set the goals high. But we need a realistic plan using the limited development resources we actually have where people should be able to pitch in when they have some time over between family and work.

              I've seen so many Open Source (and workplace) projects die due to grand unrealistic plans where there just isn't enough resources or time to realize them. The key here is doing things in small graspable steps.

              So we have a few things to consider and prioritize.

              1. Hardware requirements on the gateway. Today we have chosen to keep this as simple as possible but this might change in the future and nothing stops anyone from creating a gateway directly on RPI or ATMega2560 which could handle more advance MQTT stuff ot handle the id-handout.
              2. Support for multiple radios. Ongoing work started by @ToSa with a hanging PR (were have you been hanging lately BTW ;) )
              3. Keep plugin developers happy with a low threshold to create a plugin. We should keep ourselves from making too large serial protocol changes (too often) or we'll lose many supported controllers along the way.
              4. Support more sensor types with examples. This thread is the playground for creating a more complete set of supported sensors. In the spirit of this I've spend the last weeks trying to create more fun examples. The sensor-examples (and controller support) is the key factor to grow a larger audience (and hopefully more developers).
              5. Support for thing like encryption and simple OTA firmware updates.

              The more people helping out the faster we'll get there. :D

              Z 1 Reply Last reply
              0
              • hekH hek

                Yes, we should set the goals high. But we need a realistic plan using the limited development resources we actually have where people should be able to pitch in when they have some time over between family and work.

                I've seen so many Open Source (and workplace) projects die due to grand unrealistic plans where there just isn't enough resources or time to realize them. The key here is doing things in small graspable steps.

                So we have a few things to consider and prioritize.

                1. Hardware requirements on the gateway. Today we have chosen to keep this as simple as possible but this might change in the future and nothing stops anyone from creating a gateway directly on RPI or ATMega2560 which could handle more advance MQTT stuff ot handle the id-handout.
                2. Support for multiple radios. Ongoing work started by @ToSa with a hanging PR (were have you been hanging lately BTW ;) )
                3. Keep plugin developers happy with a low threshold to create a plugin. We should keep ourselves from making too large serial protocol changes (too often) or we'll lose many supported controllers along the way.
                4. Support more sensor types with examples. This thread is the playground for creating a more complete set of supported sensors. In the spirit of this I've spend the last weeks trying to create more fun examples. The sensor-examples (and controller support) is the key factor to grow a larger audience (and hopefully more developers).
                5. Support for thing like encryption and simple OTA firmware updates.

                The more people helping out the faster we'll get there. :D

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

                @hek said:

                Keep plugin developers happy with a low threshold to create a plugin. We should keep ourselves from making too large serial protocol changes (too often) or we'll lose many supported controllers along the way.

                I do not mean the following to insist on any changes - I accept that there is a balance to be had between changing things for the future and making today's changes as small as possible, and that somebody has to make that judgement call.

                But just to explain where I have been coming from and why I have bothered explaining the alternative approach (clean separation between dynamic addressing/identity and static metadata) - it's because of exactly your point quoted above. If we run into limitations in the architecture a year from now and wish we'd thought it out better, it's going to be a lot harder to fix things because there will be a lot more plugins already written by then. It could be better to bite off that transition now when many HA system interfaces to MySensors are not yet written, and the ones that do exist are still in early development with the original developers highly involved. A year or two from now, more interfaces will exist, and some of the early implementers may have moved on to other foci.

                The concrete of decisions will be setting into the stone of legacy code over the next year. Anything substantial that isn't in the next revision of the protocol - being discussed in this thread - is likely to never happen (lots of small tweaks may happen of course). The cusp of going from 95% Vera users with almost all architecture-tied code from a single developer, to a broad array of HA system interfaces written by many groups, is now, and it's going to change the degree of flexibility. This may be the last chance to do a deep rethinking.

                The other point was that I was suggesting how to simplify the task of plugin writers, by have a single codebase within the MySensors universe (eg: Arduino C++) for as many of the tasks as possible. That lowers the bar some, and reduces the amount of parallel development of doing the same thing in multiple plugins (like assigning addresses).

                OK, I wanted to be understood that my purpose was very much in line with the quoted desiderata, not opposed to it - but I'll be cooperating with the direction @hek chooses.

                1 Reply Last reply
                0
                • Z Zeph

                  @daulagari said:

                  My proposal is basically to merge the ChildSensorId and ChildSensorType into one, being the ChildSensorType, so:

                  OK. That touches on one of my critiques of the direction it's going. (Maybe "critique" would sound stronger than I intend, I'm not disparaging the current direction, just suggesting another one).

                  I think that ChildSensorID is an appropriate concept for identification and addressing (ie: included in packets), while "ChildSensorType" is static metadata which should be collected during configuration but does not need to be passed in every packet. So I would simplify in the other direction - get rid of ChildSensorType in the packet addressing heirarchy, rather than getting rid of ChildSensorID.

                  This idea is not currently popular, in large part I think because the metadata describing a given ChildSensor would have to be collected/stored by each Controller plugin, as the currently favored architecture is to have a very thin gateway node which just passes packets between controller plugins and the OTA packets. My alternative vision would be to have a thicker gateway which could, for example, store the metadata for each ChildSensor (eg: ChildSensorType, but expandable) gathered from nodes during config, and provide it to the controller plugins.

                  With this approach there is no barrier to having multiple children of the same type (but with different ChildIDs) because the concept of addressing & identity have not been conflated with the ideas of types and metadata. In my preferred alternatives, the normal OTA packet for routine reports and commands omits the semantics and includes only addressing/identity, while the initial configuration passes semantics, types and names that are relatively static and do not change per-packet. Moving ChildSensorType from per-packet addressing to static metadata would be one of the implications of this design principle. (If you apply this to values, then we also include a numeric ValueIndex in the packet and move the ValueType info to the metadata.)

                  (I went even further and suggested omitting the ChildID from the regular OTA packet by having only NodeID | ValueIndex for addressing, and treating ChildID as static metadata which can be associated with each ValueIndex. Thus for example we could say that ValueIndex 3 contains a temperature value associated with child 2, and ValueIndex 4 contains a humidty value also associated with child 2. The central system (thick gateway or controller plugin) would use saved metadata to know which values come from or go to a given child ID container, but the OTA packet doesn't have to include that every time. Not surprisingly, this was a bit too radical a revamping and has not gained traction. And that's OK too, I'm only one voice with only part of the picture here).

                  Just to be complete, EncodingFormat (eg: 1, 2, or 4 byte integer or unsigned interger, or 4 byte float, or float encoded a text string etc) could be either config time metadata if it's always the same, or could be included in the OTA packet if it changes dynamically. I can see a case for either design.

                  I'm mentioning this because you seem interested in looking into deeper changes to the architecture, but I'm not pushing these concepts here now - my ideas on such things have been heard and a few have influenced the direction hek is going, but the overall design concept has not been persuasive enough. That's fair.

                  The system here is pretty good already, so it's not critical to make such changes. So rather the push MySensor too much, I've been (intermittantly) working on my own protocol ideas (at the spec level) which incorporates these and other concepts, and which could co-exist with MySensors. However my tentative design has additional design goals including high bandwidth distribution of pixel control data and medium high bandwidth collection of rapidly changing "sensor" data (eg: joysticks used for low latency pattern. It would be able to handle the MySensors use case of low bandwidth sensor networking as a less challenging subset. However my design is an off-and-on project on paper so far, while MySensors is a working system, so I give a lot of weight to the latter.

                  N Offline
                  N Offline
                  ntruchsess
                  Plugin Developer
                  wrote on last edited by ntruchsess
                  #111

                  @Zeph said:

                  I think that ChildSensorID is an appropriate concept for identification and addressing (ie: included in packets), while "ChildSensorType" is static metadata which should be collected during configuration but does not need to be passed in every packet. So I would simplify in the other direction - get rid of ChildSensorType in the packet addressing heirarchy, rather than getting rid of ChildSensorID.

                  100% agree. Sending ChildSensorType is just redundant static metadata. Just having implement a MySensor-conroller for fhem I noticed there's no way to request Presentation-messages from Sensors so a Controller after Sensor startup, so the controller has no way to verify it's persistent 'static' metadata without a user going to restart the sensors. This actually is a point that needs to improove.
                  But the argument a controller would have to be 'thin' (in terms of not being statefull in respect to sensor details) is a no-arg. You cannot do automation without knowing details about the controlled items.

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

                    Yep ChildSensorType is redundant.
                    If thin things like the Arduino based MQTT gateway would manage without it we could probably remove it from the normal payload.

                    Request for metadata is a good idea. Would require sensor to keep this available at all time in memory or eeprom when controller requests it.

                    N 2 Replies Last reply
                    0
                    • hekH Offline
                      hekH Offline
                      hek
                      Admin
                      wrote on last edited by
                      #113

                      Update first post to reflect ChildSensorType changes. Should probably rename this thread also.

                      1 Reply Last reply
                      0
                      • hekH hek

                        Yep ChildSensorType is redundant.
                        If thin things like the Arduino based MQTT gateway would manage without it we could probably remove it from the normal payload.

                        Request for metadata is a good idea. Would require sensor to keep this available at all time in memory or eeprom when controller requests it.

                        N Offline
                        N Offline
                        ntruchsess
                        Plugin Developer
                        wrote on last edited by
                        #114

                        @hek said:

                        Request for metadata is a good idea. Would require sensor to keep this available at all time in memory.

                        This is allready in memory, just requires a move of send-presentation-messages code into own method that is called from begin and in response to 'request-metadata'.

                        1 Reply Last reply
                        0
                        • hekH hek

                          Yep ChildSensorType is redundant.
                          If thin things like the Arduino based MQTT gateway would manage without it we could probably remove it from the normal payload.

                          Request for metadata is a good idea. Would require sensor to keep this available at all time in memory or eeprom when controller requests it.

                          N Offline
                          N Offline
                          ntruchsess
                          Plugin Developer
                          wrote on last edited by
                          #115

                          @hek said:

                          If thin things like the Arduino based MQTT gateway would manage without it we could probably remove it from the normal payload.

                          As MQTT-protocoll is not stateless (it does Quality-of-service with message-storage and redelivery - though the existing gateway code doesn't support this yet) the MQTT-gateway cannot be a thin thing anyway. I wouldn't mind if it doesn't run on Uno due to memory-constraints, there's the Mega2560 or even the DUE which seems to be affordable as you only need a single gateway per install.

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

                            First post updated.

                            1 Reply Last reply
                            0
                            • tbowmoT Offline
                              tbowmoT Offline
                              tbowmo
                              Admin
                              wrote on last edited by
                              #117

                              what about a "RS232" sensor?

                              The TV in my living room has a serial port to control it (Can do everything I can with the remote) and also request status from the TV (eg. powerstate, channel being watched etc). Could be cool to include that into some kind of domotica solution

                              / Thomas

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

                                This would probably qualify for a special command-type as it's not a "normal" sensor.

                                Today I've squeezed in scene controller and ir-commands among the "sensors" but they should probably also have their own commands. Thanks for the input!

                                1 Reply Last reply
                                0
                                • AnticimexA Offline
                                  AnticimexA Offline
                                  Anticimex
                                  Contest Winner
                                  wrote on last edited by
                                  #119

                                  Perhaps rs232 and ir can be fused together as one type? Both are by definition serial protocols. Each with a protocol and symbol rate specific to the appliance at hand.

                                  Do you feel secure today? No? Start requiring some signatures and feel better tomorrow ;)

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

                                    I know too little about rs332 and IR to make a suitable command structure at the moment.

                                    1 Reply Last reply
                                    0
                                    • AnticimexA Offline
                                      AnticimexA Offline
                                      Anticimex
                                      Contest Winner
                                      wrote on last edited by
                                      #121

                                      Think "uart" :)

                                      Do you feel secure today? No? Start requiring some signatures and feel better tomorrow ;)

                                      1 Reply Last reply
                                      0
                                      • tbowmoT Offline
                                        tbowmoT Offline
                                        tbowmo
                                        Admin
                                        wrote on last edited by
                                        #122

                                        Think that, for UART it should be enough to send characters (or strings) to the sensor, and send back replies to the master (If anything comes in at the serial port)

                                        I asume that if one needs to use serial to communicate with some remote device, one will setup baudrate etc. for that particular device in the arduino sketch. So no need to use initialisation commands for the serial stuff.

                                        For IR it's a bit more complicated, because there is no single protocol definition like serial. for IR it could be RC5, RC6, something else, it can be different carrier frequences etc. for each brand. And it can be send to multiple devices, using the same IR "blaster"

                                        / Thomas

                                        AnticimexA 1 Reply Last reply
                                        0
                                        • tbowmoT tbowmo

                                          Think that, for UART it should be enough to send characters (or strings) to the sensor, and send back replies to the master (If anything comes in at the serial port)

                                          I asume that if one needs to use serial to communicate with some remote device, one will setup baudrate etc. for that particular device in the arduino sketch. So no need to use initialisation commands for the serial stuff.

                                          For IR it's a bit more complicated, because there is no single protocol definition like serial. for IR it could be RC5, RC6, something else, it can be different carrier frequences etc. for each brand. And it can be send to multiple devices, using the same IR "blaster"

                                          / Thomas

                                          AnticimexA Offline
                                          AnticimexA Offline
                                          Anticimex
                                          Contest Winner
                                          wrote on last edited by
                                          #123

                                          @Thomas-Bowman-Mørch well, yes. But I am more thinking a "protocol". No matter what serial interface the sensor has externally, any serial interface implement some form of protocol for managing handshaking, flow control, etc. And considering the limitation in the data packets in RF24, we cannot expect to be able to implement a "stream".
                                          By having a protocol, the sensor node can ensure it collects enough data to be able to satisfy it's external device, i.e. caching data packets for making a larger continuous serial transmission. Or reading a larger continuous transmission and caching it from the device, before starting to transmitting it to the controller. If transmission starts too early, data sent from the device, could be lost (depending on HW/SW solution) as serial protocols do not have to implement flow control (and rarely does).
                                          Both IR and UART share the same caveats so in that respect, I think it makes good sense to figure out a command type that can satisfy both types as the needs are similar. And then it potentially can also be applied to other serial protocols (CAN for instance).

                                          Do you feel secure today? No? Start requiring some signatures and feel better tomorrow ;)

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


                                          15

                                          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