Announcement

Collapse
No announcement yet.

Homeseer and DCOM

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

    Homeseer and DCOM

    I'm taking my first cut at moving some of my Homeseer ASP pages over to the IIS server that I have running for my family web page. I got into DCOMCFG and... Shouldn't there be an entry somewhere for Homeseer.Application? I have all the hspi_*'s listed there, as well has HSPhone, and there is a Homeseer.Condition, but no Homeseer.Application. Am I missing something?

    Steve

    #2
    Homeseer.condition is used as well, depending on the version of HS. You can use that entry and it is probably the right one. If you are using any HSP commands, you'll need that set up, too. Do you know how to set up the DCOM items and the global.asa file in the IIS root? Sometimes the postings here are confusing. If you have any questions, email me and I'll outline how my system is set up.

    - Gordon

    "Security is EVERYONE'S business!"
    |
    | - Gordon

    "I'm a Man, but I can change, if I have to, I guess." - Man's Prayer, Possum Lodge, The Red Green Show
    HiddenGemStudio.com - MaineMusicians.org - CunninghamCreativeMaine.website

    Comment


      #3
      I can't disagree with Gordon because this seems to be a "gray area". When I started playing with Apache Servers and PHP I found that the only way to really make anything work was to use .Application, even if it didn't show in DCOM.

      There's a thread here that has some dialog on this. Search or look for PHP in the Web Interface threads. I was able to get thorough and relaiable "connections" using .Application. If you have problems, don't feel bad. Start with .Application and work through it. There's several items in the configuration that need to be properly set.
      For instance, mine is HomeSeer.clsString.
      In the General tab, set Authentication level to Default.
      Location: Run on this computer (unless from another...)
      Security: Use Custom - pick the ones you expect but nearly everyone. Default Launch permissions, Default Configuration permissions.
      Identity: The interactive User
      EndPoints: don't do anything.

      If you can't make it work with this configuration then you need to check how you are calling HomeSeer from your application. Also check DCOM to be sure there are no other overriding parms.

      regards,

      GenevaDude

      http://AutomatedHome.org http://genevadude.com http://GoldenBuffet.biz

      Comment


        #4
        Geneva, Gordon,
        Thanks guys. I'm just getting a start looking at this. Don't be surprised if either of you hear from me again. I've got more than a full-time job, so reality may prevent much further work for a while. Thanks for the words of encouragement.
        Steve

        Comment


          #5
          GenevaDude is right, it is gray, but this is working for me. Ok, little more detail:

          In DCOMCNFG settings you may see the HS item as Homeseer.condition, .application, or .clsString. In your application calls in code, however, you still want it to be homeseer.application.

          In my current version (1.6.119), it shows up in DCOM as HomeSeer.clsString. You may also need to change settings onthe hspi* stuff as well as hsphone.*.

          For IIS use, you need to add the IIS users on your local box - usually, IWAM_<machinename> and IUSR_<machinename> - to the permissions list of each HS item in DCOM. You can also add "Everyone". All should have Access permissions.

          In your IIS global.asa file, do something like:

          Before the SCRIPT portion:

          <pre class="ip-ubbcode-code-pre">&lt;OBJECT RUNAT="Server" SCOPE="Application" ID="hs" PROGID="HomeSeer.Application"&gt;&lt;/OBJECT&gt;
          &lt;OBJECT RUNAT="Server" SCOPE="Application" ID="hsp" PROGID="hsphone.Application"&gt;&lt;/OBJECT&gt;
          </pre>

          OR

          <pre class="ip-ubbcode-code-pre">Sub Session_OnStart ' in the _OnStart handler. Only one of these two
          Dim hs ' instantiation methods are required.
          Set hs = Server.CreateObject("HomeSeer.Application")
          Set Application("hs") = hs
          Dim hsp ' instantiation methods are required.
          Set hsp = Server.CreateObject("hsphone.Application")
          Set Application("hsp") = hsp
          End Sub
          </pre>

          within the SCRIPT portion of the file. I use both, just in case! ;-)

          Then in your ASP pages, use can use references like:

          <pre class="ip-ubbcode-code-pre">
          hs.SetDeviceString "z4","SAT2"
          hs.setdevicelastchange "z4", now
          hs.SetDeviceString "z5","SAT"
          hs.setdevicelastchange "z5", now
          strFRSource = hs.devicestring("z3")
          strMBRSource = hs.devicestring("z4")
          strSource = hs.devicestring("z5")
          </pre>

          Finally, once you have everything set, reboot the system and let everything start fresh. Start HomeSeer before trying to view an IIS ASP page, if you don't have HS starting automatically. Depending onthe global.asa settings, accessing a page that referrences HS will automatically start HS, but it takes too much time and the page will timeout.

          GenevaDude, how do you have your global.asa set up?

          - Gordon

          "Security is EVERYONE'S business!"
          |
          | - Gordon

          "I'm a Man, but I can change, if I have to, I guess." - Man's Prayer, Possum Lodge, The Red Green Show
          HiddenGemStudio.com - MaineMusicians.org - CunninghamCreativeMaine.website

          Comment


            #6
            Gordon, your write-up was a great help. I've made what I hope is alot of progress (I may later find out I was only 10% there, but...). I've got IIS so that is is at least trying to serve up my pages, and does recognize the hs object.

            I use Jeff Farmer's secure links (they're great). I was wondering if anyone else using IIS has done so as well. I seem to have various problems reading / writing to the Access database that the package uses. At first it was a permission problem, but after I fixed that (adding the two IIS users to the read/write access) I now have what seems to be a more random set of problems. Sometimes it will tell me that the database is already in use. Sometimes it comes back with an "unspecified problem".

            I'm sure this is something stupid, and I'm sure I'll have another problem once I clear this one. I'm stumped though, and any help that someone can give would be greatly appreciated.
            Steve

            Comment


              #7
              One problem we ran into at an old company I worked for trying to use Access behind a web page was that Access is not really multi-user. That is, if two people hit the web page at about the same time, the Access access can show the symptoms you mention. Perhaps moving it to SQL would work better.

              I tried Jeff's package but it didn't really fit what I wanted to do - I didn't even get as far as you have.

              - Gordon

              "Security is EVERYONE'S business!"
              |
              | - Gordon

              "I'm a Man, but I can change, if I have to, I guess." - Man's Prayer, Possum Lodge, The Red Green Show
              HiddenGemStudio.com - MaineMusicians.org - CunninghamCreativeMaine.website

              Comment

              Working...
              X