I’ll fix this in the next update. The initial version of the binding just set everything to
UNDEF but I think
uptime should default to
lastSeen should stay as it’s last value.
I have it setup exactly the same way and I do it every time the door opens - the only guard condition is whether it’s Day or Night (using the astro binding). I tried it where it only triggered if the house was completely vacant but if the wife was upstairs, it would remain dark when I walked in the front door. More often than not, you will want the lights to turn on vs. them turning on and you not needing them.
This is exactly my thinking - you’re not over simplifying it at all. I will try keeping a map of mac addresses to lastSeen timestamps and see if I can manage it that way.
I should of mentioned this. It depends on if you had configured your things through the Paper UI or you defined them via a
unifi.things. Paper UI configured things needed to be removed and re-added for the new channels to appear. Sorry about that.
Good catch! It looks like it’s expecting an
OFF state for present and not an
You can see this by trying the following URLs:
I’ll dig deeper and see if there’s an easy fix for this.
Could you elaborate? I just get the expected events:
2017-09-02 08:18:03.887 [ItemStateChangedEvent ] - MatthewsPhoneLastSeen changed from 2017-09-02T08:17:48.000+0300 to 2017-09-02T08:17:58.000+0300
2017-09-02 08:18:13.888 [ItemStateChangedEvent ] - MatthewsPhoneLastSeen changed from 2017-09-02T08:17:58.000+0300 to 2017-09-02T08:18:09.000+0300
2017-09-02 08:18:23.886 [ItemStateChangedEvent ] - MatthewsPhoneLastSeen changed from 2017-09-02T08:18:09.000+0300 to 2017-09-02T08:18:23.000+0300
If you’re referring to the frequency, this is simply an artifact of the
refresh interval on the binding. Really no way to avoid this.
Will do a little more work on the binding and will push an update shortly.