rule "Update Item Kostal_OperatingStatusString"
when
Item Kostal_OperatingStatus received update
then
Kostal_OperatingStatusString.sendCommand("Betriebsstatus dummy")
end
sitemap:
Text item=Kostal_OperatingStatus
Text item=Kostal_OperatingStatusString
The sitemap shows correct values for the item “Kostal_OperatingStatus”, but the item “Kostal_OperatingStatusString” always has its initial value of “Betriebsstatus unbekannt”.
I already tried using “changed” in the rule instead of “received update”, but that did not help.
Using “postUpdate” instead of “sendCommand” also did not help.
Any ideas what could be the reason for the item Kostal_OperatingStatusString to not update?
Does your rules file load?
Look in your openhab.log for messages about initial file load, or refreshing after edit.
No message, no rules.
Does your Item Kostal_OperatingStatus ever change?
Look in your events.log for messages that show that.
Does your rule trigger?
Normally you’d place logInfo() to follow progress, but with a rule this simple that is unnecessary.
Either it messes up the sendCommand() and leaves a message in your openhab.log, or it does it and leaves a message in your events.log
The rule file gets loaded with no errors.
The item Kostal_OperatingStatus did not change (it will change in the evening), but I restarted Openhab, so the initial value got set again, but the rule seems not to get triggered.
Maybe just wait to see if a real change of the item triggers the rule?
For testing I have added a switch item to the sitemap, that triggers my rule.
The rule is now like this:
rule "Update Test"
when
Item RS_KOSTAL received command
then
logInfo("Kostal_OperatingStatus", "rule was called")
Kostal_OperatingStatusString.postUpdate(dumdidum)
end