Closed mccabemj closed 2 years ago
Fantastic! I'm going to do a little refactoring on this - specifically to move the model detection up a level. I try to keep the -api
layer agnostic of business logic and force the business layer to make the distinction.
@colinbendell fair point. I have removed the logic from the blink-api
file and put it in a ternary inside the blink file.
I also created a function to check for blink mini cameras as its around the place as a string check. It also allows for more code names if they come out with further wired cameras to work the same.
@colinbendell any chance you could take a look (either test and approve or modify). Would be good to get this live as the plug-in doesn't work for Mini cameras
Thanks! I'll push to merge it this week.
Any news on whether this is going to be merged this week? Would like this in ASAP really. Happy to help contribute
Hi. Been a couple of months now. Any chance this can be merged and a new release?
Fixes #30
After inspecting the traffic when enabling the Blink mini devices, I noticed it had a completely different API route than the others. Turns out it's the same endpoint as the one used in a function that already exists
updateOwlSettings
.Passing in
{ enabled: true/false }
as the body, instead of a different endpoint for each.I debugged the plugin and all works as expected, but as I haven't spent any time in the codebase, let me know if there is an easier way to get the model in
blink-api
without having to pass it around.