I’m trying to get the buttons on my Smart Fob to work (4 regular pushes, 4 holds)… this should be fairly straightforward just like my Aeon Minimotes (gen1). I’ve installed @mitchp 's DTH https://github.com/mitchpond/SmartThingsPublic/blob/master/devicetypes/mitchpond/iris-smart-fob.src/iris-smart-fob.groovy (Github -> add repo -> owner=mitchpond, name=SmartThingsPublic, branch=master, then get and publish iris-smart-fob.groovey). Unfortunately I can’t get button pushes to trigger pistons. I can see the button push in the IDE, but I just get eval=false for the relevant condition.
Here’s the anonymized piston, keypad3=minimum, keypad2=iris
Um… I had to be the n00b but I have no idea how to make that logging happen. I’m happy to RTFM… but I can’t even find the manual. Can you point me in the right direction? Thanks!
right before the “end execute” statement there is “add a new statement” click that
click “add an action”
click “add a task”
from the drop down “please select a command” find “log to console” and click on it
change the dropdown under Message section to “expression” from “value”
paste the following in the expression edit field, save everything and click on the keyfob buttons.
“A:” $currentEventAttribute “^ D:” $currentEventDevice “^ DI:” $currentEventDeviceIndex “^ DP:” $currentEventDevicePhysical “^ U:” $currentEventUnit “^ V:” $currentEventValue “^ S:” $currentState “^”
you will see the output of this in the same space you found the piston logs.
yes, the location shows grayed and cant be “selected”. initially when you click add an action it should default to Location, at that point if you click add a task it will work.
if you go back in and unselect Keypad 2, it will default back to Location.
I can’t read the code, so I don’t know if this is relevant or not, but since this is an older device type handler…
Back in December 2016 there was a platform change and device type handlers which did not include the field “number of buttons” and set it were no longer handled correctly. This affected a bunch of devices at the time. The only fix was that one by one the device type handlers got updated to include setting the number of buttons field. Any handler which doesn’t set that field will not be handled correctly in core, webcore, smart lighting, or routines.
Here is the thread discussing that issue:
Again, I can’t read code (I depend on text to speech software, and trust me, you don’t want to try to do groovy with text to speech), so I have no idea if it’s relevant, but I just thought I would mention it.
@JDRoberts thanks for the link with the details. very helpful. in fact it helped me solve an oddity i have had with @a4refillpad Xiaomi Zigbee Button DH. webcore did not recognize button pushes as button 1 was pushed. it simply recognized the push event. adding those 3 methods from the link to the DH now seems to have done trick of getting webcore to recognize when button 1 was pushed vs just using the generic event of any button was pushed. not a big deal but it has always bugged me and now i know why it was behaving the way it was.
i have tried looking through that DH’s groovy code many times, without solving this one. so hey, those of us that use eye to brain - aren’t doing any better. in fact but for you posting this link i wouldn’t have solved this one.
Well, that sounds exactly like the problem I’m having. When I look at my [previously posted] debugging output side-by-side I’d say the oddity is that the Aeon Minimote clearly shows which button is being pushed, whereas the Iris Smart Fob just has a generic, none numeric, “a general button was pushed” command. I’m definitely going to check out the other thread and see if I can figure out things for the Smart Fob.
The oddity for me is that I can’t imagine I’m the only person using this DTH on this device… I mean, this is the lowest price remote that I’m aware of and I’ve had the same general issues on both CoRE and webCoRE, so I figure that, generally speaking, I’m the one doing something wrong… but maybe not?
I think I’ve solved my problem! Generally speaking, I was pushing the wrong button! The logging statement gave it away.
The Aeon Minimote is clearly labeled “like English reading order” (start in the upper left, move across to the right in rows). I realized once reading the logging statements that the Iris fob seems to be pure clockwise numbering (still starting in the upper left though). This means buttons #1 and #2 are the same, but buttons #3 and #4 are not… and I happened to be trying to program button #3!
FYI I’m still searching for a good remote when it comes to the balance of size and battery life. Unfortunately the Aeon has crazy bad battery life, like, less than a week (and it seems to have nothing to do with usage). You’re right that the Aeon’s were much cheaper, I remembered that backward when I posted the previous comment.
It sounds like you may have gotten a bad unit on the minimote, it’s one of the most popular devices and most people get several months of use at least out of a charge. It can happen with any electronic device, every once in awhile you get a bad one.
From the manufacturer:
How long does my battery last on a full charge? (Recommended settings)
.
The battery should last about 3 months on a full charge assuming you are controlling something or tapping its button 20 times per day depending on the health of the battery itself, or how often you use it. We highly suggest disabling any Wakeup Interval that your gateway may set to this controller in order to conserve your battery life. (Having the Minimote is not necessary for its use and can be seen as a waste of battery).
.
You can set the wakeup interval depending on your gateway, each gateway is different, and not all will let you set this if it allows you at all.
.
We suggest: Wakeup Interval = 0 for the maximum battery life you can get.
.
If you are seeing battery life less than 2.5 months, you may want to consider setting the Wakeup Interval in case that it may be the culprit.
I have two and they both last similar ~1 to 2 week times, and I use them maybe 10 to 20 time total during that time. Both were bought via Amazon but at different times.