Announcement

Collapse
No announcement yet.

Getting started with XAP for 1-wire

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

    Getting started with XAP for 1-wire

    I'm using the Hobby Boards Master Hub for 1-wire. Since this hub isn't supported by mcstemp, I have a need for xap for integration with HomeSeer.

    So far, I have

    1) xapmcsHub running as a service
    2) xapmcs1Wire running as a service
    3) mcsXAPplugin installed, ocx registered and using xAP port 32768 and 32770 for mcs.OneWire

    And now, I've gotten myself stuck.

    When trying to configure xapmcs1wire, I'm finding in Task Manager that the process is toggling back and forth between "running" and "not responding" at 5 second intervals. I can see that the 1wire setup has the correct comm port for the Hobby Boards hub, but I can't change any other items.

    In xapmcsHub traffic, I can see the 1-wire port established, but it's delivering a message...OneWireException: 1-Wire Net not available.

    So, a few questions.

    Am I generally on the right track with the components I need to install to get started (the xapFramework.net site is down)?

    If I do have the right components, is this "running-not responding-running " back and forth behavior normal?

    What's the next step to getting the 1-Wire Net available to the mcsHub?


    Thank you.

    #2
    You are likely running XP and have not yet installed the Microsoft Java Virtual Machine (MS JAVA VM). A recent link about it is at http://board.homeseer.com/showthread...highlight=java

    If you trialed mcsTemperture and selected the DS9097U as the interface then the 1-wire drivers should have been downloaded and installed. These are independent of the Java VM. The package downloaded by mcsTemperature is at ftp://ftp.dalsemi.com/pub/auto_id/li...ers_v400b4.msi

    I have never run any of my applications as a service. I simply put them in my startup folder. Each will place an icon in the tray and I believe that services cannot put items in a specific user's tray.

    For diagnostic purposes you will want to download the GUI xAP Viewer from xAPFramework.net. I believe the link is http://www.xapframework.net/modules....tit&lid=83
    You will get a more easily viewed and used set of message data than can be seen in the little window provided by xapmcsHub. Other than for diagnostics the viewer will not normally be run.

    The not responding toggle is likely due to the missing VM/Drivers. The software is waiting for the interface to respond and during this time the application will likely not respond to Task Manager.

    Comment


      #3
      I do have Microsoft Java VM installed. I used this link
      http://inetexplorer.mvps.org/answers/14.html
      downloaded the old version, applied the Windows update, and confirmed with jview in DOS.

      Yes, I trialed and purchased mcs temp and have the 1-wire drivers installed. I am able to view the temp and humidity sensors connected to the hub through the OneWireViewer app.

      I saw your post about the GUI message viewer, but I am unable to download it since the xapFramework.net site is down and has been all morning. I wasn't able to find an alternate site for the download. Might you know of one?

      I must still have something else wrong causing the running/not responding toggle since I have MS Java VM and the 1-wire drivers.

      Comment


        #4
        Looks like you have done your homework with setting up for 1-wire.

        The not available message will have a line number where the error occurs, but I'm guessing it is when the adapter attempts to gain access to the drivers. The drivers are reporting back that they cannot gain access. My experiences have had two additional reasons for this. One is that an 1-wire application was aborted so did not gracefully give up access to the 1-wire network. The other is that another 1-wire application was also open (e.g. 1-wire viewer) and it had control. The only solution to the first of these two is a restart of the computer to reset the driver.

        When I posted the link to the xapFramework.net viewer I was able to access it earlier this morning. I also posted the xAP writelog application I use in the thread http://board.homeseer.com/showthread...=101056&page=4
        This will look for the equivalent of messages to the HS log and display them in a GUI window and store them in a database for queries. It is another debugging tool useful for the mcs xAP applications.

        Comment


          #5
          Followup

          By some minor miracle, I did manage to get all of this working. To be sure I didn't have any other program with a grip on the one-wire drivers, I wiped out all my previous attempts and started fresh. Once I got all the html files in all the right places, I was able to see the traffic and get devices created and updated in HomeSeer/MainLobby.

          As I get more time to understand this stuff, I imagine I'll have quite a few usage questions. But for now, it feels good to just get out of the gate with xAP.

          Thanks for your help.

          Comment


            #6
            Well that is good to hear. I'm running my 1-wire and charts directly into Main Lobby via xAP. When I do have ML running my usual background page is the attached one where each of 8 different charts are cycled on 10 second intervals. I can also stop the cycle by selecting a specific chart and then the display works like the mcsTemperarature display where the single chart updates when new data is collected. It then kind of looks like a walking display as the time axis shifts to show the most current window.
            Attached Files

            Comment


              #7
              Well, that's quite inspirational.

              Any chance you're using WebLobby to get the graphs in ML? I'm suspecting no, since you said "I'm running my 1-wire and charts directly into MainLobby via xAP."

              Comment


                #8
                It might be possible, but would be rather convoluted. mcsTemperature does produce a .jpg file that could be drawn on the ML page, but your problem will be with getting ML to tell mcsTemperature which chart you want to draw. You could also put the entire mcsTemperature display in a WebLobby window, but the UI for chart selection uses pulldowns and those don't work very well with a touchscreen, nor would it fit in with the remainder of your ML design.

                If you want to try it with Krumpy's plugin then I think the approach would be to define an event for each chart of interest. With 8 styles and 6 periods this would be 48 events. It may also be possible to use ML Server variables to remember information so you could reduce your event count. Within HS you would then provide a HTTP request (i.e. hs.GetURLIE) to mcsTemperature with the querystring parameters encoded with the chart group name, chart style, and chart period. The jpg file will be deposited on the HS Server and this will be file path you use in your ML design for the chart graphic button.

                You could also emulate my Cycle function with HS events that run some scripting to provide the desired requests to mcsTemperature at the desired intervals.

                Comment


                  #9
                  xAP to mcsTemperature Startup Guide

                  You have probably got beyond this level of xAP startup, but I did post a guide that shows how to go from a xAP node collecting data to charting it in mcsTemperature. It is at http://board.homeseer.com/showthread...d=1#post695272

                  Comment

                  Working...
                  X