[SOLVED] Alarm Items in a group

Hi,

I’ve got five smoke detectors, two heat alarms and a co2 detector.

I want to create a rule that turns on all the lights in the house, switches off the boiler and activates two sirens.

To avoid redundancy I have put all the alarm items into a ‘Alarm Group’. I have the alarm group on a sitemap with the alarm icon.

I notice that the icon shows itself as active even though the items aren’t. I presume this is because all the devices are in a null state rather than a ‘OK’ state.

Is there anyway I can get the sitemap icon to reflect the correct situation i.e. no alarm is active?

Thanks

If you share your items configurations and code we might be able to help…

I’ve not created the rules yet

Here are the items;

    // Smoke, Heat and CO Alarms
    Group:Switch:OR(ON,OFF) gSafetyAlarms
    Group:Switch:OR(ON,OFF) gSmokeAlarms            (gSafetyAlarms)
    Group:Switch:OR(ON,OFF) gHeatAlarms             (gSafetyAlarms)
    Group:Switch:OR(ON,OFF) gCOAlarms               (gSafetyAlarms)

    // Smoke, Heat and CO Alarms
    Switch  Safety_Smoke_BR "Smoke Alarm in Boys Room is: [%s]"     <smoke> (gSmokeAlarms)  { channel="zwave:device:512:node8:alarm_smoke" }
    Switch  Safety_Smoke_H  "Smoke Alarm in Hall is: [%s]"          <smoke> (gSmokeAlarms)  { channel="zwave:device:512:node5:alarm_smoke" }
    Switch  Safety_Heat_H   "Heat Alarm in Hall is: [%s]"           <fire>  (gHeatAlarms)   { channel="zwave:device:512:node5:alarm_heat" }
    Switch  Safety_Smoke_L  "Smoke Alarm on Landing is: [%s]"       <smoke> (gSmokeAlarms)  { channel="zwave:device:512:node6:alarm_smoke" }
    Switch  Safety_Heat_L   "Heat Alarm on Landing is: [%s]"        <fire>  (gHeatAlarms)   { channel="zwave:device:512:node6:alarm_heat" }
    Switch  Safety_Smoke_LR "Smoke Alarm in Living Room is: [%s]"   <smoke> (gSmokeAlarms)  { channel="zwave:device:512:node4:alarm_smoke" }
    Switch  Safety_Smoke_MB "Smoke Alarm in Master Bedroom is: [%s]"        <smoke> (gSmokeAlarms)  { channel="zwave:device:512:node7:alarm_smoke" }
    Switch  Safety_CO_BR    "CO Alarm in Boys Room is: [%s]"        <gas>   (gCOAlarms)     { channel="zwave:device:512:node9:alarm_co" }

and this is the sitemap entry;

 Frame label="Home Safety" icon="siren" {
                Text item=gSafetyAlarms icon="siren"
        }

I don’t think so. The OR(ON,OFF) means the Group should be OFF unless there is one or more members that are ON. Even if all the members are NULL, I think the Group should be OFF, unless there is something non-intuitive about how OR is implemented.

Verify what all the states of your alarm Switches are.

Hi,
Within Habmin all the smoke, heat and co2 alarms are blank.

I changed up the sitemap using the siren icon the a switch to activate/deactivate the sirens. The icon was grey but now shows as active even though the switch is off.

I also included all the detectors using the fire icon for the heat alarms. These too show as active.

Ok, the - means they are NULL or UNDEF.

So they are not active (i.e. ON).

What is the actual state of the Group? Give the Group a label and put it on your sitemap as a Text.

I added the group to the sitemap and it too it not ‘ON’ yet the siren icon and the fire icons are showing as active.

OK, the problem is with the icons only.

I’m not sure what the default icon is for these icon types.

smoke is not a dynamic icon so it doesn’t change when the Switch is ON or OFF.

fire and siren are dynamic icons but because your Items do not have a value the default version of the icon is chosen. It appears that the “active” version of the icon was chosen as the default. You will need to create your own icons that has the non-active version as the default. See https://www.openhab.org/docs/configuration/items.html#icons

1 Like

Thanks for your help.

I read the link you provided which lead me to do the following.

Download the following vector icons from git;
fire-off.svg
fire-on.svg
siren-off.svg
siren-on.svg

I put these in /etc/openhab2/icons/classic

Once in there I copied fire-off.svg to fire.svg and siren-off.svg to siren.svg

This gave me the three icons per dynamic icon. Two were the off state and one the on state.

However I don’t think they are working because I still have the same situation where the on icon is displayed for null items.

You may need to use PaperUI to instruct the system to use .png icon types for BasicUI

Something weird going on.

I have both svg and png icons in the /icons/classic folder.

If I configure BasicUI to use vector icons then the siren icons are displayed but in a active state but the fire icons are not shown.

If i change BasicUI to use bitmap then it shows both the siren and fire icons but in the active state.

You must also have a fire.svg and siren.svg. This is the default that gets shown when the Item is NULL or UNDEF.

Also, you may not be able to select the same names for these copies of the icons as the default ones.

Try renaming them to something different and copy the -off version to be the default icon.

Hi Rich,

I hade already copied the -off icons to be the default. The link you provided sugests that using the same name should be ok but I’ll try a unique name.

Renaming made no difference.

The icons have 644 permissions is this ok? Also I currenly just have the icons in the folder. Should they be zipped or anything?

Ok - problem solved. I had a “idiot” moment. When downloading the icons from github I used wget directly in the icon folder. unfortunately I was copying the wrong link and so was downloading a png file that was actually a webpage.

Sorted now

1 Like

This stuff is fiddly, but it does work in the end

1 Like