when
Item UG_Heizung_Wasser_Signal received update
then
sendTelegram("botTimo", "Wassermelder-Update: Alive! Signalstärke: %s ", UG_Heizung_Wasser_Signal.state)
end
rule "Status Wassermelder 2"
when
Time cron "0 7 0 1/1 * ? *"
then
sendTelegram("botTimo", "Wassermelder-Cron: Alive! Signalstärke: %s ", UG_Heizung_Wasser_Signal.state.toString)
end
Is anybody able to help. To get into Rules is very hard for me. My TelegramBot is working. This is not the issue.
Some bindings and devices support sending a REFRESH command to an Item. Don’t know about yours.
Note that if you do use (or can use!) e.g. myItem.sendCommand(REFRESH)
in a rule, then you should NOT expect an immediate response. The new state will NOT be available in the next line in the rule. The best way would be to trigger another rule from the expected Item update.
The issue described by Stefan Haupt is a different. My installation is new based on OH 2.3 with autodetection of CCU2.
If I deactivate the item in my default.items by “//”, save it and remove the “//” afterwards and save again; I recieve an update in my log file. The rule based on the following seems not to react on it.
when
Item UG_Heizung_Wasser_Signal received update
My challenges are still:
Why does sendTelegram submit NULL while the last log entry shows 3?
How do I force the Homematic device to tell me it’s status?
Why does my rule not react on a forced update via default.items update?
My idea is to have two seperate rules:
Forcing the update of the current signal strength of the Homematic device at 9:00am in the morning.
Send the information via sendTelegram after receiving an update.
I really appreciate any help! Thanks a lot for this community.
Let’s find out, add simple diagnostics to your “update” rule. Ignore telegram for now, the problem is about Item states.
rule "to test updates seen"
when
Item UG_Heizung_Wasser_Signal received update
then
logInfo( "testingupdate", "Update was " + UG_Heizung_Wasser_Signal.state )
// sendTelegram("botTimo", "Wassermelder-Update: Alive! Signalstärke: %s ", UG_Heizung_Wasser_Signal.state)
end
As we’re concerned about missing updates, let’s have a periodic check
rule "Cron job every minute"
when
Time cron "0 0/1 * * * ?" // every minute
then
logInfo( "testingupdate", "Cron Item is " + UG_Heizung_Wasser_Signal )
end
This rule should log out Item type etc. as well as state.
Put your Item on your sitemap so that you can manually alter it