Hello all,
I was trying to solve this by myself for three days.
I looked into many forums, but there is much old information about OH2 and KNX1 binding which does not work here.
I am running the latest stable of OH3 on a Raspi-4 on Raspbian 11 (Debian).
Use-case: I want to use the outdoor humidity information from OpenWeatherMap binding and send this to the KNX bus (using knx(2) binding). It shall be displayed as status value (object 122/123) on the MDT Glastaster II Smart. The MDT status value requires DPT 9.007.
KNX-Things:
Type number-control : GT2info_120_outfeuchte "Außenfeuchte von OpenWeatherMap" [ ga="9.007:7/3/248" ]
Items:
Number:Dimensionless localCurrentHumidity "Current atmospheric humidity [%d %unit%]" <humidity> (gOpenWeatherMap) {channel="openweathermap:weather-and-forecast:api:local:current#humidity"}
Dimmer KNXlocalCurrentHumidity "Außenfeuchte [%.1f %%]" <humidity> {channel="knx:device:bridge:knx_virtual:GT2info_120_outfeuchte"}
Rule:
rule "myrule"
when
Time cron "0/10 * * ? * * *" //for testing purposes only in 10 intervals
then
KNXlocalCurrentHumidity.sendCommand((localCurrentHumidity.state as Number).doubleValue)
end
ETS group monitor is running but nothing receives on the BUS from OH3.
I do not paste the full config, as this is working for temperature in similar way, so in general the config is fine.
Where I am confused is: Do I need to use Item type Dimmer or Number.
For the Thing, so I need to use number-control or dimmer-control.
Others wrote I shall use 5.001 instead of 9.007.
And with the rule I am also not sure, if the conversion is fine.
According to KNX documentation 9.007 shall be in F16 format, what as I double data type in my pov.
I tried all combinations, but it’s not working.
When I add this to the rule:
logInfo ("knx.rules", localCurrentHumidity.state.toString)
I get this output:
2022-11-24 08:04:10.630 [INFO ] [.openhab.core.model.script.knx.rules] - 88 %
My event.log shows the following:
2022-11-24 08:04:30.371 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'KNXlocalCurrentHumidity' received command 88.0
2022-11-24 08:04:30.375 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'KNXlocalCurrentHumidity' predicted to become 88.0
2022-11-24 08:04:40.370 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'KNXlocalCurrentHumidity' received command 88.0
2022-11-24 08:04:40.373 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'KNXlocalCurrentHumidity' predicted to become 88.0
So I really assume this is something with data type conversion…
Many thanks for any help on this …
Best Regards,
Divi