Announcement

Collapse
No announcement yet.

Cannot create API.ino

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

  • Cannot create API.ino

    Hi,

    I just updated the arduino plugin to version 1.0.0.115, using a RaspberryPi as controller. If I want to download the new API.ino then I get an error message:
    ---
    Creating and Downloading API.ino for board no:2
    Error = Error finding line = IPAddress subnet
    ---
    My version of the API.ino is V1.0.0.81 but would like to update to V1.0.0.112.

    Any idea what I am doing wrong?
    Regards,
    Cor

    Some info

    HomeSeer Version: HS3 ZEE S2 Edition 3.0.0.280
    Linux version: Linux RPiZwave 4.1.13-v7+ #826 SMP PREEMPT Fri Nov 13
    IP Address: 192.168.2.82
    Number of Devices: 195
    Number of Events: 103
    Available Threads: 399

    Enabled Plug-Ins
    1.0.0.115: Arduino Plugin
    3.0.0.4: CM15A
    3.0.0.103: HSTouch Server
    3.0.1.83: Z-Wave

  • #2
    Originally posted by Cor View Post
    Hi,

    I just updated the arduino plugin to version 1.0.0.115, using a RaspberryPi as controller. If I want to download the new API.ino then I get an error message:
    ---
    Creating and Downloading API.ino for board no:2
    Error = Error finding line = IPAddress subnet
    ---
    My version of the API.ino is V1.0.0.81 but would like to update to V1.0.0.112.

    Any idea what I am doing wrong?
    Regards,
    Cor

    Some info

    HomeSeer Version: HS3 ZEE S2 Edition 3.0.0.280
    Linux version: Linux RPiZwave 4.1.13-v7+ #826 SMP PREEMPT Fri Nov 13
    IP Address: 192.168.2.82
    Number of Devices: 195
    Number of Events: 103
    Available Threads: 399

    Enabled Plug-Ins
    1.0.0.115: Arduino Plugin
    3.0.0.4: CM15A
    3.0.0.103: HSTouch Server
    3.0.1.83: Z-Wave
    The new version has entries for your gateway address and subnet. These should be automatically populated. If they are not, you need to enter them yourself. This was done to improve Ethernet connection reliability. Are those two items on the config page filled with the correct data? They are just to the right of IP address and port number.
    Randy Prade
    Aurora, CO
    Prades.net

    PHLocation - Pushover - EasyTrigger - UltraECM3 - Ultra1Wire3 - Arduino

    Comment


    • #3
      Yes Sorry about that it looks like the API.ino has not updated with this fields.
      I am at work but if you want under HomeSeer HS3\Config\Arduino Config\ you will fine the API.ino. Copy this file somewhere then open it and all the following lines after the line with IPAddress ServerIP in it.

      So you should end up with:

      IPAddress ServerIP(EEPROM.read(2), EEPROM.read(3), EEPROM.read(4), EEPROM.read(5));
      IPAddress gateway(192,168,0,1);
      IPAddress subnet(255,255,255,0);

      byte EEpromVersion = EEPROM.read(250);
      #endif

      Then save it and copy it back over the on in the Homeseer Arduino Config. Then try and download again and see how it goes.

      I will try and get this fixed asap.

      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


      • #4
        Hi Greig,

        thanks a lot for your quick reply. I did as you suggested and now I end up with this error:
        Error = Error finding line = const unsigned int localPort

        In the API.ino file it looks now like:

        #if ISIP == 1
        // Enter a MAC address and IP address for your board below.
        byte mac[] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED};

        const unsigned int localPort = 9000; //port entered in HS config.
        IPAddress HomeseerIP(192,168,0,123); //Homeseer IP address
        // The IP address will be dependent on your local network.

        IPAddress ServerIP(EEPROM.read(2), EEPROM.read(3), EEPROM.read(4), EEPROM.read(5));
        IPAddress gateway(192,168,0,1);
        IPAddress subnet(255,255,255,0);

        byte EEpromVersion = EEPROM.read(250);
        #endif

        Did I do something wrong here?Cor

        Comment


        • #5
          Originally posted by Cor View Post
          Hi Greig,

          thanks a lot for your quick reply. I did as you suggested and now I end up with this error:
          Error = Error finding line = const unsigned int localPort

          In the API.ino file it looks now like:

          #if ISIP == 1
          // Enter a MAC address and IP address for your board below.
          byte mac[] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED};

          const unsigned int localPort = 9000; //port entered in HS config.
          IPAddress HomeseerIP(192,168,0,123); //Homeseer IP address
          // The IP address will be dependent on your local network.

          IPAddress ServerIP(EEPROM.read(2), EEPROM.read(3), EEPROM.read(4), EEPROM.read(5));
          IPAddress gateway(192,168,0,1);
          IPAddress subnet(255,255,255,0);

          byte EEpromVersion = EEPROM.read(250);
          #endif

          Did I do something wrong here?Cor
          Things have to be in the correct order. I will have a look tomorrow if I can. Try the following and see if it works.


          //Address of the board.
          const byte BoardAdd = 1;


          #include <Ethernet.h>
          #include <EthernetUdp.h>

          #if ISIP == 1
          byte mac[] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED};
          IPAddress ip(192,168,0,100); //IP entered in HS config.
          const unsigned int localPort = 9000; //port entered in HS config.
          IPAddress HomeseerIP(192,168,0,123); //Homeseer IP address
          IPAddress ServerIP(EEPROM.read(2),EEPROM.read(3),EEPROM.read(4),EEPROM .read(5));
          IPAddress gateway(192,168,0,1);
          IPAddress subnet(255,255,255,0);
          byte EEpromVersion = EEPROM.read(250);
          #endif

          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


          • #6
            Hi Greig,

            Thanks for this solution. It works now, I can download the sketch!

            Regards,
            Cor

            Comment


            • #7
              Hi Greig,

              one remark I would like to make has to do with the version number. In the Arduino Plugin Config page it is stated that the Available Sketch Version = V1.0.0.112.
              After download of the sketch file is says version V1.0.0.81 in the file.
              Probably no big deal.

              Regards,
              Cor

              Comment


              • #8
                Originally posted by Cor View Post
                Hi Greig,

                one remark I would like to make has to do with the version number. In the Arduino Plugin Config page it is stated that the Available Sketch Version = V1.0.0.112.
                After download of the sketch file is says version V1.0.0.81 in the file.
                Probably no big deal.

                Regards,
                Cor
                Yes as I said the API has not been updated so I need to look in to this. I also need to put the API version in the configuration page to as this can be different from the standard sketch.

                Sent from my SM-G925F using Tapatalk
                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


                • #9
                  FYI V.116 is in the updater but this is not fixed in that version as it was there to fix other problems. I will get this done and in the next version asap.

                  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


                  • #10
                    Fixed in V.117

                    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


                    • #11
                      thanks for all your trouble. I installed plugin version 117. When I now got to the arduino plugin config page then I do not see the normal setup page of the boards with the different API buttons. There is a repeated error:
                      Error = Exception in BuildBoardSetupTab : Operator '=' is not defined for type 'Empty' and type 'Int32'.
                      I have 4 boards, only for the first board I see the config page, but not complete though.
                      If I select board 2, 3 or 4, I get a never ending message: Building Board Nr:2 Setup. Please Wait....
                      I can only leave this with the browsers back button.
                      Also the downloaded sketch of board nr:1 looks very different. I cannot see where to put my own code. The version line says:
                      char* Version = "1.0.0.117"; so without the word API.

                      I hope you can say where I am doing something wrong.
                      Regards, Cor

                      Comment


                      • #12
                        Cor
                        I have made changes to support a new board type but it sounds like something is broken on the setup tab. Can you send me the file that was downloaded for the API.ino. There should be a box with the option of Arduino and Arduino API as board type.
                        Can you send me a debug log of you going in to the page where it stops and also some screen shots of the configuration page so I can work out what is going on.

                        Thanks

                        Greig.

                        Sent from my SM-G925F using Tapatalk
                        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


                        • #13
                          Hi Greig,

                          Here is the documentation you asked for:
                          1 - The downloaded sketch HomeseerBoard1.ino,
                          2 - the debug file and the
                          3 - screendumps.
                          Hope this helps.

                          I changed the extension of the ino file to txt. The ino file was not accepted as an attachment, so it looks to me.
                          Please do not hesitate to ask if you need more information.

                          BTW I use Arduino IDE V1.6.8.

                          Info of HomeSeer:
                          Current Date/Time: 7/25/2016 9:43:11 AM
                          HomeSeer Version: HS3 ZEE S2 Edition 3.0.0.280
                          Linux version: Linux RPiZwave 4.1.13-v7+ #826 SMP PREEMPT Fri Nov 13 20:19:03 GMT 2015 armv7l GNU/Linux System Uptime: 0 Days 20 Hours 22 Minutes 36 Seconds
                          IP Address: 192.168.2.82
                          Number of Devices: 195
                          Number of Events: 106
                          Available Threads: 399

                          Enabled Plug-Ins
                          1.0.0.117: Arduino Plugin
                          3.0.0.4: CM15A
                          3.0.0.103: HSTouch Server
                          3.0.1.83: Z-Wave

                          Regards, Cor
                          Attached Files

                          Comment


                          • #14
                            Hi Greig,

                            concerning the debug file I send before: the plugin is still using the 'old' sketch file, based on version V1.0.0.81.

                            regards, Cor

                            Comment


                            • #15
                              The download problem is solved in version 118. Thanks you Greig for solving this.
                              Cor

                              Comment

                              Working...
                              X