My issue is that part of my rules don’t fire to GAs unless the related things and items look the same. I am using these rules with my old OH1 instance having no issues there.
Expected Behavior
Rules should be able to write telegrams to a GA using number values while using MyItem.sendCommand(value). I tried converting the number value to string but that doesn’t change the behavior.
Current Behavior
I receive the following error message for several rules:
2018-06-09 00:05:10.214 [TRACE] [.internal.handler.DeviceThingHandler] - Handling command '2' for channel 'knx:device:bridge:generic:hzSWVBuero'
2018-06-09 00:05:10.216 [DEBUG] [.internal.handler.DeviceThingHandler] - None of the configured GAs on channel 'knx:device:bridge:generic:hzSWVBuero' could handle the command '2' of type 'DecimalType'
For one rule that is working I receive the following output:
2018-06-09 00:07:31.691 [TRACE] [.internal.handler.DeviceThingHandler] - Handling command '3' for channel 'knx:device:bridge:generic:valloxStatus'
2018-06-09 00:07:31.694 [DEBUG] [nx.internal.client.AbstractKNXClient] - Wrote value '3' to datapoint 'command DP 11/4/0 'knx:ip:bridge', DPT id 6.010, low priority' (0. attempt).
Possible Solution
I have no clue why these two items don’t result in the same behavior.
Steps to Reproduce (for Bugs)
Things configuration (excerpt):
Thing device generic "Generic" {
Type number : hzSWVBuero "Verstellung Büro" [ ga="6.010:9/5/3+6.010:9/6/3" ]
Type number-control : valloxStatus "Profil" [ ga="6.010:11/4/0" ]
}
Items configuration (excerpt):
Number HZ_SV_BU "Verstellung Büro [%d]" <temperature> (HZ_SV) { channel="knx:device:bridge:generic:hzSWVBuero" }
Number sendVallox "Lüftungsprofil [%d]" <climate> { channel="knx:device:bridge:generic:valloxStatus" }
Rules configuration (excerpt):
rule "HZ_ZW_BU changed"
when
Item HZ_ZW_BU changed
then
counter = BU_counter
BU_counter = (HZ_ZW_BU.state as Number - 22) * 2
if (BU_counter != counter) {
HZ_SV_BU.sendCommand(BU_counter.intValue().toString())
logInfo("tempinfo",BU_counter.intValue().toString())
}
end
rule "ValloxToKNX"
when
Item stateVallox changed
then
val DecimalFormat df = new DecimalFormat("#")
val Number ValloxRounded = (df.format(stateVallox.state as DecimalType))
if (sendVallox.state != stateVallox.state) sendVallox.sendCommand(ValloxRounded.toString())
end
Context
The first rule is used to calculate and send the shift value required to change my room temperature. This is the way that Busch Jaeger Prion RTR communicate with each other.
The second rule is used to send the current state of the ventilation system to the KNX bus to my Busch Jaeger panel.
Your Environment
- Version used: OpenHAB 2.3.0 (apt package)
- Environment name and version (e.g. Chrome 39, node.js 5.4, Java 8, …): Chrome 67, Java 8
- Operating System and version (desktop or mobile, Windows 10, Raspbian Jessie, …): Raspbian Stretch (Pi3B+)