ROS
(Rune Olav StrandÄs)
May 15, 2021, 3:57pm
1
Hi.
I can not write a value to KNX from OH3, but I can read them.
Switches are working both ways.
This command should work:
KNXTermostatVarmekasett_VarmekasettSetpunktInn.sendCommand(temp)
I have checked the KNX bus and it does not receive anything.
What shall I do?
ROS
J-N-K
(Jan N. Klug)
May 15, 2021, 5:17pm
4
Please show your configuration
ROS
(Rune Olav StrandÄs)
May 15, 2021, 5:31pm
6
Here is the thing:
UID: knx:device:gatway:termostat_varmekasett
label: KNX Termostat Varmekasett
thingTypeUID: knx:device
configuration:
pingInterval: 600
address: 1.0.7
readInterval: 0
fetch: false
bridgeUID: knx:ip:gatway
location: cellar
channels:
id: varmekasett_sp
channelTypeUID: knx:number
label: Varmekasett Setpunkt
description: ââ
configuration:
ga: 0/1/0
id: varmekasett_sp_inn
channelTypeUID: knx:number
label: Varmekasett Setpunkt Inn
description: ââ
configuration:
ga: 9.001:0/1/1
id: varmekasett_temperatur
channelTypeUID: knx:number
label: Varmekasett Temperatur
description: ââ
configuration:
ga: 0/1/2
id: varmekasett_utgang1
channelTypeUID: knx:switch
label: Varmekasett Utgang 1
description: ââ
configuration:
ga: 0/1/3
id: varmekasett_tilbakemelding1
channelTypeUID: knx:switch
label: Varmekasett Tilbakemelding 1
description: ââ
configuration:
ga: 0/1/4
id: varmekasett_sensor_status_1
channelTypeUID: knx:switch
label: Varmekasett FĂžlerstatus 1
description: ââ
configuration:
ga: 0/1/5
id: varmekasett_temperatur_2
channelTypeUID: knx:number
label: Varmkasett Temperatur 2
description: ââ
configuration:
ga: 0/1/12
id: varmekasett_utgang_2
channelTypeUID: knx:switch
label: Varmekasett Utgang 2
description: ââ
configuration:
ga: 0/1/13
id: varmekasett_sensor_status_2
channelTypeUID: knx:switch
label: Varmekasett FĂžlerstatus 2
description: ââ
configuration:
ga: 0/1/15
J-N-K
(Jan N. Klug)
May 15, 2021, 5:32pm
7
0/1/1 is the one that is not working?
ROS
(Rune Olav StrandÄs)
May 15, 2021, 5:48pm
8
Yes.
But I have other things that also send a value and are not working.
Since it is not in the openhab log, I think the command never get executed.
J-N-K
(Jan N. Klug)
May 15, 2021, 5:51pm
9
Does it work if you use openhab:send ItemName Value on the karaf console? If that works, the problem is kn your rule. If it also doesnât work, itâs a binding issue.
ROS
(Rune Olav StrandÄs)
May 16, 2021, 1:14pm
10
But is it not strange that ON/OFF signals go both ways and that I can read values from KNX?
I get no errors in the log, but it registered the sending in the log:
2021-05-16 15:09:04.100 [INFO ] [openhab.event.ItemCommandEvent ] - Item âKNXTermostatVarmekasett_VarmekasettSetpunktInnâ received command 23.45
2021-05-16 15:09:04.103 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item âKNXTermostatVarmekasett_VarmekasettSetpunktInnâ predicted to become 23.45
2021-05-16 15:09:04.111 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item âKNXTermostatVarmekasett_VarmekasettSetpunktInnâ changed from 23.46 °C to 23.45 °C
But nothing was on the KNX bus,
I shall try to use the console, but I have never used it and the Raspberry is in a cabinet in the basement. I shall try to connect to it.
ROS
rossko57
(Rossko57)
May 16, 2021, 1:18pm
11
Is that Item linked to any channel?
ROS
(Rune Olav StrandÄs)
May 16, 2021, 1:30pm
12
Yes it is. I have included the hole thing, scroll up
rossko57
(Rossko57)
May 16, 2021, 1:59pm
13
The hole Thing does not show any links to any Item. (Itâs not supposed to, you need to check elsewhere for that.)
ROS
(Rune Olav StrandÄs)
May 16, 2021, 4:00pm
14
It is linked to KNXTermostatVarmekasett_VarmekasettSetpunktInn.
I use UI to configure and add equipment into the model. No manual configuring, except for the KNX channels.
I have done everything âby the bookâ
rossko57
(Rossko57)
May 16, 2021, 4:04pm
15
Which of the many "it"s? We could guess, but you have a problem you are investigating. Be sure.
Have you specified a dimension to the item? I had a similar issue where the write was ignored when I set the Temperature dimension on the item. This was on OH2 but I havenât tested on OH3 so it might be the same.
ROS
(Rune Olav StrandÄs)
May 16, 2021, 4:55pm
17
Yes I have done that. This should not be a problem and I dont know where to look. Since there are no error in the log it is difficult.
So you removed the dimension and it still fails?
J-N-K
(Jan N. Klug)
May 16, 2021, 6:28pm
19
Looking at the code that might be your problem. There is no mapping for QuantityType, only for DecimalType and QuantityType does not extend DecimalType. Just guessing.
Edit: Confirmed. The binding does NOT support sending values with units. This fails:
@Test
public void testToDPTValueQuantityType() {
assertEquals("23.1", new KNXCoreTypeMapper().toDPTValue(new QuantityType<>("23.1 °C"), "9.001"));
}
Thanks Jan, shall I raise as bug/enhancement in github? ROS if you have units defined on your item then this will be you