I’ve got a group for my UPS status from NUT.
I currently have two real UPS and one test one that cycles from OL, OB and OL CHAR (online, on battery and only charge).
My rule sames on g_ups_status change (I tried received update with no difference), read through the group and let me know about about device not OL.
For some reason that rule is not firing. The only time I can get it firing, is to change from teh group received update to the test device since that cycles frequently.
I’m comfortable with the rule function as that’s doing what it should when I fire it with the test device.
If the fact the status is a string rather than a bool/int value the possible cause?
For arguments sake, here’ s the rule:
rule "UPS Check Rule"
when
Item g_ups_status received update
//Item g_ups_status changed
//or Item apcdummy_Status received update
then
logInfo("UPSCheckRule","Received Status update Command")
end
BTW the group is displaying properly in my site map (which shows me it has stuff in it).
Here are the items
Group g_ups "UPS" <energy>
Group g_ups_status "UPS Status Values" <energy> (g_ups)
Group g_apc1000 "APC 1000" <energy> (g_ups)
String apc1000_Status "UPS status [%s]" (g_apc1000,g_ups_status) {networkupstools="apc1000:ups.status"}
Group g_apc600 "APC 600" <energy> (g_ups)
String apc600_Status "UPS status [%s]" (g_apc600,g_ups_status) {networkupstools="apc600:ups.status"}
Group g_apcdummy "APC Dummy" <energy> (g_ups)
String apcdummy_Status "UPS status [%s]" (g_apcdummy,g_ups_status) {networkupstools="dummy:ups.status"}
I keep expecting to see in the events log the g_ups_status changed through item apcdummy_status
Groups get a state from an aggregation function like SUM or AND. That makes sense for numbers or binary ON/OFF group members, but not for a group of String types.
So there’s no trigger as your group has no type nor aggregation function, but there is no sensible option for you anyway.
You might be able to do what you want using Member of triggers, which can trigger a rule when one member of a group e.g. updates