The latest code seems to still have some issues for me and breaks my SHM (or at least I think this is the cause based on the log events I’m seeing). In addition to the default Goodbye and I’m Back routines, I have an “Auto Arm” and “Auto Disarm” routine that more or less does the same thing except while we’re asleep. In this case, once no motion is detected for X mins between certain times of the day, it’ll change the mode to “Sleep” and arm SHM. Since using this Blink DeviceHandler/App combo, I’ve added all three of my Blink cams to these routines for the “Turn on these lights or switches” and “Turn off these lights or switches” so that when it arms SHM, it also arms all three cams. Instead, it seems all four of those routines are now broken.
They kick off just fine, but they rarely turn on/off all three cams–usually only one or two cams will properly turn on/off. Here’s an example of the live logging output for my “Auto Arm” routine:
15a98bc9-da34-46bc-9710-537fbd8cfe12 10:54:38 PM: error java.util.concurrent.TimeoutException: Execution timed out after 40 units. Start time: Fri Mar 04 03:53:58 UTC 2016 @ line 379
Seems that “Goodbye” is having a similar timeout issue:
7a296f06-c337-406a-82e0-a90d81bd2684 10:57:03 PM: error java.lang.NullPointerException: Cannot get property 'id' on null object @ line 921 7a296f06-c337-406a-82e0-a90d81bd2684 10:57:03 PM: error LOG FROM PARENT>Failed to send Disable Camera Motion Alerts 7a296f06-c337-406a-82e0-a90d81bd2684 10:57:03 PM: error LOG FROM PARENT>Exception while configuring: groovyx.net.http.HttpResponseException: Conflict
My guess is that the routine never quite gets to the SHM arm/disarm step and sometimes doesn’t even make it to the switch on/off Blink camera section. Speaking of, the above 3-pack of errors also occurs sometimes when just trying to manually turn a Blink camera off when fixing a failed routine.
Ok I’m keeping up with all the code changes and have the latest of each. I’m lost now with how to enable the sync module. I turn on each of the camera’s via switch setting or even withing the device. However the sync module never seems to turn on. If I use the device screen and make the system active it will turn on the sync module. My question is how do I enable the snyc modules outside the device screen?
I’m having the same issues with SHM, but I’ve not updated my code for this smart app yet (I’m a bit behind), so I’m not totally sure it’s anything other than another ST hiccup.
RBoy
(www.rboyapps.com - Making SmartThings Easy!)
105
This is a platform issue, it’s running slow and timing out the code. If you see the code Line 379 is nothing.
The root cause your problem is your camera. It’s returning a conflict and refusing to disable motion alerts. This is likely because the camera is busy doing something else (e.g. recording a video or still executing some previous command).
I can update the code to not throw the subsequent errors if the camera is in conflict status but the root cause is the camera itself.
RBoy
(www.rboyapps.com - Making SmartThings Easy!)
106
I didn’t understand, with the new code you shouldn’t touch the sync module at all, the code takes care of it. You only enable or disable the camera (directly or via the switch), the code handles the module. The option to override manually is given as an emergency incase you want to shut down the entire sync module (hence no circle around it). You only operate the camera enable/disable.
What version are you on? I had this problem a handful of versions ago (can’t remember which one) and just upgraded to the latest tonight to see if it would help.
I should add that I also took the Blink cam “switches” out of those four routines and they now work perfectly fine (and faster). So this app definitely seems to be the issue. It worked fine when the camera arming was based on the overall Blink arm/disarm setting, but then it was all or none (which frankly is all I really need at the moment) unlike the new flexibility.
Wouldn’t that line number be referring to the SmartThings routine code? Regardless, removing the cameras from my routines cleared things up so I think the cameras are slowing the routine down. I’ll upgrade to 3.0.5 and try that.
Same behavior with 3.0.5. It sure seems like turning motion off for three individual cameras all at once just takes too long (or fails completely for certain cameras) and that causes the routine to not complete. Not sure if it is due to the Blink service being a bit slow? Doing things in the Blink app is pretty inconsistent too at times.
As a matter of fact, I just tested this by manually turning the cameras on via ST one by one (i.e. tap and wait for it to complete, repeat for next camera) and it seems to work fine. But I tap one after another, I usually only get one to succeed. So then I hopped into the Blink app and tried repeating this there. If you try tapping one after another (the little running man icon) it just won’t let you. It ignores the subsequent taps until the first one completes and then you can tap the next one. So I’m guessing if I change my routines to just switch on one camera, they’ll work fine, but doing more than one will be unreliable.
That said, would it be possible to have the option to toggle controlling cameras individually (as the app currently does) vs. just arming/disarming the entire Blink system (like the app started out)? That would at least be a solid workaround for now (and arming the entire system with my Goodbye/I’m Back routines is personally my top priority for ST integration).
RBoy
(www.rboyapps.com - Making SmartThings Easy!)
112
Hmm, I think the issue is that there needs to be a gap between the 2 commands and doing it in succession is causing an issue (difficult to replicate as I only have 1 camera right now). It would be very helpful if you can PM me the logs that you see in the IDE if you enable/disable multiple cameras through the routines (in rapid succession) to see where it’s slowing down.
I actually noticed the same thing with routines so I setup a rule via rule machine that turns on all 4 of my cameras when my home is armed and another rule to turn off all my cameras when my home is disarmed.
This worked great in testing but when I actually left and came home all my cameras didn’t arm/disarm. So I setup 2 rules to flip flop a boolean every 5 seconds and re-evaluate my rules to make sure all cameras were actually turned on/off.
1 Like
RBoy
(www.rboyapps.com - Making SmartThings Easy!)
114
Blink Camera Device Handler
Version 3.0.1
Added support for capability Battery to report the battery status to SmartThings
RBoy
(www.rboyapps.com - Making SmartThings Easy!)
116
Neat idea I’m able to replicate the issue see the conflict response from the server. I think the issue is that until the previous command is completed issuing a new command to the server causes the conflict. BUT I only have one camera so I can see why that’s a problem, one camera can’t respond to a command until the previous command hasn’t been completed
The issue is with 2 or more cameras, if anyone can replicate the issue. I.e. turn on 2 or 3 cameras in succession does that lead a conflict or not? (logs would be great) I don’t think it should but that’s what I need to see.
I can help provide logs. Is there a better way to do it outside of copy/paste? And, do you just want the ones for the Blink Camera Manager SmartApp or all?
RBoy
(www.rboyapps.com - Making SmartThings Easy!)
120
SmartApp and Camera please, Copy paste the only option AFAIK. Very helpful!
RBoy
(www.rboyapps.com - Making SmartThings Easy!)
121
So until we nail down the issue with multiple commands being sent, the SmartApp and Device Handler have been updated to allow users to configure the behavior of the Switch Interface.
Version 3.1.0 Blink Camera Manager SmartApp and Blink Device Handler.
Added support to customize switch and alarm interface behavior to either control individual cameras or the entire system (sync module)
MAKE SURE YOU UPDATE THE DEVICE HANDLER CODE FIRST AND THEN THE SMARTAPP (order is important in the case)