Announcement

Collapse
No announcement yet.

HS3 Plugin Samples

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

  • dcorsus
    replied
    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

    Leave a comment:


  • tonlof
    replied
    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.

    Leave a comment:


  • spud
    replied
    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

    Leave a comment:


  • tonlof
    replied
    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

    Leave a comment:


  • tonlof
    replied
    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.

    Leave a comment:


  • dcorsus
    replied
    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

    Leave a comment:


  • tonlof
    replied
    Originally posted by rjh View Post
    I updated the samples, download using the link in the first post.
    Thanks, I take a look.

    Leave a comment:


  • tonlof
    replied
    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

    Leave a comment:


  • rjh
    replied
    I updated the samples, download using the link in the first post.

    Leave a comment:


  • vasrc
    replied
    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

    Leave a comment:


  • dcorsus
    replied
    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

    Leave a comment:


  • tonlof
    replied
    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

    Leave a comment:


  • dcorsus
    replied
    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

    Leave a comment:


  • tonlof
    replied
    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

    Leave a comment:


  • WiseSeer
    replied
    Got it, thanks.

    Leave a comment:

Working...
X