Announcement

Collapse
No announcement yet.

HS3 Plugin Samples

Collapse
This is a sticky topic.
X
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Originally posted by tonlof View Post
    I have some problem to get SAMPLE & SAMPLE_BASIC to work. I have not done any changes in the code yet.

    Using Visiual Studio Express 2012

    HSPI_SAMPLE (Can't build, 102 errors)

    HSPI_SAMPLE_BASICMI (Works Perfect) I have made my own plugin with this, but don't want multiple instances.

    HSPI_SAMPLE_BASIC (Build is working but I got error when activate the plugin, see error below)

    Initializing plug-in(2): Sample-Basic Instance::Conversion from string "COM1" to type 'Long' is not valid.0STACK:Server stack trace: Exception rethrown at [0]: at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessag e(IMessage reqMsg, IMessage retMsg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(Mess ageData& msgData, Int32 type) at HomeSeerAPI.IPlugInAPI.InitIO(String port) at Scheduler.clsHSPI.CheckInterfaces()

    Thanks
    I think you don't have the latest version of the sample code. In HS3 version 13 (or so) the comport was changed from string to integer and I believe the sample code went from v3 to v5 (or something like that).

    Dirk

    Comment


    • #17
      Thanks for your quick reply, I download it from the first post in this thread.

      Originally posted by dcorsus View Post
      I think you don't have the latest version of the sample code. In HS3 version 13 (or so) the comport was changed from string to integer and I believe the sample code went from v3 to v5 (or something like that).

      Dirk
      Please excuse any spelling and grammatical errors I may make.
      --
      Tasker Plugin / Speech Droid
      Tonlof | Sweden

      Comment


      • #18
        Originally posted by tonlof View Post
        Thanks for your quick reply, I download it from the first post in this thread.
        So it is OK now or you had these errors with the downloaded code? If you have these errors with the latest code, I'm not familiar with error 102 but you have to check all the references and make sure they are still properly pointing to the right dlls, coms etc in the right directories. If the basic-sample PI is giving you the com port error, just look at Init_IO of the other version, look at how the procedure definition was changed from string to integer and do the same, save it and you should be fine.
        Dirk

        Comment


        • #19
          If you show 102 errors it means you haven't referenced the HS libraries (Scheduler, HomeSeerAPI, HSCF) yet.
          Make sure you point at them on your References page

          Comment


          • #20
            I updated the samples, download using the link in the first post.
            website | buy now | support | youtube

            Comment


            • #21
              Originally posted by vasrc View Post
              If you show 102 errors it means you haven't referenced the HS libraries (Scheduler, HomeSeerAPI, HSCF) yet.
              Make sure you point at them on your References page
              I forgot to clarify in the first post that I have already added the HS3 references.
              Attached Files
              Please excuse any spelling and grammatical errors I may make.
              --
              Tasker Plugin / Speech Droid
              Tonlof | Sweden

              Comment


              • #22
                Originally posted by rjh View Post
                I updated the samples, download using the link in the first post.
                Thanks, I take a look.
                Please excuse any spelling and grammatical errors I may make.
                --
                Tasker Plugin / Speech Droid
                Tonlof | Sweden

                Comment


                • #23
                  Originally posted by tonlof View Post
                  I forgot to clarify in the first post that I have already added the HS3 references.
                  Just to double check, the reference are probably there as part of the files delivered by Rich. They need to point to the right directories on your development PC. I usually need to fix them by deleting them and adding them (pointing to my HS3 subdirectory).

                  Dirk

                  Comment


                  • #24
                    Originally posted by dcorsus View Post
                    Just to double check, the reference are probably there as part of the files delivered by Rich. They need to point to the right directories on your development PC. I usually need to fix them by deleting them and adding them (pointing to my HS3 subdirectory).

                    Dirk
                    Thanks, Yes I notice that on the new files.

                    SAMPLE_BASIC are also working now.

                    SAMPLE still give me 2 errors.

                    Error 4 'WriteHTMLImage' is not a member of 'HomeSeerAPI.IHSApplication'. C:\utveckling\hs3\HSPI_SAMPLE\hspi.vb 2091 9 HSPI_SAMPLE
                    Error 5 'WriteHTMLImageFile' is not a member of 'HomeSeerAPI.IHSApplication'. C:\utveckling\hs3\HSPI_SAMPLE\hspi.vb 2098 13 HSPI_SAMPLE

                    If I remove the hs.WriteHTMLImageFile & hs.WriteHTMLImage it's possible to build the project.
                    Please excuse any spelling and grammatical errors I may make.
                    --
                    Tasker Plugin / Speech Droid
                    Tonlof | Sweden

                    Comment


                    • #25
                      I have got SAMPLE_BASIC work but there is some features that I am interested in HSPI_SAMPLE in the zip.
                      HSPI_SAMPLE build Okey but got error when I trying to activate the plugin.

                      Are I'm doing anything wrong?
                      Thanks
                      Attached Files
                      Please excuse any spelling and grammatical errors I may make.
                      --
                      Tasker Plugin / Speech Droid
                      Tonlof | Sweden

                      Comment


                      • #26
                        Originally posted by tonlof View Post
                        I have got SAMPLE_BASIC work but there is some features that I am interested in HSPI_SAMPLE in the zip.
                        HSPI_SAMPLE build Okey but got error when I trying to activate the plugin.

                        Are I'm doing anything wrong?
                        Thanks
                        I got this same error using another sample.
                        switching the build from "Any CPU" to "x86" fixed the problem for me

                        Comment


                        • #27
                          Originally posted by spud View Post
                          I got this same error using another sample.
                          switching the build from "Any CPU" to "x86" fixed the problem for me
                          Thank you Spud for the tip, in this case it didn't solve the problem.
                          Please excuse any spelling and grammatical errors I may make.
                          --
                          Tasker Plugin / Speech Droid
                          Tonlof | Sweden

                          Comment


                          • #28
                            Originally posted by tonlof View Post
                            I have got SAMPLE_BASIC work but there is some features that I am interested in HSPI_SAMPLE in the zip.
                            HSPI_SAMPLE build Okey but got error when I trying to activate the plugin.

                            Are I'm doing anything wrong?
                            Thanks
                            In the references section, do you have the Reference "HomeSeerAPI" pointing to the right file, ie the HS3 file? Is the target framework set to .NET 4?

                            Dirk

                            Comment


                            • #29
                              Originally posted by dcorsus View Post
                              In the references section, do you have the Reference "HomeSeerAPI" pointing to the right file, ie the HS3 file? Is the target framework set to .NET 4?

                              Dirk
                              Hi Dirk, Yes on both. I have no problem with the other samples in the zipfile. Only HSPI_SAMPLE
                              Please excuse any spelling and grammatical errors I may make.
                              --
                              Tasker Plugin / Speech Droid
                              Tonlof | Sweden

                              Comment


                              • #30
                                Originally posted by tonlof View Post
                                Hi Dirk, Yes on both. I have no problem with the other samples in the zipfile. Only HSPI_SAMPLE
                                Have you tried to run it in Studio itself? Does the source code debugger show you where it goes wrong?

                                Dirk

                                Comment

                                Working...
                                X