I try so send a push notification if the washmaschine finished to wash. I use a Homematic IP Switch and Meter Plug. I have the possibility to switch the plug manually on and off. But I don’t receive a message on the Openhab app, if the maschine was ready. I tried the following rule:
rule "push"
when
Item GF_LaundryRoom_Power_washmaschine_consume < 45.00
then
sendBroadcastNotification("Washmaschine ready ")
end
But I don’t will receive anything. I tried already with another value. But it’s the same result.
rule "push"
when
Item GF_LaundryRoom_Power_Trockner_Verbrauch received update
then
If (GF_LaundryRoom_Power_Trockner < 45.00) {
sendBroadcastNotification("Trockner fertig ")}
end
In the Logs if found the following line:
Rule ‘push’: The name ‘If’ cannot be resolved to an item or type; line 5, column 4, length 42
yes, that’s normal behaviour if you edit the file via smb or sftp. The first line is triggered as the file is touched (but empty), the second line is triggered as the file is written. If there’s no further notice (INFO or WARN or ERROR) after the last “loading model…” you’re safe!
the logic of your rules at all (if (GF_LaundryRoom_Power_Trockner.state < 45.00) {) - you have to have the “.state” Syntax!
the logic of how you measure your washing machine or dryer
just have a look here - it’s Sonoff-hardware, but the logic works for your homematic also: Washing Machine State Machine
So the rule is now updated, but it doesn’t run. I have the following entry in the log file:
Configuration model ‘push.rules’ has errors, therefore ignoring it: [3,4]: no viable alternative at input ‘.’ [11,4]: no viable alternative at input ‘.’
Configuration model ‘push.rules’ has errors, therefore ignoring it: [3,4]: no viable alternative at input ‘.’ [12,4]: no viable alternative at input ‘.’
Please read through both and try to adapt to your rules.
tl>dr;
If you have an item, you can address it in a rule of Course. If you don’t add “.state” to that, you’ll get all the meta-data of that item (itemtype, last update, … AND the value). So, if you want to compare something to an item value you MUST add .value to it - But that’s explained in detail above.