Try to use rules to send valeus on the KNX from other bindings

I try to get valeus from a binding to be send on the KNX system

I have created a KNX thing white the used KNX groups

then i created a rule to send the valeus to the knx system

rule "Weerbericht"
when 
    Time cron '0 0/5 * 1/1 * ? *'
then 
     sendCommand(KNXWeerbericht_BuitenTemperatuur,LocalWeather_Current_OutdoorTemperature.state.toString)

end

rule "manual_weerbericht"
when 
    Item KNXWeerbericht_ManualSend received command "ON"

then 

    sendCommand(KNXWeerbericht_BuitenTemperatuur,LocalWeather_Current_OutdoorTemperature.state.toString)

    KNXWeerbericht_BuitenTemperatuur.sendCommand(LocalWeather_Current_OutdoorTemperature.state.toString)
end 

when i look to the knx bus i only see the groups adress of the manual send on the bus

what do i wrong ?

https://www.freeformatter.com/cron-expression-generator-quartz.html

Thnaks for the response,
the time cron is created with the http://www.cronmaker.com/

The main problem is hen a use the manual switch, nothing is send on the KNX bus of the weather outdoor temperature

afbeelding

Clarify a bit plz: From the first post, I understand that you do see the telegram being transmitted on the KNX Bus when you use the manually fired rule. From the second post, I understand that it is not actually send…

What is the situation?

Add a logInfo statement to each rule to see if it fires:

rule "Weerbericht Cron based every 5m"
when 
	Time cron '0 */5 * ? * *'
then
	logInfo("Weerbericht_Cron", "Cron - Sending Temp to KNX")
	KNXWeerbericht_BuitenTemperatuur.sendCommand(LocalWeather_Current_OutdoorTemperature.state.toString)
end
rule "Weerbericht Manual"
when 
	Item KNXWeerbericht_ManualSend received command ON
then
	logInfo("Weerbericht_Manual", "Manual - Sending Temp to KNX")
	KNXWeerbericht_BuitenTemperatuur.sendCommand(LocalWeather_Current_OutdoorTemperature.state.toString)
end 

Question: why are you converting to String the LocalWeather_Current_OutdoorTemperature.state?
Isn’t your KNX Item KNXWeerbericht_BuitenTemperatuur a Number?

You should post all relevant configs when troubleshooting :slight_smile:

There should be also log entries in openhab.log

The ‘Manual Send’ have group adres 0/0/100 and is send on the KNX bus (item type = switch)
the ‘Buiten temperatuur’ have group adres 1/0/1 and is not send to the KNX bus (item type = number)

i have tryed a lot of combinations, and hen i remove the ‘toString’ i get a error in VS code that my syntax is not correct

also my other knx devices are not working any more in the paperUI, when a use a switch that before is working, is now not working any more

when i remove the rule, then the are working again afte some time, i have check this more times

the configuration of the knx devices is don i the paperUI

i see in the openhab log ‘Cron - sending Temp to KNX’
but when a i look in paperUI on the KNX item there is no change on it
afbeelding

That is because you are using the action sendCommand instead of the recommended .sendCommand method
use:

Item.sendCommand(command)

instead of:

sendCommand(Item, command)

If You see my first post there i have the two versions

i have addapte the rules with the logInfo

rule "Weerbericht"
when 
    Time cron '0 0/5 * 1/1 * ? *'
then 
    logInfo("Weerbericht_Cron", "Cron - Sending Temp to KNX")
    sendCommand(KNXWeerbericht_BuitenTemperatuur,LocalWeather_Current_OutdoorTemperature.state.toString)

end

rule "manual_weerbericht"
when 
    Item KNXWeerbericht_ManualSend received command "ON"

then 
    logInfo("Weerbericht_Manual", "Manual - Sending Temp to KNX")
    sendCommand(KNXWeerbericht_BuitenTemperatuur,LocalWeather_Current_OutdoorTemperature.state.toString)

    KNXWeerbericht_BuitenTemperatuur.sendCommand(LocalWeather_Current_OutdoorTemperature.state.toString)
end 

when i then look at openhab log i get

```csv
your 2018-12-12 07:45:00.004 [INFO ] [rthome.model.script.Weerbericht_Cron] - Cron - Sending Temp to KNX

2018-12-12 07:50:00.002 [INFO ] [rthome.model.script.Weerbericht_Cron] - Cron - Sending Temp to KNX

2018-12-12 07:55:00.001 [INFO ] [rthome.model.script.Weerbericht_Cron] - Cron - Sending Temp to KNX 

There is no communication on the KNX bus
also i have the feeling that the KNX bus is bloked by this rules


```csv
2018-12-12 08:01:48.169 [WARN ] [Xnet/IP Tunneling 192.168.3.157:3671] - response timeout waiting for confirmation
tuwien.auto.calimero.KNXTimeoutException: no confirmation reply received for 1.0.0->1.1.3 L_Data.req, system priority hop count 6 repeat, tpdu 81
	at tuwien.auto.calimero.knxnetip.ClientConnection.doExtraBlockingModes(ClientConnection.java:244) ~[?:?]
	at tuwien.auto.calimero.knxnetip.ConnectionBase.send(ConnectionBase.java:258) ~[?:?]
	at tuwien.auto.calimero.knxnetip.KNXnetIPTunnel.send(KNXnetIPTunnel.java:178) ~[?:?]
	at tuwien.auto.calimero.link.KNXNetworkLinkIP.onSend(KNXNetworkLinkIP.java:243) ~[?:?]
	at tuwien.auto.calimero.link.AbstractLink.send(AbstractLink.java:351) ~[?:?]
	at tuwien.auto.calimero.link.KNXNetworkLinkIP.sendRequestWait(KNXNetworkLinkIP.java:222) ~[?:?]
	at tuwien.auto.calimero.mgmt.TransportLayerImpl.sendDisconnect(TransportLayerImpl.java:612) ~[?:?]
	at tuwien.auto.calimero.mgmt.TransportLayerImpl.disconnectIndicate(TransportLayerImpl.java:600) ~[?:?]
	at tuwien.auto.calimero.mgmt.TransportLayerImpl.disconnect(TransportLayerImpl.java:342) ~[?:?]
	at tuwien.auto.calimero.mgmt.Destination.destroy(Destination.java:371) ~[?:?]
	at tuwien.auto.calimero.mgmt.Destination.close(Destination.java:383) ~[?:?]
	at tuwien.auto.calimero.mgmt.ManagementProceduresImpl.isAddressOccupied(ManagementProceduresImpl.java:311) ~[?:?]
	at org.openhab.binding.knx.internal.client.AbstractKNXClient.isReachable(AbstractKNXClient.java:338) ~[?:?]
	at org.openhab.binding.knx.handler.AbstractKNXThingHandler.pollDeviceStatus(AbstractKNXThingHandler.java:144) ~[?:?]
	at org.openhab.binding.knx.handler.AbstractKNXThingHandler.lambda$1(AbstractKNXThingHandler.java:184) ~[?:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:?]
	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) [?:?]
2018-12-12 08:01:48.247 [WARN ] [calimero.mgmt.TL 192.168.3.157:3671 ] - disconnected not gracefully (timeout)
tuwien.auto.calimero.KNXTimeoutException: no confirmation reply received for 1.0.0->1.1.3 L_Data.req, system priority hop count 6 repeat, tpdu 81
	at tuwien.auto.calimero.knxnetip.ClientConnection.doExtraBlockingModes(ClientConnection.java:244) ~[?:?]
	at tuwien.auto.calimero.knxnetip.ConnectionBase.send(ConnectionBase.java:258) ~[?:?]
	at tuwien.auto.calimero.knxnetip.KNXnetIPTunnel.send(KNXnetIPTunnel.java:178) ~[?:?]
	at tuwien.auto.calimero.link.KNXNetworkLinkIP.onSend(KNXNetworkLinkIP.java:243) ~[?:?]
	at tuwien.auto.calimero.link.AbstractLink.send(AbstractLink.java:351) ~[?:?]
	at tuwien.auto.calimero.link.KNXNetworkLinkIP.sendRequestWait(KNXNetworkLinkIP.java:222) ~[?:?]
	at tuwien.auto.calimero.mgmt.TransportLayerImpl.sendDisconnect(TransportLayerImpl.java:612) ~[?:?]
	at tuwien.auto.calimero.mgmt.TransportLayerImpl.disconnectIndicate(TransportLayerImpl.java:600) ~[?:?]
	at tuwien.auto.calimero.mgmt.TransportLayerImpl.disconnect(TransportLayerImpl.java:342) ~[?:?]
	at tuwien.auto.calimero.mgmt.Destination.destroy(Destination.java:371) ~[?:?]
	at tuwien.auto.calimero.mgmt.Destination.close(Destination.java:383) ~[?:?]
	at tuwien.auto.calimero.mgmt.ManagementProceduresImpl.isAddressOccupied(ManagementProceduresImpl.java:311) ~[?:?]
	at org.openhab.binding.knx.internal.client.AbstractKNXClient.isReachable(AbstractKNXClient.java:338) ~[?:?]
	at org.openhab.binding.knx.handler.AbstractKNXThingHandler.pollDeviceStatus(AbstractKNXThingHandler.java:144) ~[?:?]
	at org.openhab.binding.knx.handler.AbstractKNXThingHandler.lambda$1(AbstractKNXThingHandler.java:184) ~[?:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:?]
	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) [?:?]

see also Karaf error message

They’ll need to see your Item definition.

I have disable the rules and shutdown karaf and restart it, now my KNX connection is working again

below the item config in paperUI

and the code in org.eclipse.smarthome.core.items.item.json

"KNXWeerbericht_BuitenTemperatuur": {
    "class": "org.eclipse.smarthome.core.items.ManagedItemProvider$PersistedItem",
    "value": {
      "groupNames": [],
      "itemType": "Number",
      "tags": [],
      "label": "Buiten temperatuur"
    }

karaf console message

SLF4J: Failed toString() invocation on an object of type [org.eclipse.smarthome.core.items.events.ItemStateChangedEvent]
Reported exception:
java.lang.OutOfMemoryError: Java heap space
        at java.util.Arrays.copyOf(Arrays.java:3332)
        at java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:124)
        at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:448)
        at java.lang.StringBuilder.append(StringBuilder.java:136)
        at java.lang.StringBuilder.append(StringBuilder.java:76)
        at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:484)
        at java.lang.StringBuilder.append(StringBuilder.java:166)
        at java.lang.StringBuilder.append(StringBuilder.java:76)
        at java.util.Formatter$FormatSpecifier.print(Formatter.java:2913)
        at java.util.Formatter$FormatSpecifier.printString(Formatter.java:2886)
        at java.util.Formatter$FormatSpecifier.print(Formatter.java:2763)
        at java.util.Formatter.format(Formatter.java:2520)
        at java.util.Formatter.format(Formatter.java:2455)
        at java.lang.String.format(String.java:2940)
        at org.eclipse.smarthome.core.items.events.ItemStateChangedEvent.toString(ItemStateChangedEvent.java:89)
        at org.slf4j.helpers.MessageFormatter.safeObjectAppend(MessageFormatter.java:299)
        at org.slf4j.helpers.MessageFormatter.deeplyAppendParameter(MessageFormatter.java:271)
        at org.slf4j.helpers.MessageFormatter.arrayFormat(MessageFormatter.java:233)
        at org.slf4j.helpers.MessageFormatter.arrayFormat(MessageFormatter.java:173)
        at org.slf4j.helpers.MessageFormatter.format(MessageFormatter.java:124)
        at org.ops4j.pax.logging.slf4j.Slf4jLogger.info(Slf4jLogger.java:494)
        at org.eclipse.smarthome.io.monitor.internal.EventLogger.receive(EventLogger.java:53)
        at sun.reflect.GeneratedMethodAccessor16.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)
        at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:53)
        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)

Modify your rule to logInfo the LocalWeather_Current_OutdoorTemperature Item. It’s possible you are trying to send the “command” NULL or UNDEF, which won’t work.

Does you KNXv2 binding work ok? (forget the rule for a moment and check if simple things work)

I think that you have more general problems that you need to address to improve the stability of your OH2 installation on Windows.

Try to make sure that the system is stable first before you start implementing rules.

stable = startup and basic operations without any errors and/or warnings in your logs.

i used weather underground information

when i use postUpdate, the paperUI ‘KNX weerbericht’ will display the same values
afbeelding

I have removed ‘Log ReaderBinding’ thing, removed the ‘Bleutooth Binding 2.4.0’ and ‘CometVisu Backend 2.4.0 UI’ form my configuration.

Now Karaf is quit

afbeelding

I will now try the rule again

I have just one remarque/question
My ‘KNX weerbericht’ is not a fysciale knx hardware device but a virtual openhab KNX device, so i dont have a fysical knx adres for it.

When i put heer a non existhing device adres, the the thing go to off line.

I now have adde the rules again

rule "Weerbericht"
when 
    Time cron '0 0/5 * * * ? *'
then 
    logInfo("Weerbericht_Cron", "Cron - Sending Temp to KNX")
    sendCommand(KNXWeerbericht_BuitenTemperatuur,LocalWeather_Current_OutdoorTemperature.state.toString)
    sendCommand(KNXWeerbericht_HuidigeToestand,LocalWeather_Current_CurrentConditions.state.toString)
    sendCommand(KNXWeerbericht_Vochtigheid,LocalWeather_Current_AtmosphericHumidity.state.toString)

end

rule "manual_weerbericht"
when 
    Item KNXWeerbericht_ManualSend received command "ON"

then 
    logInfo("Weerbericht_Manual", "Manual - Sending Temp to KNX")
    sendCommand(KNXWeerbericht_BuitenTemperatuur,LocalWeather_Current_OutdoorTemperature.state.toString)
    sendCommand(KNXWeerbericht_HuidigeToestand,LocalWeather_Current_CurrentConditions.state.toString)
    sendCommand(KNXWeerbericht_Vochtigheid,LocalWeather_Current_AtmosphericHumidity.state.toString)

    sendCommand(KNXWeerbericht_ManualSend,OFF )
    
end 

in paperUi the KNX Weerbericht items are updated
afbeelding

in the KNX monitoring i only see the ‘Manual send’

‘Huidige toestand’ = 1/0/0 Type = String
‘Buiten temperatuur’ = 1/0/1 Type = Number
‘Vochtigheid’ = 1/0/2 Type = Number

all my other knx things and items are still working, so the bindinsg a disabled are the blocking part for the knx binding !?

Ok there more comming on the KNX bus, Sting is send on the bus, now the Numbers ti get it to work