Skip to content
  • 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. General Discussion
  3. Can one arduino present multiple devices?
  • Getting Started
  • Controller
  • Build
  • Hardware
  • Download/API
  • Forum
  • Store

Can one arduino present multiple devices?

Scheduled Pinned Locked Moved General Discussion
14 Posts 6 Posters 1.8k Views 4 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    flopp
    wrote on last edited by
    #2

    Hi, if you upload your code then it would be easier to understand.
    Don't forget to use </> when you upload it, thanks

    1 Reply Last reply
    0
    • alowhumA alowhum

      I have a plant sensor arduino.

      It presents 6 capacitive sensors.
      It presents 6 dimmers that indicate the level at which each plant should receive more water.

      A device with 12 children, that's a bit messy.

      Ideally I'd like to help a controller see the arduino as 6 separate devices that each have a sensor a dimmer.

      Is that possible?

      mfalkviddM Offline
      mfalkviddM Offline
      mfalkvidd
      Mod
      wrote on last edited by
      #3

      @alowhum could you clarify why it becomes messy?
      To my knowledge, there is no way to report multiple node ids without very intrusive hacks into the core functions. All routing is dependent on nodes having a single node id.

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

        What controller are you using?

        1 Reply Last reply
        0
        • alowhumA Offline
          alowhumA Offline
          alowhum
          Plugin Developer
          wrote on last edited by
          #5

          @mfalkvidd Thanks, that answers my question.

          @flopp Here's an example of my present function:

          void presentation()
          {
            // Send the sketch version information to the gateway and Controller
            sendSketchInfo(F("Plant Sensorium"), F("1.2"));
          
            // Present the sensors
            //for (byte i=0; i<NUMBER_OF_SENSORS*2 ; i=i+2) {
              present(0, S_MOISTURE, "1");  delay(RF_DELAY);       // present all the sensors
              present(1, S_DIMMER, "1");  delay(RF_DELAY);       // present the dimmers to set the level with.
              present(2, S_MOISTURE, "2");  delay(RF_DELAY);       // present all the sensors
              present(3, S_DIMMER, "2");  delay(RF_DELAY);       // present the dimmers to set the level with.
              present(4, S_MOISTURE, "3");  delay(RF_DELAY);       // present all the sensors
              present(5, S_DIMMER, "3");  delay(RF_DELAY);       // present the dimmers to set the level with.
              present(6, S_MOISTURE, "4");  delay(RF_DELAY);       // present all the sensors
              present(7, S_DIMMER, "4");  delay(RF_DELAY);       // present the dimmers to set the level with.
              present(8, S_MOISTURE, "5");  delay(RF_DELAY);       // present all the sensors
              present(9, S_DIMMER, "5");  delay(RF_DELAY);       // present the dimmers to set the level with.
              present(10, S_MOISTURE, "6");  delay(RF_DELAY);       // present all the sensors
              present(11, S_DIMMER, "6");  delay(RF_DELAY);       // present the dimmers to set the level with.
            //}
          
          }
          

          I use Domoticz and intend to use Mozilla Gateway. But it shouldn't matter what controller I use really.

          parachutesjP G 2 Replies Last reply
          0
          • alowhumA alowhum

            @mfalkvidd Thanks, that answers my question.

            @flopp Here's an example of my present function:

            void presentation()
            {
              // Send the sketch version information to the gateway and Controller
              sendSketchInfo(F("Plant Sensorium"), F("1.2"));
            
              // Present the sensors
              //for (byte i=0; i<NUMBER_OF_SENSORS*2 ; i=i+2) {
                present(0, S_MOISTURE, "1");  delay(RF_DELAY);       // present all the sensors
                present(1, S_DIMMER, "1");  delay(RF_DELAY);       // present the dimmers to set the level with.
                present(2, S_MOISTURE, "2");  delay(RF_DELAY);       // present all the sensors
                present(3, S_DIMMER, "2");  delay(RF_DELAY);       // present the dimmers to set the level with.
                present(4, S_MOISTURE, "3");  delay(RF_DELAY);       // present all the sensors
                present(5, S_DIMMER, "3");  delay(RF_DELAY);       // present the dimmers to set the level with.
                present(6, S_MOISTURE, "4");  delay(RF_DELAY);       // present all the sensors
                present(7, S_DIMMER, "4");  delay(RF_DELAY);       // present the dimmers to set the level with.
                present(8, S_MOISTURE, "5");  delay(RF_DELAY);       // present all the sensors
                present(9, S_DIMMER, "5");  delay(RF_DELAY);       // present the dimmers to set the level with.
                present(10, S_MOISTURE, "6");  delay(RF_DELAY);       // present all the sensors
                present(11, S_DIMMER, "6");  delay(RF_DELAY);       // present the dimmers to set the level with.
              //}
            
            }
            

            I use Domoticz and intend to use Mozilla Gateway. But it shouldn't matter what controller I use really.

            parachutesjP Offline
            parachutesjP Offline
            parachutesj
            wrote on last edited by
            #6

            @alowhum most of the time it is the other way round that there are not enough input pins on the arduino to connect all sensors.
            I never had an issue with childs and what is the difference on controller side?

            1 Reply Last reply
            0
            • alowhumA alowhum

              @mfalkvidd Thanks, that answers my question.

              @flopp Here's an example of my present function:

              void presentation()
              {
                // Send the sketch version information to the gateway and Controller
                sendSketchInfo(F("Plant Sensorium"), F("1.2"));
              
                // Present the sensors
                //for (byte i=0; i<NUMBER_OF_SENSORS*2 ; i=i+2) {
                  present(0, S_MOISTURE, "1");  delay(RF_DELAY);       // present all the sensors
                  present(1, S_DIMMER, "1");  delay(RF_DELAY);       // present the dimmers to set the level with.
                  present(2, S_MOISTURE, "2");  delay(RF_DELAY);       // present all the sensors
                  present(3, S_DIMMER, "2");  delay(RF_DELAY);       // present the dimmers to set the level with.
                  present(4, S_MOISTURE, "3");  delay(RF_DELAY);       // present all the sensors
                  present(5, S_DIMMER, "3");  delay(RF_DELAY);       // present the dimmers to set the level with.
                  present(6, S_MOISTURE, "4");  delay(RF_DELAY);       // present all the sensors
                  present(7, S_DIMMER, "4");  delay(RF_DELAY);       // present the dimmers to set the level with.
                  present(8, S_MOISTURE, "5");  delay(RF_DELAY);       // present all the sensors
                  present(9, S_DIMMER, "5");  delay(RF_DELAY);       // present the dimmers to set the level with.
                  present(10, S_MOISTURE, "6");  delay(RF_DELAY);       // present all the sensors
                  present(11, S_DIMMER, "6");  delay(RF_DELAY);       // present the dimmers to set the level with.
                //}
              
              }
              

              I use Domoticz and intend to use Mozilla Gateway. But it shouldn't matter what controller I use really.

              G Offline
              G Offline
              Gerard van Seventer
              wrote on last edited by
              #7

              @alowhum, Domoticz can't handle this well. I don't know about other controllers but Domoticz is a bit quirky with multiple sensors of the same kind on the same node. Especially HUM en TEMP are a pain.

              I "solved" this by using Node-Red in between the GW and Domoticz. Then you have all the freedom you want.

              zboblamontZ 1 Reply Last reply
              0
              • G Gerard van Seventer

                @alowhum, Domoticz can't handle this well. I don't know about other controllers but Domoticz is a bit quirky with multiple sensors of the same kind on the same node. Especially HUM en TEMP are a pain.

                I "solved" this by using Node-Red in between the GW and Domoticz. Then you have all the freedom you want.

                zboblamontZ Offline
                zboblamontZ Offline
                zboblamont
                wrote on last edited by
                #8

                @gerard-van-seventer One year, one Node, 12 sensors, send Temp every 5 minutes, Domoticz, never skipped a beat. Quirky ?

                1 Reply Last reply
                0
                • alowhumA Offline
                  alowhumA Offline
                  alowhum
                  Plugin Developer
                  wrote on last edited by
                  #9

                  @mfalkvidd I don't mind that MySensors uses one node I per device "under the hood". But perhaps the gateway could present the one device as 6 separate devices to the controller? And when it gets requests for one of those 6 devices, it just merges things back?

                  @Gerard-van-Seventer I have also not had any problems with Domoticz receiving data. I send data only once per second (so sending data for 6 sensors takes 6 seconds).

                  zboblamontZ 1 Reply Last reply
                  0
                  • alowhumA alowhum

                    @mfalkvidd I don't mind that MySensors uses one node I per device "under the hood". But perhaps the gateway could present the one device as 6 separate devices to the controller? And when it gets requests for one of those 6 devices, it just merges things back?

                    @Gerard-van-Seventer I have also not had any problems with Domoticz receiving data. I send data only once per second (so sending data for 6 sensors takes 6 seconds).

                    zboblamontZ Offline
                    zboblamontZ Offline
                    zboblamont
                    wrote on last edited by
                    #10

                    @alowhum { I don't mind that MySensors uses one node I per device "under the hood". But perhaps the gateway could present the one device as 6 separate devices to the controller? And when it gets requests for one of those 6 devices, it just merges things back?}
                    I really look forward to you developing this concept further with a proven working mechanism, but until your solution is revealed, I guess I don't mind either, the multiple devices per node "on the roof" via a dumb gateway are working just fine, leaving the Controller to do the smart stuff. ;)

                    1 Reply Last reply
                    0
                    • alowhumA Offline
                      alowhumA Offline
                      alowhum
                      Plugin Developer
                      wrote on last edited by alowhum
                      #11

                      @zboblamont But I want to help the controller understand the complexity of the device it's talking to. Right now it is told this:

                      PARENT

                      • child
                      • child
                      • child
                      • child
                      • child

                      All I'm asking us to explore is adding another level:

                      PARENT

                      • Group
                        • child
                        • child
                      • Group
                        • child
                        • child
                        • child

                      I think it would be very useful.

                      • Devices like NRF52 are getting more powerful and have more pins. This may make people want to integrate devices into one hardware form. A thermostat with a BME280 could at the same time present a weather station. A smart clock could at the same time present a security motion sensor. A plant irrigation sensor could at the same time present an air quality sensor.
                      • It would be more user friendly. It's nice if you can tell the controller how to initially set up the interface for the user, instead of just dumping all the children on them and going "Ask the user to sort and group this stuff". Controllers tend to think in devices, and accept and represent them as such (with Domoticz being an exception).
                      zboblamontZ 1 Reply Last reply
                      0
                      • alowhumA alowhum

                        @zboblamont But I want to help the controller understand the complexity of the device it's talking to. Right now it is told this:

                        PARENT

                        • child
                        • child
                        • child
                        • child
                        • child

                        All I'm asking us to explore is adding another level:

                        PARENT

                        • Group
                          • child
                          • child
                        • Group
                          • child
                          • child
                          • child

                        I think it would be very useful.

                        • Devices like NRF52 are getting more powerful and have more pins. This may make people want to integrate devices into one hardware form. A thermostat with a BME280 could at the same time present a weather station. A smart clock could at the same time present a security motion sensor. A plant irrigation sensor could at the same time present an air quality sensor.
                        • It would be more user friendly. It's nice if you can tell the controller how to initially set up the interface for the user, instead of just dumping all the children on them and going "Ask the user to sort and group this stuff". Controllers tend to think in devices, and accept and represent them as such (with Domoticz being an exception).
                        zboblamontZ Offline
                        zboblamontZ Offline
                        zboblamont
                        wrote on last edited by
                        #12

                        @alowhum But that is where you are confusing matters when you refer to the Gateway in some role of PRE-controller to make up for a perceived inadequacy in the selected Controller.
                        From the Node to the Controller the Gateway is a simple access point for various pathways no matter how complex or simple the Node or Controller functionality.
                        Likewise your first example quotes a thermostat and BME280 as if each has some inherent capability to communicate as a Node, despite prior mention of the NRF52 to which they would normally be connected, which Node would then communicate the individual data streams to the Controller.

                        How these individual streams are treated at the Controller are down to the User's selected Controller and how it is configured, adding complexity anywhere else in the pipeline doesn't make it more user friendly at all.

                        parachutesjP 1 Reply Last reply
                        1
                        • zboblamontZ zboblamont

                          @alowhum But that is where you are confusing matters when you refer to the Gateway in some role of PRE-controller to make up for a perceived inadequacy in the selected Controller.
                          From the Node to the Controller the Gateway is a simple access point for various pathways no matter how complex or simple the Node or Controller functionality.
                          Likewise your first example quotes a thermostat and BME280 as if each has some inherent capability to communicate as a Node, despite prior mention of the NRF52 to which they would normally be connected, which Node would then communicate the individual data streams to the Controller.

                          How these individual streams are treated at the Controller are down to the User's selected Controller and how it is configured, adding complexity anywhere else in the pipeline doesn't make it more user friendly at all.

                          parachutesjP Offline
                          parachutesjP Offline
                          parachutesj
                          wrote on last edited by
                          #13

                          @zboblamont I have to agree to this.
                          With OpenHAB, every child is more or less treated as an individual device (item). No matter if there is one or 100 connected to one arduino.
                          On the other hand, I do not think that more powerful devices will change dramatically. I think with sensor networks, decentralization and loose coupling with a gateway which just translates it into a common language is what is key. Putting additional intelligence into the nodes or gateways is not what I would expect and want.
                          I am running a lot on mySensors. But I also do have other brands deplyed. It is quite easy to exchange one against the other. The logic and intelligence is in the controller which makes it most flexible.

                          1 Reply Last reply
                          2
                          • alowhumA Offline
                            alowhumA Offline
                            alowhum
                            Plugin Developer
                            wrote on last edited by
                            #14

                            @zboblamont @parachutesj Thanks! Good to hear your perspectives.

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


                            18

                            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
                            • OpenHardware.io
                            • Categories
                            • Recent
                            • Tags
                            • Popular