This is an odd question because, typically you can get log info and such not to mention have the inner structure of Openhab already done, but I have extracted simply the OpenHab Z-wave Bundle and all the required library, to run a simulation of a multi-sensor Aeon Labs MultiSensor Model:DSB05-ZWUS
.
The controller I'm using is an AEOTEC Z-Stick S2
, and I'm launching The OpenHab bundle through an OSGI system set up with Maven, on a local machine. I've tested out a binary switch to turn off and on a light, which was fairly simple by sending message of either OFF or ON which is 00 or FF, but for the multi-level sensor you have to send it message to retrieve information.
I can't seem to find the work flow since there is no GUI example of how one would go about obtaining all the sensor readings. I've dug deep into the code and from what I understand, the multi-level sensor has enum types that hold a number and the corresponding sensor type.
I was able to getMessage(sensorType) and it returned to me something like this for example: SendData (0x13)
, type = Request (0x00
), playload = 0D 02 31 04 01
. I have suspicions to believe that the playload is information that is use to determine what the sensor's readings are, but I can't find any resource to decode that.
I was however able to find a Converter class: ZWaveMultiLevelSensorConverter.java
that has a method called public void handleEvent(ZWaveCommandClassValueEvent event, Item item, Map<String,String> arguments)
that has a single conversion for temperature readings, but I'm unsure what would go into the parameter.
So the specific question I have is what is the specific method that gives the reading for each sensor type (ex: temperature), and if possible what is the work flow of the code?
Resource: https://github.com/openhab/openhab/tree/master/bundles/binding/org.openhab.binding.zwave