Announcement

Collapse
No announcement yet.

Can't connect to 2nd Arduino board

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

    Can't connect to 2nd Arduino board

    Greig,

    I am having some issues with adding a 2nd Arduino board to my setup. It will not allow me to connect to it. The 1st board works fine that I have been using. Both are Mega2650 and both have the same sketch loaded. I tried upgrading to the latest beta V1.0.0.147 but still no luck.

    I also noticed this error when switching back to board 1, but not sure if it is related.

    Jan-01 12:16:56 PM Arduino Plugin Error = Exception in BuildAnalogSetup : Object reference not set to an instance of an object.

    Current Date/Time: 1/1/2018 12:15:32 PM
    HomeSeer Version: HS3 Pro Edition 3.0.0.379
    Operating System: Microsoft Windows 7 Professional - Work Station
    System Uptime: 0 Days 0 Hours 7 Minutes 22 Seconds
    IP Address: 192.168.0.5
    Number of Devices: 378
    Number of Events: 234
    Available Threads: 1600
    HSTouch Enabled: True
    Event Threads: 0
    Event Trigger Eval Queue: 0
    Event Trigger Priority Eval Queue: 0
    Device Exec Queue: 0
    Plugin Callback Queue: 0
    HSTouch Event Queue: 0
    Email Send Queue: 0
    Anti Virus Installed: Microsoft Security Essentials

    Enabled Plug-Ins
    1.0.0.147: Arduino Plugin
    30.0.0.36: RFXCOM
    0.1.48.0: WU Weather
    3.0.0.36: X10
    3.0.1.130: Z-Wave

    #2
    Originally posted by zakrzep View Post
    Greig,

    I am having some issues with adding a 2nd Arduino board to my setup. It will not allow me to connect to it. The 1st board works fine that I have been using. Both are Mega2650 and both have the same sketch loaded. I tried upgrading to the latest beta V1.0.0.147 but still no luck.

    I also noticed this error when switching back to board 1, but not sure if it is related.

    Jan-01 12:16:56 PM Arduino Plugin Error = Exception in BuildAnalogSetup : Object reference not set to an instance of an object.

    Current Date/Time: 1/1/2018 12:15:32 PM
    HomeSeer Version: HS3 Pro Edition 3.0.0.379
    Operating System: Microsoft Windows 7 Professional - Work Station
    System Uptime: 0 Days 0 Hours 7 Minutes 22 Seconds
    IP Address: 192.168.0.5
    Number of Devices: 378
    Number of Events: 234
    Available Threads: 1600
    HSTouch Enabled: True
    Event Threads: 0
    Event Trigger Eval Queue: 0
    Event Trigger Priority Eval Queue: 0
    Device Exec Queue: 0
    Plugin Callback Queue: 0
    HSTouch Event Queue: 0
    Email Send Queue: 0
    Anti Virus Installed: Microsoft Security Essentials

    Enabled Plug-Ins
    1.0.0.147: Arduino Plugin
    30.0.0.36: RFXCOM
    0.1.48.0: WU Weather
    3.0.0.36: X10
    3.0.1.130: Z-Wave
    You didn't say how you are connecting the boards - Serial or IP.

    If it is by IP, you cannot use the same sketch in both boards, because the IP, port and MAC address are hard coded into the sketch.

    Even with a serial connection the sketch would contain the board number, so it is doubtful you could use the same sketch. It is best to download the sketch for each board from the config page after you have configured the communication settings.
    HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

    Comment


      #3
      Randy,

      Thanks a lot for your reply. That was the issue! I needed to download the sketch for board 2. I am using serial.

      Comment


        #4
        Originally posted by zakrzep View Post
        Randy,

        Thanks a lot for your reply. That was the issue! I needed to download the sketch for board 2. I am using serial.
        Glad it helped!
        HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

        Comment


          #5
          I am still getting this error below when switching to my 1st board only. I also noticed the Analog devices are not showing at the bottom of the config screen for this board. I have A0 and A1 configured.

          Anyone have any idea?

          Jan-03 11:56:42 AM Arduino Plugin Error = Exception in BuildAnalogSetup : Object reference not set to an instance of an object.

          Jan-03 11:56:42 AM Arduino Plugin Selected Board No1

          Comment


            #6
            Originally posted by zakrzep View Post
            I am still getting this error below when switching to my 1st board only. I also noticed the Analog devices are not showing at the bottom of the config screen for this board. I have A0 and A1 configured.

            Anyone have any idea?

            Jan-03 11:56:42 AM Arduino Plugin Error = Exception in BuildAnalogSetup : Object reference not set to an instance of an object.

            Jan-03 11:56:42 AM Arduino Plugin Selected Board No1
            From the Arduino plug-in help:

            Although not used by most SD card libraries, A0 is connected to the SD slot's write protect (WP) pin and A1 is connected to the card detect switch. Both are pulled high by 10k resistors on the Ethernet shield. These pins therefore cannot be used for analog input with the shield unless they are bent back or clipped off before inserting the shield into the arduino. Additionally, if a user's circuit uses these pins for digital IO, the pullups may cause problems for existing circuitry.
            HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

            Comment


              #7
              Thanks for the response Randy, but this has been working fine and the readings are good on the two A0 and A1 devices I have configured for board 1. I get the error whenever I add or remove a analog device on it, so I think there is a config mismatch somewhere.

              I only have a screw terminal shield installed on both units and both are Mega 2560's. Not seeing this error on the 2nd board I have added and using the same A0 and A1 pins.

              Comment


                #8
                Originally posted by zakrzep View Post
                Thanks for the response Randy, but this has been working fine and the readings are good on the two A0 and A1 devices I have configured for board 1. I get the error whenever I add or remove a analog device on it, so I think there is a config mismatch somewhere.

                I only have a screw terminal shield installed on both units and both are Mega 2560's. Not seeing this error on the 2nd board I have added and using the same A0 and A1 pins.
                I forgot you were using USB connections. I would still recommend trying A2 and A3 just to be sure. Because I use Ethernet for my 4 Megas, I start at A2 for analog inputs.
                HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

                Comment


                  #9
                  Well, after deleting my 2 analog devices, the errors disappeared. I then re-added them as A2 and A3 to be safe and all is good. Thanks again Randy for your input!

                  Comment


                    #10
                    Greig,

                    I think I found the reason for the analog errors I was getting. I used the replace url to replace an analog device with another Onewire device. So when Homeseer deleted the old analog (Arduino) device, the errors started. I assume it didn't remove what it needed from the Arduino plugin config.

                    This is the URL I used for Homeseer http://192.168.0.xx:xx/repl

                    Errors Started

                    Jan-09 3:59:01 PM Arduino Plugin Error = Exception in RecievedAnalogue : Object variable or With block variable not set.
                    Jan-09 3:58:57 PM Arduino Plugin Error = Exception in BuildAnalogSetup : Object reference not set to an instance of an object.
                    Jan-09 3:58:57 PM Arduino Plugin Selected Board No1
                    Jan-09 3:58:56 PM Arduino Plugin Error = Exception in RecievedAnalogue : Object variable or With block variable not set.
                    Jan-09 3:58:51 PM Arduino Plugin Error = Exception in RecievedAnalogue : Object variable or With block variable not set.

                    Comment


                      #11
                      Yep that would to it. I don't think the Replace function works in HS3 and as the plugin stores the info in the device it would require the plugin to rebuild the device with the new data in it and this is not an option.

                      Greig.
                      Zwave = Z-Stick, 3xHSM100� 7xACT ZDM230, 1xEverspring SM103, 2xACT HomePro ZRP210.
                      X10 = CM12U, 2xAM12, 1xAW10, 1 x TM13U, 1xMS13, 2xHR10, 2xSS13
                      Other Hardware = ADI Ocelot + secu16, Global Cache GC100, RFXtrx433, 3 x Foscams.
                      Plugings = RFXcom, ActiveBackup, Applied Digital Ocelot, BLDeviceMatrix, BLGarbage, BLLAN, Current Cost, Global Cache GC100,HSTouch Android, HSTouch Server, HSTouch Server Unlimited, NetCAM, PowerTrigger, SageWebcamXP, SqueezeBox, X10 CM11A/CM12U.
                      Scripts =
                      Various

                      Comment

                      Working...
                      X