mknx/smarthome — pull request #118 by ohinckel (2014-06-08 20:17:57+00:00)
Title: Sml Plugin: Property assignment, unit names, integer handling, logger fix

I updated the SML plugin to be more flexible and able to assign more values to items. The following changes are implemented in this patch (for more details see also the updated README.md):

# Property assignment
Usually this plugins provides the value for a given OBIS code and assign them to the value. Beside of this you can now assign all OBIS-Properties including in one data packet to items too. E.g. the unit-ID, scale factor or other properties.

# Unit names
With this patch a new "calculated" property will be provided which contains the unit name as string (e.g. W for Watts, kWh for Watts per hour, A for Ampere, V for Volts, ...). This can also be assigned to items now.

# Flexible integer handling
To support more hardware working with non-standard integer value the integer handling was updated to be more flexible with such data packets. Usually only 1-, 2-, 4- or 8-byte integer are supported. But sometimes an 3-byte or 5-byte integer is returned by the power meter device, which was interpreted as malformed data packet. Now such values are also supported (see also pull #115 which also tries to fix this issue).

# Logger fix
When using this plugin with host/port combination and the plugin was not able to connect to the host an error message was written to the log. This message generates an error since it uses an undefined method and the plugin aborts. This was fixed by using the standard logger function.