• header.categories
    • header.recent
    • header.tags
    • header.popular
    • register
    • login

    Frustrated Newbie - Help with Nodes and Sensors

    scheduled pinned locked moved Troubleshooting
    46 posts 4 posters 15.2k views 2 watching
    loading-more-posts
    • oldest-to-newest
    • newest-to-oldest
    • most-votes
    reply
    • reply-as-topic
    guest-login-reply
    deleted-message
    • EmenikeE offline
      Emenike @jkandasa
      global:last-edited-by,

      @jkandasa Wow! That really helped, I was able to not only connect to the MyController Gateway, but two Nodes discovered and Nine sensors discovered. Thanks @jkandasa you never know how hard I tried. all along, connecting and disconnecting Arduino and Putty intermittently without knowing that I was disturbing the line. see what it now looks like. 0_1543747146086_Screen Shot 5.png

      So can I continue troubleshooting my problems with this tread or should I create a new one?

      jkandasaJ one-reply-to-this-post last-reply-time reply quote 0
      • jkandasaJ offline
        jkandasa @Emenike
        global:last-edited-by,

        @emenike For me, it is ok to continue here. Up to your wish.

        I see the name of the sensor shows some debug message, looks like we have some issue with MyController.
        Can you disable debug in MySensors gateway sketch?

        // #define MY_DEBUG
        

        To update gateway sketch, you need to disable gateway in MyController and update your gateway sketch via Arduino IDE. After a successful update, you can enable gateway in MyController.

        EmenikeE one-reply-to-this-post last-reply-time reply quote 0
        • EmenikeE offline
          Emenike @jkandasa
          global:last-edited-by,

          @jkandasa Thanks.
          I disabled the MyController Gateway, then commented out the debug line on the sketch via IDE. and uploaded the sketch the the MySensors gateway @ COM5. Closed the IDE and restarted enabled the MyController Gateway --- but now one node is down while the Gateway connected successfully. 0_1543792504887_Screen Shot 6.png

          one-reply-to-this-post last-reply-time reply quote 0
          • EmenikeE offline
            Emenike
            global:last-edited-by,

            This is what ot looks like now...

            0_1543792608629_Screen Shot 7.png

            jkandasaJ one-reply-to-this-post last-reply-time reply quote 0
            • jkandasaJ offline
              jkandasa @Emenike
              global:last-edited-by,

              @emenike Seems all ok in MyController side.
              Can you check your sprinkler node powered up and in RF coverage?

              one-reply-to-this-post last-reply-time reply quote 0
              • T offline
                Tag MOD
                global:last-edited-by, Tag

                Hi All,

                Sorry was out for a couple of days...,

                @Emenike
                jkandasa is right, as an addition you can also add the debug stuff to you sketch and hook it up to your laptop to see the debugging stuff from the sensor perspective...

                If the sensor is out of range of you gateway you have some options to fix it:

                1. you can put a repeater node in the middle between the sensor and the gateway to extend the range of your network

                2. check your radio, exchange it for another one to rule out any radio hardware issues. (some of the radios have issues... especially the Nrf24l01 radios with the round black blob instead of a chip... believe me, I have been there and the range was approx 1.5 meters.....)

                3. If you use the Nrf24l01, add the capacitor to the power line of the radio (tought this was a 47uf capacitor), this will also improve communication (make sure you add this on the sensor and the gateway radio!)

                EmenikeE one-reply-to-this-post last-reply-time reply quote 1
                • EmenikeE offline
                  Emenike @Tag
                  global:last-edited-by,

                  @tag @jkandasa

                  My Sprinkler node is downstairs - just about 7 meters below the spot where the MySensors Gateway + MyController laptop is (with about 2 concrete walls separating them). Does this matter? For the records, I have capacitor on both MySensors Gateway, and the Water Sprinkler node.

                  one-reply-to-this-post last-reply-time reply quote 0
                  • T offline
                    Tag MOD
                    global:last-edited-by,

                    Can be an issue, can you try if you see the node if it is basically next to your gateway?

                    EmenikeE one-reply-to-this-post last-reply-time reply quote 0
                    • EmenikeE offline
                      Emenike @Tag
                      global:last-edited-by,

                      @tag Okay I will move them closer until I conclude with all the bugs, then I will move them apart and see if distance is the issue

                      by the way... is This project in this video a MySensors Gateway or something entirely new?

                      T one-reply-to-this-post last-reply-time reply quote 0
                      • T offline
                        Tag MOD @Emenike
                        global:last-edited-by,

                        @emenike

                        Okay, great!,
                        Had a look at the link you send, it looks like mysensors, but it is something different...

                        skywatchS one-reply-to-this-post last-reply-time reply quote 0
                        • skywatchS offline
                          skywatch @Tag
                          global:last-edited-by,

                          @Emenike

                          This bit is wrong in your gateway sketch.....

                          // Define a lower baud rate for Arduinos running on 8 MHz (Arduino Pro Mini 3.3V & SenseBender)
                          #if F_CPU == 8000000L
                          
                          //#define MY_BAUD_RATE 38400
                          #define MY_BAUD_RATE 115200
                          #endif
                          

                          The baud rate in the if statement should be 38400 as it says in the line above it.

                          It won't matter if you are using a 5V arduino, but if you were to use a 3.3V one this would be a big problem.

                          EmenikeE one-reply-to-this-post last-reply-time reply quote 0
                          • EmenikeE offline
                            Emenike @skywatch
                            global:last-edited-by,

                            @skywatch Thanks @skywatch

                            Please note that I am using a Nano for my gate way...
                            I thought the baud rate should be the same for Arduino and the Putty sniffer, I will revert to "38400"...

                            T skywatchS topic:replies-to-this-post, 2 last-reply-time reply quote 0
                            • T offline
                              Tag MOD @Emenike
                              global:last-edited-by,

                              @emenike

                              Make sure that the same baudrate is used in the gateway sketch and mycontroller.....

                              EmenikeE one-reply-to-this-post last-reply-time reply quote 0
                              • EmenikeE offline
                                Emenike @Tag
                                global:last-edited-by,

                                @tag
                                😭 but that was exactly how it was until you said to change 38400 …. but it connected alright after | changed to 38400 and brought the node next to the laptop.

                                T one-reply-to-this-post last-reply-time reply quote 0
                                • skywatchS offline
                                  skywatch @Emenike
                                  global:last-edited-by,

                                  @emenike said in Frustrated Newbie - Help with Nodes and Sensors:

                                  @skywatch Thanks @skywatch

                                  Please note that I am using a Nano for my gate way...
                                  I thought the baud rate should be the same for Arduino and the Putty sniffer, I will revert to "38400"...

                                  That part of the gateway sketch is an 'If' statement. It just tells the compilier that 'if' the board is a 3.3v 8MHz type, then reduce the baud rate to match. 8MHz boards are not reliable at 115200.

                                  one-reply-to-this-post last-reply-time reply quote 0
                                  • T offline
                                    Tag MOD @Emenike
                                    global:last-edited-by,

                                    @emenike

                                    Okay so if I understand correctly, all works if the nodes are basically next to each other... is that correct?

                                    EmenikeE one-reply-to-this-post last-reply-time reply quote 0
                                    • EmenikeE offline
                                      Emenike @Tag
                                      global:last-edited-by,

                                      @tag Yes! All works well when they are next to each other on the same desk.
                                      I have reverted the default baud rate and all is well. I have gone ahead to create Triggers and Conditions, Schedules, Actions, etc. But I somehow can not seem to tie all up to do what I want.

                                      I want to do a whole lot of things, but lets start with the first one. I need to pull in time and date from the controller to my node. How do I do this? Can I have a simple example that shows the steps or syntax and I will try to do other stuff. The Mysensors node uses a project that pulls data from Weather Underground, which I learnt has stopped its free weather information services. I have researched the topic and found a likely alternative in Open Weather Service) . Is anyone using Open Weather? https://openweathermap.org/current)

                                      1. I need to create Actions (or triggers that target all 8 objects from my node and set them all "on".
                                      2. I need to create another action trigger that targets all 8 objects and sets them to "off"
                                      3. I need to create an action trigger cycles through each value on the node and turn them on for a duration I have a variable in the Controller on each value to determine how long each one will run. Its a whole lot, and it appears I may have bitten off more than I can chew.
                                      jkandasaJ one-reply-to-this-post last-reply-time reply quote 0
                                      • jkandasaJ offline
                                        jkandasa @Emenike
                                        global:last-edited-by,

                                        @emenike

                                        To receive time in your node, you have to call requestTime(); from your node, then you will receive time on the following function(add this in your node code),

                                        void receiveTime(unsigned long _timestamp){
                                           // do actions with received time
                                        }
                                        
                                        • Regards Wunderground: I have added details in https://forum.mycontroller.org/topic/215/weatherdata-structure-question/3 looks like they will give some access for personal use.
                                        • Regards Open weather, we do not have any direct support, however, you may use a script to collect data.

                                        I need to create Actions (or triggers that target all 8 objects from my node and set them all "on".

                                        You need to create 8 Operations for each object. Send payload operation with 1(ON), Add all of them in a rule. define your condition in the rule.

                                        I need to create another action trigger that targets all 8 objects and sets them to "off"

                                        You need to create 8 Operations for each object. Send payload operation with 0(OFF), Add all of them in a rule. define your condition in the rule.

                                        I need to create an action trigger cycles through each value on the node and turn them on for a duration I have a variable in the Controller on each value to determine how long each one will run. Its a whole lot, and it appears I may have bitten off more than I can chew.

                                        Seems this is complex, we may not easy by simple rule definition/timer. A script will be a good solution for this.

                                        Some of the discussions,
                                        https://forum.mycontroller.org/topic/45/timers-and-scripts
                                        https://forum.mycontroller.org/topic/262/how-to-automatically-turn-off-relay-after-defined-time

                                        EmenikeE one-reply-to-this-post last-reply-time reply quote 0
                                        • EmenikeE offline
                                          Emenike @jkandasa
                                          global:last-edited-by, Emenike

                                          Thanks @jkandasa you are awesome support. I see the requestTime() function call in the sketch, but where in MyController do I add the node code?

                                          void receiveTime(unsigned long _timestamp){
                                             // do actions with received time
                                          }
                                          
                                          jkandasaJ one-reply-to-this-post last-reply-time reply quote 0
                                          • EmenikeE offline
                                            Emenike
                                            global:last-edited-by,

                                            I have created the UID Tags... See below, did I do it right?UID Tags.png

                                            I then tried to create the JS script as described in your old reference you supplied... but I got an error.

                                            RunQuery Error.png

                                            What are I doing wrong?

                                            jkandasaJ one-reply-to-this-post last-reply-time reply quote 0
                                            • first-post
                                              last-post

                                            0

                                            online

                                            644

                                            users

                                            532

                                            topics

                                            3.4k

                                            posts
                                            Copyright © 2015-2025 MyController.org | Contributors | Localization