No announcement yet.

Device Values and Status values are different.

  • Filter
  • Time
  • Show
Clear All
new posts

    Device Values and Status values are different.

    From Acromion:
    I'm struggling with the device values being returned in internal units and I'm not sure what to do. I use incontrol and it looks at the device value rather than the text. As a result, the user interface displays something like 126 degrees instead of the real temp. Controls also don't work.

    Is there a way to create a different device that perhaps represents the temperature in degrees? Is the plugin properly complying with the thermostat API? It seems to me that the exposed devices should work in degrees and the plugin should do the conversion to "Thermostat Units" internally.

    As a reference, it appears that the stock HS Omnistat plugin uses degrees directly in the temperature values. Unfortunately, it is pretty crippled in its functionality.
    I have heard that others are having the same issue. Although the plugin supports the Thermostat API, I don't personally use it. I found for my needs it wasn't sufficient. Also, it seems to me that if you check "Use Status Text" then it should use the status text not the value.

    The original intent of the plug-in was to use OmniTemp as the common denominator between Fahrenheit and Celcius. That would allow the plugin to work independent of whether Fahrenheit or Celcius is checked.

    Having said all that, we need to find a solution to this. The easiest solution (for me) is for you to define virtual devices to contain the values that your looking for. The other of course would be to change the plugin. This is more extensive then you may think.

    I would recommend that you first create the virtual device and see if this works satisfactorily. I have included images that show the resultant device,
    The Status pairs page, and the event needed to populate the device.

    Here is the code you can paste into your event:
    &shs.SetDeviceValueByRef(256,(double)hs.PluginFunction("Omnistat 3", "", "Omnitemp2Temp", new object[]{hs.DeviceValue(215),"F"}),true);
    Substitute your virtual device ref for 256 in script.
    Substitute your Omnistat Temp device ref for 215 in script.

    Let me know if that works for you otherwise we may need to look at option 2.
    Attached Files

    Upon further reflection, I have decided to change the plugin so that the device values match the temperatures. I will try to have a Beta for testing by the end of the week.


      That is greatly appreciated Kirby but I hate to see you going through the work if there is a simple work around.

      However, I do see the value in representing these temperatures in the same way as other plugins for better compatibility.


        The values and statuses are now the same in version which is in the Updater.


          Great Kirby. Thanks so much.