Determine stateVariable dataType?

Is it possible to determine if a device stateVariable is defined as a boolean? I believe that Vera ignores whatever dataType is given for a stateVariable in the device’s S_…xml file. I’d like to determine programatically if a device variable is boolean since we can’t really directly save a lua boolean value. Typically lua boolean values of true and false are saved as 1 and 0 when updating a boolean device variable. If you knew when a device variable dataType was boolean you could do the conversion whenever you get or set the variable.

AFAIK, the answer is no.

The reason is that Vera has completely flouted the UPnP rules in terms of data values and data types, rendering most of the metadata in the service and implementation files as good as useless.

For device variables, the truth is that everything is a string; some strings represent numbers; booleans are 0 or 1, mostly.

You just have to live with it!