No announcement yet.

Setup problem - Ocelot Var as Sensor

  • Filter
  • Time
  • Show
Clear All
new posts

    Setup problem - Ocelot Var as Sensor

    I searched a bit for an answer but came up empty . . .

    I'm trying to get mcsTemp setup using ocelot variables for the data input . . .

    on the Interface/Main tab I have checked the 'Transer mapped virtual device . . .'

    on the Analog1 tab I have entered the Device codes for the ocelot variables and a database field name . . .

    but as far as I can tell no data ever makes it to the database . . .

    Any ideas what I'm missing ??

    Pete C

    I suspect you are seeing the effect of ocelot device strings not being populated. The ocelot plugins only deal with deviceStatus and deviceValue properties. mcsTemperature is expecting data in device strings so that values such as 1.23 can be recorded.

    I added a check in mcsTemp for empty device strings and in that case get the data from the deviceValue. I'm posting it here since it also has the experimental web access for forecast data that I did for Jari.
    Last edited by Michael McSharry; November 18, 2004, 12:06 PM. Reason: Looks like attachment limits are at 400K, so will need to wait until size limits increased


      I was tinkering with that idea, and wrote a script to have the device string set to device value for a few of the Oceot vars . . . but no go . . .

      also noticed that although some of the forecast virtual devices are getting updated (not all of them??) and these don't show on the Forecast.asp either ? ? ?

      any more ideas ???


      Pete C


        Are your database tables being created and no data written or is data with zero values being written? The forecast tab has 6 devices that are used for some of the Forecast display page. Are these set and are these the fields that are not being updated? Data is updated only when the values change so the last change date will be different even though a new set of forecast data has been downloaded.

        You are welcome to email your mcsTemperature.ini and mcsForecast.ini as well as your database if you desire.


          ok, but now . . .

          thanks for the help Mike . . . should have remembered db_field_names need to start with alpha chars . . .

          . . . but now I can't figure out how to get an Ocelot Var to work as a discrete . . . ie: I'd like to show zone pump status (5 of them on Secu16 relays) along with zone temp, but again I don't see the data ending up in the db ? ? ?

          Pete C

          ps. figure you need to see my conf files again . . . sending via email


            Discrete data and Analog data is managed differently. Analog data is saved to the database on a regular interval. Discrete data is saved whenever the discrete changes. For sensors that the plugin manages it will look for transitions in discrete state and store into the database. This includes the DS2405 and related sensors from the 1-wire and the Relay05. The plugin has no provisions to look for transitions for virtual devices. You have two options in this case.

            I use mcsMovement which is a generalized discrete device manager. A device that is identified to be managed in mcsMovement can have its data sent to the mcsTempeature database. mcsMovement is in the updater. There may have been some updates in the mcsFreePlugins forum. It includes source code.

            The second approach is to use scripts to write to the database. The mcsTemperature plugin provides a scripting method that will allow a discrete value to be recorded into the database. You trigger an event on the discrete of interest and use a one-liner to write the state to the database. I think this is the approach Bill Walton uses to record his Doomotion senosrs into the mcsTemperature database.

            There is actually a third, more ugly option. You can treat these ocelot variables as analog data are record them periodically. This means it will only see transitions at the sampling interval and it will use database space up even when values are not changing.