Trigger not firing

Posted on
Tue Oct 05, 2021 1:36 pm
Turribeach offline
Posts: 429
Joined: Feb 06, 2015
Location: London, UK

Trigger not firing

Hi, I have been using an UniFi trigger (Type: uniFiAP Event, Event: "the status of at least one UniFi device has changed") to track new Wifi devices joining my network. I just noticed that this trigger hasn't been firing for a while. Looking at my logs I was able to track the issue to a plugin upgrade. It was working fine on v7.38.356 and it stopped working when I put v7.39.361. I have installed the latest version (v7.39.370 ) and it still doesn't fire. Any ideas? Thanks!

Posted on
Fri Oct 08, 2021 3:59 am
kw123 offline
User avatar
Posts: 8363
Joined: May 12, 2013
Location: Dallas, TX

Re: Trigger not firing

Sorry can’t look at it right now. I am w/o equipment for > 2 months.
Moving from dallas to Vienna.

Karl.


Sent from my iPhone using Tapatalk

Posted on
Thu Feb 03, 2022 5:34 pm
dtich offline
Posts: 798
Joined: Sep 24, 2005

Re: Trigger not firing

I'll put this here I guess:

I've got a Group with 1 device in it - my phone.

It is Group 4. I have a trigger to send email/text when my phone connects/becomes up on the net, and another one for when it disconnects/goes down.

I can see the phone go down and then expire in the device list, trigger doesn't fire. I can see it come back up, no trigger.

There is only one device in Group 4 and the triggers are set to "oneAway" and "oneHome".

Am I doing this right? And, if not, what needs to change to make this work?


Thanks!

Posted on
Thu Feb 03, 2022 9:00 pm
dtich offline
Posts: 798
Joined: Sep 24, 2005

Re: Trigger not firing

Update. Can't get the group trigger to fire, but On/Off state device triggers seem to work fine.

Very useful.

Still not sure why switches don't auto populate the dev list... further digging is required! The device state does update via Wifi or SW, so that's good. It 'sees' the switches. Just doesn't wanna let me play with them. :D The main function is happening already though, so. Mild success. Thanks for the help, or at least the audience. Lol.

Posted on
Fri Feb 04, 2022 4:29 am
kw123 offline
User avatar
Posts: 8363
Joined: May 12, 2013
Location: Dallas, TX

Re: Trigger not firing

1. which trigger are you using ?
there are variable names that you can trigger on. I have
wlan home/away
lan home/away
iPhones home/away
all are counts, so any change means one added or removed

re switches, could you a little more explicit
the plugin uses the first appearance of a device to create it. for wifi devices it is likely one of the AP. then you should check what kind of up/down behavior you would like to use
there are various options fast down = only listens to AP for a Join or leave signal. if you just walk away there is likely no leave signal. when you switch your phone on/off it seems that it sends a hello and a good bye to the AP
..

Karl

Posted on
Fri Feb 04, 2022 4:54 am
kw123 offline
User avatar
Posts: 8363
Joined: May 12, 2013
Location: Dallas, TX

Re: Trigger not firing

as for the triggers:

Some time ago I switched all triggers to changing variables. There is no active event "trigger" in unifi.
I did that as the event trigger names are static, can not change the names ( it is group0.....9), but you can change the names of variables to your liking in config

So you need to setup a trigger: eg if variable "Unifi_Count_ALL_lastChange" has any change then something has changed, ie status
and in variable Unifi_With_Status_Change you can see which one has changed, (it shows the indigo name, not the indigo id.)
or if Unifi_Count_iphones_Home becomes equal ... . then you know xxx are home / away
or becomes equal 1 then at least one is home
or becomes greater than 0 then all were away, now one is home
...
for any group

You can name the groups in config
As stated: I am using
wan
Lan
iPhones
Karl
ps I forgot to delete the entries in events.xml thats why these triggers still show up. will be fixed in the next release

@ Turribeach that should explain your issue.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 6 guests