Announcement

Collapse
No announcement yet.

Variable setting Script works intermittently

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

    Variable setting Script works intermittently

    I am running version 1.033 of the Ocelot plugin with version 1.7.07 of HS. I have been running a script and events which set variables in the Ocelot to temperatures read from HAI thermostats. HS gets the temperature data and stores it in a device. The last script in the chain stores the value of that device to an Ocelot variable. The problem script reads as follows:

    sub main()
    Dim UpstrTemp
    Dim IntTemp
    Dim StrUpstrTemp

    IntTemp = 111
    'UpstrTemp = hs.Getvar("TempUpstr")
    UpstrTemp = hs.DeviceValue("t2")

    IntTemp = Cint(UpstrTemp)
    StrUpstrTemp = Cstr(IntTemp)
    cpuxa.SetVarLong 104,UpstrTemp

    hs.writelog "Info","Ocelot Upstrs temp changed to " + StrUpstrTemp

    end sub

    This script works to set the Ocelot variable about one out of twenty times it is run. Last night's HS log showed that it worked at 3:38 A.M. to set the temperature to 75, but recored no other changes. The HS device recorded all changes. Anyone have any ideas? I saw nothing in the Ocelot log to indicate the script ever ran, but then I may not know what to look for.

    #2
    Well, no one seems to have had a suggestion, but I think the problem may be different from what I thought. It seems that the script is actually working, but HS is not properly displaying these variables. Has anyone else had problems with version 1.033 of the HS plugin? Is ADIOcelot more or less reliable?

    Comment


      #3
      I've got a similar problem, but mine seems related to moving from 1.6.212 to 1.7.7 of Homeseer itself. I have tried both 1.0.32 and 1.0.33 of the Ocelot plug-in and am getting loads of "Timeout getting reatime I/O". I am thinking of falling back to 1.6.212 and seeing if the problem goes away again.

      Steve

      Comment


        #4
        Never mind. Moving up to 1.7.7 caused Homeseer to somehow pick up the old (pre-McSharry) Ocelot plug-in, so I had two plug-ins trying to access the Ocelot. Removal (re-removal) of the older plug-in and restarting caused the problem to go away.

        Steve

        Comment


          #5
          I just changed over to the ADIOcelot plugin and the problem is solved. It is also much simpler just to script with hs.SetDeviceValue. No need to convert variables or use an object outside HS.

          When I started the conversion this morning, I also had an issue with the duplicate plugins. The documentation does not mention this, but I found that I needed to manually remove the old plugin or there was trouble.

          Comment

          Working...
          X