- Platform information:
- Hardware: Raspberry Pi 3B+
- OS: Raspbian
- openHAB version: Openhab V2
I am running an KNX system at home and I was trying to display the outside temperature from the openweathermap binding on my KNX touch screen.
The first thing I managed was to read the actual temperature from the KNX bus to my item. I can see the temp on the KNX bus in my Openhab.
Now, I created a rule, wich is updating the same item with the temperature from the weather binding. And this is working as well. But the update from the rule, is not updating the KNX bus with the new temperature.
When I check the karaf log, I see that when I update the item via my rule, I get an ItemCommandEvent and no update to KNX bus, when it is comming from the KNX bus, I get an ItemStateChangeEvent.
What can i do?
item file:
Number tBuiten "TemperatuurBuiten [%.1f °C]" <temperature> {channel="knx:device:bridge:Thermostats:tBuiten", autoupdate="force" }
thing file:
Type number : tBuiten "[APP] Temperatuur Buiten" [ ga="4/1/5"]
//Type number : tBuiten "[APP] Temperatuur Buiten" [ ga="9.001:4/1/5"]
rule file:
rule "buitentempverwerking"
when
Time cron "*/5 * * * * ?"
then
val double currentTempVal = LocalWeatherAndForecast_Current_OutdoorTemperature.state
tBuiten.sendCommand(currentTempVal as Number)
end
karaf log:
11:50:35.033 [INFO ] [smarthome.event.ItemCommandEvent ] - Item 'tBuiten' received command 9.64 °C
11:49:57.874 [INFO ] [smarthome.event.ItemStateChangedEvent] - tBuiten changed from 9.5 to 9.7