Sorry my msitake. It does not. But in PaperUI I can see that the UI does not pickup the correct type for setpoints (QuantityType) either. For temperature everything looks fine. Check this screenshot:
As you can see, both mapped and defined items for temperature are shown correctly in PaperUI for the temperature channel:
But for the setpoint channel (the second one), only the defined one in the items file seems to be displayed correctly. The mapped item from the channel definition did not pick up the correct type, so it is shown without any units, although in the channel definition the QunatityType has been set:
The binding is receiving a QuantityType - correct?
Sorry - I’m not really sure I understand your configuration completely. Also, what version of the binding are you now using? Are you still using your version or the supplied version? I’m not sure it will make any difference, but I would like to understand.
Please provide a log as requested. The only way I can see in the software that it would not return a QuantityType is if there is no scale provided -:
switch (setpointEvent.getScale()) {
case 0:
return new QuantityType<>(value, SIUnits.CELSIUS);
case 1:
return new QuantityType<>(value, ImperialUnits.FAHRENHEIT);
default:
logger.debug("NODE {}: Unknown temperature scale {}", event.getNodeId(), setpointEvent.getScale());
break;
}
As you see, there would also be a debug message reported.
Is it just the state with the %unit% you added or was there something else ? I guess this could also be added in your items file? I forget why I didn’t add this when I updated the channels - there was a reason at the time, but I forget what it was now .
It is always available on the first post of the dev binding thread.
@chris
just tested the change. It is throwing an exception now.
2018-07-24 20:20:56.234 [ome.event.ItemCommandEvent] - Item 'spHeatRoomSensor2' received command 12 °C
==> /var/log/openhab2/openhab.log <==
2018-07-24 20:20:56.247 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.handleCommand()' on 'org.openhab.binding.zwave.handler.ZWaveThingHandler@16dfc00': org.eclipse.smarthome.core.library.types.QuantityType cannot be cast to org.eclipse.smarthome.core.library.types.DecimalType
java.lang.ClassCastException: org.eclipse.smarthome.core.library.types.QuantityType cannot be cast to org.eclipse.smarthome.core.library.types.DecimalType
at org.openhab.binding.zwave.internal.converter.ZWaveThermostatSetpointConverter.receiveCommand(ZWaveThermostatSetpointConverter.java:133) [239:org.openhab.binding.zwave:2.4.0.201807241749]
at org.openhab.binding.zwave.handler.ZWaveThingHandler.handleCommand(ZWaveThingHandler.java:1078) [239:org.openhab.binding.zwave:2.4.0.201807241749]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]
at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:153) [94:org.eclipse.smarthome.core:0.10.0.201807081340]
at org.eclipse.smarthome.core.internal.common.InvocationHandlerSync.invoke(InvocationHandlerSync.java:59) [94:org.eclipse.smarthome.core:0.10.0.201807081340]
at com.sun.proxy.$Proxy182.handleCommand(Unknown Source) [239:org.openhab.binding.zwave:2.4.0.201807241749]
at org.eclipse.smarthome.core.thing.internal.profiles.ProfileCallbackImpl.handleCommand(ProfileCallbackImpl.java:75) [101:org.eclipse.smarthome.core.thing:0.10.0.201807081340]
at org.eclipse.smarthome.core.thing.internal.profiles.SystemDefaultProfile.onCommandFromItem(SystemDefaultProfile.java:49) [101:org.eclipse.smarthome.core.thing:0.10.0.201807081340]
at sun.reflect.GeneratedMethodAccessor81.invoke(Unknown Source) ~[?:?]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]
at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:153) [94:org.eclipse.smarthome.core:0.10.0.201807081340]
at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:53) [94:org.eclipse.smarthome.core:0.10.0.201807081340]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
at java.lang.Thread.run(Thread.java:748) [?:?]
I will test your binding tomorrow early and give you feedback.
Cheers
Ok, I’ll check this to see if how this is different to what’s in the binding at the moment. From a quick look, it looks similar, but I’ll check when I get a chance.
The situation is pretty much as the post @sihui linked to. There are currently no known manufacturers who supply the updates - once a few start to release the binary files, then I’m happy to look at OTA in the binding (I’ve already implemented it in ZigBee where suppliers are more open to providing the binaries).
Jury is still out regarding the firmware file.
In the mean time, my local z-wave pusher had a 18% discount on the z-trm2 so I bought a few more
Two of my thermostats are mounted as Power regulators (1-10 setting ON/OFF duty), mounted in another room.
The z-trm2 also supports this mode, but only as parameter 12 (even though doc states it does not)
Since I’m planning on monitoring the temperature using Aeon multisensor6 in the actual rooms I will need to set this parameter from a rule.
@chris Is it possible to make parameter 12 available via a channel, or is it possible to send new parameter values from a rule?