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'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.
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:
Code:
&shs.SetDeviceValueByRef(256,(double)hs.PluginFunction("Omnistat 3", "", "Omnitemp2Temp", new object[]{hs.DeviceValue(215),"F"}),true);
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.
Comment