Announcement

Collapse
No announcement yet.

Building Auruino network basics

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Building Auruino network basics

    I am just starting to get into Arduino so my understanding is basic at this point.

    I am running HS3 on a Win10 server. Generally, my interest is in building a few specialized sensor nodes that communicate via wifi.

    Here is my understanding which I would appreciate being corrected on if it is wrong.

    I can take an Arduino Uno and add a 8266 wifi board and use this as the Arduino controller. Install the Arduino plugin for HS3. Serial connect the controller to the Win10 server via USB. For each sensor node, use an Arduino Nano with the 8266 wifi board. This should allow multiple sensor nodes all communicating back to the controller which is communicating with HS3 via the plugin.

    I have read about the mysensors.org sketches for controller and nodes. It looks like the HS3 plugin probably does not use these sketches. Are there specific sketches I need to use with this plugin? I'm not referring to sketches with sensor specific logic. I'm thinking more along the lines of sketches and libraries that handle the wifi comms from multiple nodes.

    Hope this makes sense. I'm trying to confirm my head is in the right place in terms of how multi-nodes will work together.

    Thanks in advance!

  • #2
    OK, I think I know what you are asking, let me answer it this way.

    The ESP8266, its a wifi device with some I/O. The HS plugin can control this device directly. I think there is limited functionality when comparing it to a UNO ie: PWM outputs and numbers of I/O. You will need to read the threads in the forum to see where Greig is at with his plugin supporting this device.

    You could connect an UNO directly to HS via USB, that works fine. You can add a W5100 wiznet board to the UNO and then connect via ethernet.

    If you want to have an ESP8266 connect to HS and then hang additional devices ie: port expansion or another UNO from it then you will need to code that into the plugins API. The API is documented well, its simple but very functional, you can put considerable complexity into your own code and add it to the API.

    Does that help ?
    HS 2.2.0.11

    Comment


    • #3
      Thanks for the reply @petez69,

      My thoughts were that the 8266s would only be used to give wifi capability to a Uno or Nano. I wasn't expecting them to control any sensors by themselves.

      The Uno will be connected to the server via serial(USB). It will have no sensors attached, only the 8266. All the other nodes (Nano) will communicate to HS (via plugin) thru the Uno. Each Nano will have one or more sensors attached which are being reported back to HS.

      Hopefully that is clearer.

      Comment


      • #4
        Ok I'm still a little unsure.

        The ESP8266 card is wifi and has I/O. To connect it to a nano you would use the serial pins to have them communicate. The plugin would communicate directly with the ESP8266 board and you would create code in the API to manage the comms with the nano ?

        You say that the uno/nano would be connected to the computer via USB and then say it will be connected via ESP8266, thats whats confusing me...why would you do this ?

        Reading your post again, are you wanting a UNO to connect to the HS box via USB and connect a ESP8266 wifi module to that UNO to provide WIFI connectivity to other devices ie: AP mode ? To me that sounds overly complex. The ESP8266 can connect to your wifi network AND act like a scaled down UNO all in the same package.

        If I've missed the point, hand draw what you are proposing on paper and upload the gif so we can get an idea of the network topology

        Cheers..Pete
        HS 2.2.0.11

        Comment


        • #5
          You are probably right that I am making this more complicated than needed. I didn't realize the 8266 was anything more than a wifi interface.

          Here is a pic of what I am envisioning.
          Attached Files

          Comment


          • #6
            OK, now I see.....its too complicated but I get your thinking :-)

            Greig has added support for NodeMCU boards. I'm not sure if he's added API mode as yet but from what you show it should be standard functions ie: input, output, pwm etc.

            Let me ask, does it have to be wireless ? I've had mixed results previously with wireless connections, it may just have been the clone boards but I never got to the bottom of it.

            Get a NodeMCU board and experiment, its the simplest way to implement what you are looking for.

            Look forward to hearing your successes and challenges :-)
            HS 2.2.0.11

            Comment


            • #7
              I sure appreciate the dialog!

              Wireless is the best option. My house is a hand crafted log house with vaulted ceiling. There is no attic and the walls are logs not studs and plaster. Getting a cable from point A to B is near impossible without it being visible. For my home automation, I have mostly used Insteon devices. I have all my lighting controlled to the extent I wanted it. I use Blue Iris for security and it has wifi cameras.

              I'll get a nodeMCU and try that. I'll update this thread in a few days after I have some results.

              Thanks again.

              Robert

              Comment


              • #8
                Originally posted by logbuilder View Post
                I sure appreciate the dialog!

                Wireless is the best option. My house is a hand crafted log house with vaulted ceiling. There is no attic and the walls are logs not studs and plaster. Getting a cable from point A to B is near impossible without it being visible. For my home automation, I have mostly used Insteon devices. I have all my lighting controlled to the extent I wanted it. I use Blue Iris for security and it has wifi cameras.

                I'll get a nodeMCU and try that. I'll update this thread in a few days after I have some results.

                Thanks again.

                Robert
                Hi RObert

                Understand your challenges :-) I originally modified the code to try wifi and found that it lost connection every few days. I have not tried Greigs code as I've just moved house myself but it looks very promising.

                IN my new apartment I've had to pull some of the ceilings out of my garage to run cables upstairs. Not easy but it was the best way.

                I used the ESP8266 board for an external light, controlling the light via the onboard webserver, I think the code is in the Arduino compiler example. That worked very reliably :-)

                Look forward to your updates, great to share ideas :-)
                HS 2.2.0.11

                Comment


                • #9
                  Have you looked at mysensors.org? There is a plugin for HS.

                  Sent from my HTC6545LVW using Tapatalk

                  Comment


                  • #10
                    Originally posted by artart88 View Post
                    Have you looked at mysensors.org? There is a plugin for HS.

                    Sent from my HTC6545LVW using Tapatalk
                    I have looked at it however there is not much info available on the plugin. Do you use their plugin with HS3?

                    Comment


                    • #11
                      Just FYI I had three NodeMCU boards testing along with my 4 Megas and 1 Uno. The NodeMCU were all connected by WiFi and were totally reliable. I had a routine toggling an output and looking for an input to change that was connected to it. The testing ran once every 4 minutes for over a week without a single failure.

                      I would think this would be the simplest solution. The NodeMCU only supports digital inputs and outputs, an alive pin and a 4 line LCD at this time. I think Greig is going to look at adding OneWire and PWM support when he has time.
                      Randy Prade
                      Aurora, CO
                      Prades.net

                      PHLocation - Pushover - EasyTrigger - UltraECM3 - Ultra1Wire3 - Arduino

                      Comment


                      • #12
                        Thanks for the input rprade.

                        I just received a couple of nodeMCU cards today. I'll be testing them this weekend.

                        Comment


                        • #13
                          Originally posted by logbuilder View Post
                          I have looked at it however there is not much info available on the plugin. Do you use their plugin with HS3?
                          I use it and it works great but you need to pay attention to the instructions provided by the author regarding IDE versions and mysensors versions, etc. See: https://forums.homeseer.com/showthre...ight=mysensors

                          Comment


                          • #14
                            Maybe to close out this thread......

                            I now understand the architecture of the plugin and am really impressed. I was thinking I would have to do more of a roll your own but alias the plugin does so much of the hard work. Once I got everything installed, configured, and tweaked, it works very solidly. I now have two nodeMCUs each with a couple of sensors and they run reliably as well as recover gracefully when restarted.

                            Much more to do but just wanted to update this thread.

                            P.S. I did explore MySensors but could never get it to run.

                            Comment

                            Working...
                            X