Announcement

Collapse
No announcement yet.

Variables not making it from HS to Ocelot

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

    Variables not making it from HS to Ocelot

    hey there... I seem to have run into some trouble... over the summer i upgraded my Homeseer from 2.2.0.66 to 2.3.0.19 due to some issues with the XAPmcs1wire.. and that fixed those..

    now that heating season is upon us I seem to be having some issues with Ocelot and getting variables down to it from HS... it seems some variables make it and others do not.. I can set and change relays all day on my SECU-16 with scripts or via the HS webpage...

    when i set variables they are active in the HS webpage but say I note variable 105 is at 130 on the HS webpage (and will be for a minute or more) and then I exit HS... open up my ocelot and use the debug timers and variables.. the variable in the ocelot will reflect the value that HS had it when HS was first started... seems the only time they all make it from HS to ocelot is when i first start up HS...

    I upgraded the plugin to the 1.4.10.0 version that others are using.. no joy..
    I tried upgrading to the latest homeseer no joy.. I deleted and re-added my variables(both through the ADIOCELOT interface and by just deleting in homeseer) and then it got worse i couldnt update any of them... however I can always set and read my relays accurately from the HS web page...

    I reverted back to my backup i had made this morning and am back to having some variables go through...
    PHP Code:
    10/8/2009 6:59:25 PM Unit Mappings1!11!]!0,7!11!^!0,
    10/8/2009 6:59:25 PM MSCOMM
    10
    /8/2009 6:59:25 PM MSCOMM
    10
    /8/2009 6:59:25 PM MSCOMM
    10
    /8/2009 6:59:26 PM Waiting for IO info from Ocelot
    10
    /8/2009 6:59:26 PM MSCOMM
    10
    /8/2009 6:59:26 PM MSCOMM
    10
    /8/2009 6:59:26 PM MSCOMM
    10
    /8/2009 6:59:26 PM MSCOMM
    10
    /8/2009 6:59:26 PM MSCOMM
    10
    /8/2009 6:59:26 PM MSCOMM
    10
    /8/2009 6:59:26 PM MSCOMM
    10
    /8/2009 6:59:26 PM MSCOMM
    10
    /8/2009 6:59:26 PM MSCOMM
    10
    /8/2009 6:59:26 PM MSCOMM
    10
    /8/2009 6:59:26 PM MSCOMM
    10
    /8/2009 6:59:26 PM MSCOMM
    10
    /8/2009 6:59:26 PM MSCOMM

    and then there is

    10
    /8/2009 6:59:26 PM MSCOMM
    10
    /8/2009 6:59:26 PM MSCOMM
    10
    /8/2009 6:59:26 PM 2A 0 0 8F A9 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 22 0 4A 0 40 0 49 0 38 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 FF FF 0 0 0 0 FF 0 
    10
    /8/2009 6:59:26 PM Setting Var: #8 to  34
    10/8/2009 6:59:26 PM Setting Var: #10 to  64
    10/8/2009 6:59:26 PM Setting Var: #11 to  73
    10/8/2009 6:59:26 PM Setting Var: #12 to  56
    10/8/2009 6:59:26 PM Setting Var: $17 to  0
    10
    /8/2009 6:59:26 PM Setting Var: $37 to  0
    10
    /8/2009 6:59:26 PM Setting Var: $38 to  0
    10
    /8/2009 6:59:26 PM Setting Var: $40 to  0
    10
    /8/2009 6:59:26 PM Setting Var: $41 to  0
    10
    /8/2009 6:59:26 PM Setting Var: $42 to  0
    10
    /8/2009 6:59:26 PM Setting Var: $50 to  0
    10
    /8/2009 6:59:26 PM Setting Var: $51 to  0
    10
    /8/2009 6:59:26 PM Setting Var: $52 to  0
    10
    /8/2009 6:59:26 PM Setting Var: $53 to  0
    10
    /8/2009 6:59:26 PM Setting Var: $55 to  0
    10
    /8/2009 6:59:26 PM Setting Var: $56 to  0
    10
    /8/2009 6:59:26 PM Waiting for IO info from Ocelot
    10
    /8/2009 6:59:26 PM MSCOMM
    10
    /8/2009 6:59:26 PM MSCOMM 
    any ideas?
    I have put in part of my ocelot.log file in case this is of any help...
    PerfecTemp - the Most advanced HVAC system I've ever Built - and its in my House

    #2
    The code segment that deals with commands from HS for the devices mapped to the 128 variables is below. In essence if HS commands ON or OFF then the variable will be set to 1 or 0 respectively. If a value change is commanded then the variable will be assigned the value. If you are doing things that set both the device status and device value then you likely will not get the result that you expect.

    Code:
                  ' must be a variable
    70                If command = UON Then
    80                    cmd = 1
    90                    brightness = 1
    100                   command = VALUE_SET
    110               ElseIf command = UOFF Then
    120                   cmd = 0
    130                   brightness = 0
    140                   command = VALUE_SET
    150               End If
    160               If command = VALUE_SET Then
    170                   If hci = gBaseVars Then
                             ' Case gBaseVars      ' vars 0->63
    180                           QExec dv, Str(gBaseVars), Str(devicecode - 1), VALUE_SET, brightness, data1, data2
    190                   Else
                             ' Case gBaseVars + 1  ' vars 64-127
    200                           QExec dv, Str(gBaseVars + 1), Str((devicecode - 1) + 64), VALUE_SET, brightness, data1, data2
    210                   End If
                          'End Select
    220               End If

    Comment


      #3
      for years I have always just sent values to my Ocelot and never used a status change... so for instance here is a set of code that works... I set a variable to 100 and at the other end of the ocelot I read it as an "on" and if i set a variable to 0 my ocelot code reads it as an "off" however I never change the status of the device in Homeseer....
      could that be my problem that my device "statuses" have somehow come out of whack and so values are not being passed? I see the Homeseer screen updated with the correct values so I know my program is setting them...

      below is simple code that sets a value to 100 if a condition is true... and this WORKS and the value gets to the Ocelot every time..
      Code:
          If heatpumpenable = True Then           ' heat pumps are enabled
              If hs.DeviceValue("$50") = 0 Then   'tell ocelot to disable the gas heat
                  hs.SetDeviceValue "$50", 100
              End If
              
          Else                                        'heat pumps are disabled
              If hs.DeviceValue("$50") = 100 Then     'tell ocelot to enable gas heat
                  hs.SetDeviceValue "$50", 0
              End If
          End If
      Now below is some code that has worked for the past 3 years or more and now this has quit working..it is heating only so I dont know when it quit...sometime between the last time I heated and a few days ago. my guess is back in the summer when I upgraded to 2.3.0.19..

      Code:
          If CInt(hs.DeviceValue("$42")) <> CInt(currentleavingairtemp) Then  'send supply air temp to ocelot
              hs.SetDeviceValue "$42", CInt(currentleavingairtemp)
          End If
      If CInt(hs.DeviceValue("r2")) <> CInt(currentleavingairtemp) Then       'update friendly var with LAT
          hs.SetDeviceValue "r2", CInt(currentleavingairtemp)
      End If
      
      If CInt(hs.DeviceValue("$37")) <> CInt(newleavingairset) Then           'send heat on / off setpoints to ocelot
          hs.SetDeviceValue "$37", CInt(newleavingairset)
      End If
      If CInt(hs.DeviceValue("$38")) <> CInt(newleavingairset) Then
          hs.SetDeviceValue "$38", CInt(newleavingairset)
      End If
      now that code does not work except for ONCE during start up... if say I first start up homeseer.. and I set $42 to say 125.... ill of course see it in the HS status screen... I then set it to say 115 a few seconds or a minute etc later... then I shutdown homeseer open CMAX... my debug vars will have it as 125.... so it gets sent once..... and that code above has not changed in years...

      is there a debug version of the plugin that will log all comms or attempted comms to the Ocelot? this is pretty serious since it affects my heating system......
      -Christopher
      PerfecTemp - the Most advanced HVAC system I've ever Built - and its in my House

      Comment


        #4
        tried some more things and still no good...
        I went into adiocelot config and deleted all the variables by unchecking the booxes... it left var 0 and var 127 in HS so I deleted those... disabled the plugin... shutdown homesseer.. removed section from settings.ini relating to adiocelt... went into regedit and removed all references and keys related to ocelot... deleted the adiocelot file from HS directory... restarted hs.. went to updater reinstalled.. re-made the variables and still.. like before some get there some dont...

        just not sure what to do and I need to get this working....

        yesterday i even tried the other plugin with same results.... what are my options here?
        -Christopher
        PerfecTemp - the Most advanced HVAC system I've ever Built - and its in my House

        Comment


          #5
          I'm guessing, but consider the following:

          Every two seconds or whatever your variables polling rate is, the plugin gets the variables from the ocelot and compares with the prior iteration values. It issues a ValueChangeEvent to HS for any changes.

          For the case of ADIOcelot, and I suspect not for the Applied Digital Ocelot, prior to sending a ValueChangeEvent the plugin looks for zero vs non-zero value of the variable and sets the DeviceStatus accordingly.

          HS should act upon this ValueChange event to update the HS Device associated with the variable.

          I could place debug code at the point where the ValueChangeEvent is being called and this would confirm that the Ocelot is sending the variables correctly. Since there has not been any changes with the Ocelot or with the two plugins, it seems the place to first look is how HS handles the ValueChangeEvent.

          Comment


            #6
            my guess is it is something in Homeseer... I only say that because this worked last winter and spring for heating season... then in about july I upgraded to HS 2.3.0.19 from 2.2.0.66.. I think there was something with my Xap1wire that when I put the new version in required me to upgrade... and of course i never checked the Ocelot... the only thing the Ocelot is used for is my Economizer for outside air intake and for the heating system..

            I travelled all summer and of course didnt run the heat so i never noted the issue...

            if you could get me some debug code that would be great... I really need to figure out if im going to need t owrite my own Ocelot control, build my own micro controller, or get this fixed.. fortunately im upgrading to Heatpumps in my house so I have a little time before I need the gas heat... but if the temp outside is less than 35 its more cost efiective to run the 95% efficient gas furnace instead of the heatpumps... and in ohio that means only a couple weeks...
            ** oh I should add that I also had tried the other Ocelot plugin with no luck... it appears the variables are not getting to the ocelot in the first place... since the way my heating program works it sends a setpoint value through as wel las a temperature reading from HS to the ocelot... if the variables were getting To the Ocelot then the furnace would operate against the temperature and variable setpoint sent to it... however the furnace kicks on and stays on which says to me its not getting the setpoint or the temperature... and I can read the ocelot and note that it is not getting both using CMAX debug variables and timers....


            -Christopher
            Last edited by cadillackid; October 9, 2009, 10:37 PM.
            PerfecTemp - the Most advanced HVAC system I've ever Built - and its in my House

            Comment


              #7
              The HS log will contain each command set from HS and each time the ValueChange event is raised to HS. You also have the comm log that has information related to the communication between the ocelot and plugin.

              The other thing you need to be sensitive to is the Interface name of the plugin as it needs to be ADIOcelot and this will be stored in the .Interface property of the devices. The HST Ocelot plugin has Applied Digital Ocelot stored in the .Interface propery. You can use InterfaceManager from a sticky at the top of the ADIOcelot thread to see what your devices are. There should also be an option on the ADIOcelot to select the .Interface name you want to use. With HS 1 the .Interface property can be the same between plugins, but not the case for HS 2.
              Attached Files

              Comment


                #8
                the diagnostic program you sent works really well... it showed me exactly what was happening...

                turns out that when I wrote some code into my system to handle the new HVAC units and moved all the dampers from my RCS to my Ocelot i got sloppy with my code and caused the issue to occur...

                so what was happening was i was setting devicevalues regardless of what they already were... take this for instance:

                Code:
                if zone1run=true then                     'zone 1 is calling
                     hs.setdevicevalue "$45",0      'open master return
                     hs.setdevicevalue "$46,0       ' open master supply
                else
                .........
                end if
                and that routine executes every 2 seconds...
                and there were other routines similar that I had gotten away with previously.. but clearly I was overloading the "buffer" of changes to go t othe ocelot for my polling time.. my Ocelot polling time at 2 seconds and homeseer trying to send many variables caused the issue.. so now I test to see if the variable has changed before i issue the setdevicevalue.. homeseer was handling it Ok but my guess is that there is a limit to how much data you can fire off to the ocelot at once... and some was getting lost.. things are running MUCH smoother now..
                -Christopher
                PerfecTemp - the Most advanced HVAC system I've ever Built - and its in my House

                Comment

                Working...
                X